"vscode:/vscode.git/clone" did not exist on "62a8d7f0b1bc041fb90521e2a63a41dd5063e281"
Unverified Commit fe974e6b authored by liuzhe-lz's avatar liuzhe-lz Committed by GitHub
Browse files

Make standalone mode warning more obvious (#3312)

parent 8134be62
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import colorama
import logging
import warnings
import json_tricks
__all__ = [
......@@ -16,7 +18,16 @@ _logger = logging.getLogger('nni')
def get_next_parameter():
_logger.warning('Requesting parameter without NNI framework, returning empty dict')
warning_message = ''.join([
colorama.Style.BRIGHT,
colorama.Fore.RED,
'Running NNI code without runtime. ',
'Check the following tutorial if you are new to NNI: ',
colorama.Fore.YELLOW,
'https://nni.readthedocs.io/en/stable/Tutorial/QuickStart.html#id1',
colorama.Style.RESET_ALL
])
warnings.warn(warning_message, RuntimeWarning)
return {
'parameter_id': None,
'parameters': {}
......
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