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
dbb84e76
Commit
dbb84e76
authored
Aug 22, 2019
by
Yuge Zhang
Committed by
Guoxin
Aug 22, 2019
Browse files
Print error detail on schema validation failure
print error detail on schema validation failure
parent
ea89e232
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
4 deletions
+1
-4
tools/nni_cmd/launcher_utils.py
tools/nni_cmd/launcher_utils.py
+1
-4
No files found.
tools/nni_cmd/launcher_utils.py
View file @
dbb84e76
...
@@ -198,10 +198,7 @@ def validate_common_content(experiment_config):
...
@@ -198,10 +198,7 @@ def validate_common_content(experiment_config):
Schema
({
**
separate_schema_dict
[
separate_key
][
'customized'
]}).
validate
(
experiment_config
[
separate_key
])
Schema
({
**
separate_schema_dict
[
separate_key
][
'customized'
]}).
validate
(
experiment_config
[
separate_key
])
except
SchemaError
as
error
:
except
SchemaError
as
error
:
print_error
(
'Your config file is not correct, please check your config file content!'
)
print_error
(
'Your config file is not correct, please check your config file content!'
)
if
error
.
__str__
().
__contains__
(
'Wrong key'
):
print_error
(
error
.
code
)
print_error
(
' '
.
join
(
error
.
__str__
().
split
()[:
3
]))
else
:
print_error
(
error
)
exit
(
1
)
exit
(
1
)
#set default value
#set default value
...
...
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