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
1c54b40c
"...targets/git@developer.sourcefind.cn:gaoqiong/migraphx.git" did not exist on "cc2535e0c5201e4ece51be90699dcc8b79579915"
Unverified
Commit
1c54b40c
authored
Feb 04, 2020
by
SparkSnail
Committed by
GitHub
Feb 04, 2020
Browse files
Change validation order in machineList (#1966)
parent
c55c5f46
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
tools/nni_cmd/config_schema.py
tools/nni_cmd/config_schema.py
+11
-9
No files found.
tools/nni_cmd/config_schema.py
View file @
1c54b40c
...
...
@@ -407,20 +407,22 @@ frameworkcontroller_config_schema = {
}
machine_list_schema
=
{
Optional
(
'machineList'
):[
Or
({
Optional
(
'machineList'
):[
Or
(
{
'ip'
:
setType
(
'ip'
,
str
),
Optional
(
'port'
):
setNumberRange
(
'port'
,
int
,
1
,
65535
),
'username'
:
setType
(
'username'
,
str
),
'passwd'
:
setType
(
'passwd'
,
str
),
'sshKeyPath'
:
setPathCheck
(
'sshKeyPath'
),
Optional
(
'passphrase'
):
setType
(
'passphrase'
,
str
),
Optional
(
'gpuIndices'
):
Or
(
int
,
And
(
str
,
lambda
x
:
len
([
int
(
i
)
for
i
in
x
.
split
(
','
)])
>
0
),
error
=
'gpuIndex format error!'
),
Optional
(
'maxTrialNumPerGpu'
):
setType
(
'maxTrialNumPerGpu'
,
int
),
Optional
(
'useActiveGpu'
):
setType
(
'useActiveGpu'
,
bool
)
},
{
},
{
'ip'
:
setType
(
'ip'
,
str
),
Optional
(
'port'
):
setNumberRange
(
'port'
,
int
,
1
,
65535
),
'username'
:
setType
(
'username'
,
str
),
'sshKeyPath'
:
setPathCheck
(
'sshKeyPath'
),
Optional
(
'passphrase'
):
setType
(
'passphrase'
,
str
),
'passwd'
:
setType
(
'passwd'
,
str
),
Optional
(
'gpuIndices'
):
Or
(
int
,
And
(
str
,
lambda
x
:
len
([
int
(
i
)
for
i
in
x
.
split
(
','
)])
>
0
),
error
=
'gpuIndex format error!'
),
Optional
(
'maxTrialNumPerGpu'
):
setType
(
'maxTrialNumPerGpu'
,
int
),
Optional
(
'useActiveGpu'
):
setType
(
'useActiveGpu'
,
bool
)
...
...
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