From 0fbaece3751674f459661ac876b2d7af4181343d Mon Sep 17 00:00:00 2001 From: liuzhe Date: Fri, 4 Sep 2020 18:00:25 +0800 Subject: [PATCH] shut validator ipc warning --- tools/nni_cmd/config_schema.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/nni_cmd/config_schema.py b/tools/nni_cmd/config_schema.py index f6aee3a450..81dc1c77a5 100644 --- a/tools/nni_cmd/config_schema.py +++ b/tools/nni_cmd/config_schema.py @@ -1,8 +1,9 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT license. -import os import json +import logging +import os import netifaces 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 @@ -78,6 +79,7 @@ def validate_class_args(self, class_args, algo_type, builtin_name): if meta and 'accept_class_args' in meta and meta['accept_class_args'] == False: 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) if validator: try: