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
c1873c5f
Unverified
Commit
c1873c5f
authored
Jul 16, 2021
by
Ni Hao
Committed by
GitHub
Jul 16, 2021
Browse files
add nfs shared storage integration test (#3913)
parent
094ed9f1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
14 deletions
+22
-14
pipelines/integration-test-remote-l2l.yml
pipelines/integration-test-remote-l2l.yml
+4
-1
test/config/integration_tests.yml
test/config/integration_tests.yml
+7
-13
test/nni_test/nnitest/generate_ts_config.py
test/nni_test/nnitest/generate_ts_config.py
+10
-0
test/nni_test/nnitest/run_tests.py
test/nni_test/nnitest/run_tests.py
+1
-0
No files found.
pipelines/integration-test-remote-l2l.yml
View file @
c1873c5f
...
@@ -94,7 +94,10 @@ jobs:
...
@@ -94,7 +94,10 @@ jobs:
--remote_pwd $(password_in_docker) \
--remote_pwd $(password_in_docker) \
--nni_manager_ip $(manager_ip) \
--nni_manager_ip $(manager_ip) \
--azurestoragetoken $(azureblob_token_test) \
--azurestoragetoken $(azureblob_token_test) \
--nfs_server $(NFS_IP)
--nfs_server $(NFS_IP) \
--local_mount_point $(LOCAL_MOUNT_POINT) \
--remote_mount_point $(REMOTE_MOUNT_POINT) \
--exported_directory $(Exported_Directory)
python3 nni_test/nnitest/run_tests.py --config config/integration_tests.yml --ts remote
python3 nni_test/nnitest/run_tests.py --config config/integration_tests.yml --ts remote
displayName
:
Integration test (reuse mode)
displayName
:
Integration test (reuse mode)
...
...
test/config/integration_tests.yml
View file @
c1873c5f
...
@@ -49,19 +49,13 @@ testCases:
...
@@ -49,19 +49,13 @@ testCases:
kwargs
:
kwargs
:
rootpath
:
/tmp/nnimount/testlocalrootpath
rootpath
:
/tmp/nnimount/testlocalrootpath
# TODO: Enable this case after nfs server is ready
-
name
:
shared-storage-remote-nfs
#- name: shared-storage-remote-nfs
configFile
:
test/config/sharedstorage_test/config_sharedstorage_remote_nfs.yml
# configFile: test/config/sharedstorage_test/config_sharedstorage_remote_nfs.yml
trainingService
:
remote
# config:
validator
:
# sharedStorage:
class
:
FileExistValidator
# localMountPoint: /tmp/nnimount/testlocalrootpath
kwargs
:
# remoteMountPoint: /tmp/nnimount/testremoterootpath
rootpath
:
/tmp/nnimount/testlocalrootpath
# nfsServer: $(NFS_IP)
# exportedDirectory: /home/nni/mnt/
# validator:
# class: FileExistValidator
# kwargs:
# rootpath: /tmp/nnimount/testlocalrootpath
-
name
:
sklearn-regression
-
name
:
sklearn-regression
configFile
:
test/config/examples/sklearn-regression.yml
configFile
:
test/config/examples/sklearn-regression.yml
...
...
test/nni_test/nnitest/generate_ts_config.py
View file @
c1873c5f
...
@@ -78,6 +78,12 @@ def update_training_service_config(args):
...
@@ -78,6 +78,12 @@ def update_training_service_config(args):
config
[
args
.
ts
][
'sharedStorage'
][
'storageAccountKey'
]
=
args
.
azurestoragetoken
config
[
args
.
ts
][
'sharedStorage'
][
'storageAccountKey'
]
=
args
.
azurestoragetoken
if
args
.
nfs_server
is
not
None
:
if
args
.
nfs_server
is
not
None
:
config
[
args
.
ts
][
'sharedStorage'
][
'nfsServer'
]
=
args
.
nfs_server
config
[
args
.
ts
][
'sharedStorage'
][
'nfsServer'
]
=
args
.
nfs_server
if
args
.
local_mount_point
is
not
None
:
config
[
args
.
ts
][
'sharedStorage'
][
'localMountPoint'
]
=
args
.
local_mount_point
if
args
.
remote_mount_point
is
not
None
:
config
[
args
.
ts
][
'sharedStorage'
][
'remoteMountPoint'
]
=
args
.
remote_mount_point
if
args
.
exported_directory
is
not
None
:
config
[
args
.
ts
][
'sharedStorage'
][
'exportedDirectory'
]
=
args
.
exported_directory
elif
args
.
ts
==
'adl'
:
elif
args
.
ts
==
'adl'
:
if
args
.
nni_docker_image
is
not
None
:
if
args
.
nni_docker_image
is
not
None
:
config
[
args
.
ts
][
'trial'
][
'image'
]
=
args
.
nni_docker_image
config
[
args
.
ts
][
'trial'
][
'image'
]
=
args
.
nni_docker_image
...
@@ -122,8 +128,12 @@ if __name__ == '__main__':
...
@@ -122,8 +128,12 @@ if __name__ == '__main__':
parser
.
add_argument
(
"--config_version"
,
type
=
str
,
choices
=
[
'v1'
,
'v2'
],
default
=
'v1'
)
parser
.
add_argument
(
"--config_version"
,
type
=
str
,
choices
=
[
'v1'
,
'v2'
],
default
=
'v1'
)
parser
.
add_argument
(
"--nni_docker_image"
,
type
=
str
)
parser
.
add_argument
(
"--nni_docker_image"
,
type
=
str
)
parser
.
add_argument
(
"--nni_manager_ip"
,
type
=
str
)
parser
.
add_argument
(
"--nni_manager_ip"
,
type
=
str
)
# args for remote with shared storage
parser
.
add_argument
(
"--azurestoragetoken"
,
type
=
str
)
parser
.
add_argument
(
"--azurestoragetoken"
,
type
=
str
)
parser
.
add_argument
(
"--nfs_server"
,
type
=
str
)
parser
.
add_argument
(
"--nfs_server"
,
type
=
str
)
parser
.
add_argument
(
"--local_mount_point"
,
type
=
str
)
parser
.
add_argument
(
"--remote_mount_point"
,
type
=
str
)
parser
.
add_argument
(
"--exported_directory"
,
type
=
str
)
# args for PAI
# args for PAI
parser
.
add_argument
(
"--pai_user"
,
type
=
str
)
parser
.
add_argument
(
"--pai_user"
,
type
=
str
)
parser
.
add_argument
(
"--pai_pwd"
,
type
=
str
)
parser
.
add_argument
(
"--pai_pwd"
,
type
=
str
)
...
...
test/nni_test/nnitest/run_tests.py
View file @
c1873c5f
...
@@ -62,6 +62,7 @@ def update_training_service_config(config, training_service, config_file_path, n
...
@@ -62,6 +62,7 @@ def update_training_service_config(config, training_service, config_file_path, n
it_ts_config
[
training_service
].
get
(
'sharedStorage'
).
pop
(
'storageAccountKey'
)
it_ts_config
[
training_service
].
get
(
'sharedStorage'
).
pop
(
'storageAccountKey'
)
elif
str
(
sharedStorage
.
get
(
'storageType'
)).
lower
()
==
'azureblob'
:
elif
str
(
sharedStorage
.
get
(
'storageType'
)).
lower
()
==
'azureblob'
:
it_ts_config
[
training_service
].
get
(
'sharedStorage'
).
pop
(
'nfsServer'
)
it_ts_config
[
training_service
].
get
(
'sharedStorage'
).
pop
(
'nfsServer'
)
it_ts_config
[
training_service
].
get
(
'sharedStorage'
).
pop
(
'exportedDirectory'
)
else
:
else
:
it_ts_config
[
training_service
].
pop
(
'sharedStorage'
)
it_ts_config
[
training_service
].
pop
(
'sharedStorage'
)
...
...
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