"docs/en_US/git@developer.sourcefind.cn:OpenDAS/nni.git" did not exist on "faca02c3e1490690a52b5181d30aab69af56a370"
Unverified Commit 42879806 authored by liuzhe-lz's avatar liuzhe-lz Committed by GitHub
Browse files

shut validator ipc warning (#2864)

parent c6ec21f4
# Copyright (c) Microsoft Corporation. # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license. # Licensed under the MIT license.
import os
import json import json
import logging
import os
import netifaces import netifaces
from schema import Schema, And, Optional, Regex, Or, SchemaError from schema import Schema, And, Optional, Regex, Or, SchemaError
from nni.package_utils import create_validator_instance, get_all_builtin_names, get_builtin_algo_meta from nni.package_utils import create_validator_instance, get_all_builtin_names, get_builtin_algo_meta
...@@ -78,6 +79,7 @@ class AlgoSchema: ...@@ -78,6 +79,7 @@ class AlgoSchema:
if meta and 'accept_class_args' in meta and meta['accept_class_args'] == False: if meta and 'accept_class_args' in meta and meta['accept_class_args'] == False:
raise SchemaError('classArgs is not allowed.') raise SchemaError('classArgs is not allowed.')
logging.getLogger('nni.protocol').setLevel(logging.ERROR) # we know IPC is not there, don't complain
validator = create_validator_instance(algo_type+'s', builtin_name) validator = create_validator_instance(algo_type+'s', builtin_name)
if validator: if validator:
try: try:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment