Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
nni
Commits
fe974e6b
"vscode:/vscode.git/clone" did not exist on "62a8d7f0b1bc041fb90521e2a63a41dd5063e281"
Unverified
Commit
fe974e6b
authored
Jan 20, 2021
by
liuzhe-lz
Committed by
GitHub
Jan 20, 2021
Browse files
Make standalone mode warning more obvious (#3312)
parent
8134be62
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
nni/runtime/platform/standalone.py
nni/runtime/platform/standalone.py
+12
-1
No files found.
nni/runtime/platform/standalone.py
View file @
fe974e6b
# 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'
:
{}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment