Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Silence IPC environment warning in nnictl config validator #2864

Merged
merged 1 commit into from
Sep 7, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion tools/nni_cmd/config_schema.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.

import os
import json
import logging
import os
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the order of imported object? os should be after netifaces in character order?

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
Expand Down Expand Up @@ -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:
Expand Down