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
8a60d624
Unverified
Commit
8a60d624
authored
Jun 12, 2020
by
SparkSnail
Committed by
GitHub
Jun 12, 2020
Browse files
Support paiStorageConfigName (#2536)
parent
52f71f54
Changes
23
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
4 deletions
+5
-4
test/nni_test/nnitest/generate_ts_config.py
test/nni_test/nnitest/generate_ts_config.py
+3
-2
tools/nni_cmd/config_schema.py
tools/nni_cmd/config_schema.py
+1
-1
tools/nni_cmd/launcher_utils.py
tools/nni_cmd/launcher_utils.py
+1
-1
No files found.
test/nni_test/nnitest/generate_ts_config.py
View file @
8a60d624
...
@@ -41,8 +41,8 @@ def update_training_service_config(args):
...
@@ -41,8 +41,8 @@ def update_training_service_config(args):
config
[
args
.
ts
][
'trial'
][
'nniManagerNFSMountPath'
]
=
args
.
nni_manager_nfs_mount_path
config
[
args
.
ts
][
'trial'
][
'nniManagerNFSMountPath'
]
=
args
.
nni_manager_nfs_mount_path
if
args
.
container_nfs_mount_path
is
not
None
:
if
args
.
container_nfs_mount_path
is
not
None
:
config
[
args
.
ts
][
'trial'
][
'containerNFSMountPath'
]
=
args
.
container_nfs_mount_path
config
[
args
.
ts
][
'trial'
][
'containerNFSMountPath'
]
=
args
.
container_nfs_mount_path
if
args
.
pai_storage_
plugin
is
not
None
:
if
args
.
pai_storage_
config_name
is
not
None
:
config
[
args
.
ts
][
'trial'
][
'paiStorage
Plugin
'
]
=
args
.
pai_storage_
plugin
config
[
args
.
ts
][
'trial'
][
'paiStorage
ConfigName
'
]
=
args
.
pai_storage_
config_name
if
args
.
vc
is
not
None
:
if
args
.
vc
is
not
None
:
config
[
args
.
ts
][
'trial'
][
'virtualCluster'
]
=
args
.
vc
config
[
args
.
ts
][
'trial'
][
'virtualCluster'
]
=
args
.
vc
elif
args
.
ts
==
'kubeflow'
:
elif
args
.
ts
==
'kubeflow'
:
...
@@ -102,6 +102,7 @@ if __name__ == '__main__':
...
@@ -102,6 +102,7 @@ if __name__ == '__main__':
parser
.
add_argument
(
"--vc"
,
type
=
str
)
parser
.
add_argument
(
"--vc"
,
type
=
str
)
parser
.
add_argument
(
"--pai_token"
,
type
=
str
)
parser
.
add_argument
(
"--pai_token"
,
type
=
str
)
parser
.
add_argument
(
"--pai_storage_plugin"
,
type
=
str
)
parser
.
add_argument
(
"--pai_storage_plugin"
,
type
=
str
)
parser
.
add_argument
(
"--pai_storage_config_name"
,
type
=
str
)
parser
.
add_argument
(
"--nni_manager_nfs_mount_path"
,
type
=
str
)
parser
.
add_argument
(
"--nni_manager_nfs_mount_path"
,
type
=
str
)
parser
.
add_argument
(
"--container_nfs_mount_path"
,
type
=
str
)
parser
.
add_argument
(
"--container_nfs_mount_path"
,
type
=
str
)
# args for kubeflow and frameworkController
# args for kubeflow and frameworkController
...
...
tools/nni_cmd/config_schema.py
View file @
8a60d624
...
@@ -292,7 +292,7 @@ pai_trial_schema = {
...
@@ -292,7 +292,7 @@ pai_trial_schema = {
Optional
(
'memoryMB'
):
setType
(
'memoryMB'
,
int
),
Optional
(
'memoryMB'
):
setType
(
'memoryMB'
,
int
),
Optional
(
'image'
):
setType
(
'image'
,
str
),
Optional
(
'image'
):
setType
(
'image'
,
str
),
Optional
(
'virtualCluster'
):
setType
(
'virtualCluster'
,
str
),
Optional
(
'virtualCluster'
):
setType
(
'virtualCluster'
,
str
),
Optional
(
'paiStorage
Plugin
'
):
setType
(
'paiStorage
Plugin
'
,
str
),
Optional
(
'paiStorage
ConfigName
'
):
setType
(
'paiStorage
ConfigName
'
,
str
),
Optional
(
'paiConfigPath'
):
And
(
os
.
path
.
exists
,
error
=
SCHEMA_PATH_ERROR
%
'paiConfigPath'
)
Optional
(
'paiConfigPath'
):
And
(
os
.
path
.
exists
,
error
=
SCHEMA_PATH_ERROR
%
'paiConfigPath'
)
}
}
}
}
...
...
tools/nni_cmd/launcher_utils.py
View file @
8a60d624
...
@@ -273,7 +273,7 @@ def validate_pai_config_path(experiment_config):
...
@@ -273,7 +273,7 @@ def validate_pai_config_path(experiment_config):
print_error
(
'Please set taskRoles in paiConfigPath config file!'
)
print_error
(
'Please set taskRoles in paiConfigPath config file!'
)
exit
(
1
)
exit
(
1
)
else
:
else
:
pai_trial_fields_required_list
=
[
'image'
,
'gpuNum'
,
'cpuNum'
,
'memoryMB'
,
'paiStorage
Plugin
'
,
'command'
]
pai_trial_fields_required_list
=
[
'image'
,
'gpuNum'
,
'cpuNum'
,
'memoryMB'
,
'paiStorage
ConfigName
'
,
'command'
]
for
trial_field
in
pai_trial_fields_required_list
:
for
trial_field
in
pai_trial_fields_required_list
:
if
experiment_config
[
'trial'
].
get
(
trial_field
)
is
None
:
if
experiment_config
[
'trial'
].
get
(
trial_field
)
is
None
:
print_error
(
'Please set {0} in trial configuration,
\
print_error
(
'Please set {0} in trial configuration,
\
...
...
Prev
1
2
Next
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