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
2d4fdfb2
Unverified
Commit
2d4fdfb2
authored
Mar 05, 2021
by
J-shang
Committed by
GitHub
Mar 05, 2021
Browse files
hotfix torchvision mnist (#3422)
parent
b2720c9e
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
77 additions
and
3 deletions
+77
-3
Dockerfile
Dockerfile
+8
-2
interim_vision_patch.py
interim_vision_patch.py
+21
-0
pipelines/fast-test.yml
pipelines/fast-test.yml
+25
-0
pipelines/full-test-linux.yml
pipelines/full-test-linux.yml
+6
-0
pipelines/full-test-windows.yml
pipelines/full-test-windows.yml
+6
-0
pipelines/integration-test-openpai-linux.yml
pipelines/integration-test-openpai-linux.yml
+1
-1
pipelines/integration-test-remote-l2l.yml
pipelines/integration-test-remote-l2l.yml
+10
-0
No files found.
Dockerfile
View file @
2d4fdfb2
...
@@ -59,8 +59,8 @@ RUN python3 -m pip --no-cache-dir install Keras==2.1.6
...
@@ -59,8 +59,8 @@ RUN python3 -m pip --no-cache-dir install Keras==2.1.6
#
#
# PyTorch
# PyTorch
#
#
RUN
python3
-m
pip
--no-cache-dir
install
torch
==
1.
4
.0
RUN
python3
-m
pip
--no-cache-dir
install
torch
==
1.
6
.0
RUN
python3
-m
pip
install
torchvision
==
0.
5
.0
RUN
python3
-m
pip
install
torchvision
==
0.
7
.0
#
#
# sklearn 0.24.1
# sklearn 0.24.1
...
@@ -78,6 +78,12 @@ RUN python3 -m pip --no-cache-dir install pandas==0.23.4 lightgbm==2.2.2
...
@@ -78,6 +78,12 @@ RUN python3 -m pip --no-cache-dir install pandas==0.23.4 lightgbm==2.2.2
COPY
dist/nni-${NNI_RELEASE}-py3-none-manylinux1_x86_64.whl .
COPY
dist/nni-${NNI_RELEASE}-py3-none-manylinux1_x86_64.whl .
RUN
python3
-m
pip
install
nni-
${
NNI_RELEASE
}
-py3-none-manylinux1_x86_64
.whl
RUN
python3
-m
pip
install
nni-
${
NNI_RELEASE
}
-py3-none-manylinux1_x86_64
.whl
#
# Vision patch. Need del later
#
COPY
interim_vision_patch.py .
RUN
python3 interim_vision_patch.py
#
#
# install aml package
# install aml package
#
#
...
...
interim_vision_patch.py
0 → 100644
View file @
2d4fdfb2
import
os
import
torchvision.datasets.mnist
as
mnist
file_name
=
mnist
.
__file__
dummy_file_name
=
os
.
path
.
join
(
os
.
path
.
dirname
(
file_name
),
'mnist_dummy.py'
)
with
open
(
file_name
,
'r'
)
as
fr
:
firstline
=
fr
.
readline
()
if
firstline
!=
'from six.moves import urllib
\n
'
:
with
open
(
dummy_file_name
,
'w'
)
as
fw
:
fw
.
writelines
([
'from six.moves import urllib
\n
'
,
'opener = urllib.request.build_opener()
\n
'
,
'opener.addheaders = [("User-agent", "Mozilla/5.0")]
\n
'
,
'urllib.request.install_opener(opener)
\n\n
'
])
fw
.
write
(
firstline
)
for
line
in
fr
:
fw
.
write
(
line
)
if
os
.
path
.
exists
(
dummy_file_name
):
os
.
remove
(
file_name
)
os
.
rename
(
dummy_file_name
,
file_name
)
pipelines/fast-test.yml
View file @
2d4fdfb2
...
@@ -164,6 +164,12 @@ stages:
...
@@ -164,6 +164,12 @@ stages:
python -m pip install -e .[SMAC,BOHB,PPOTuner]
python -m pip install -e .[SMAC,BOHB,PPOTuner]
displayName
:
Install extra dependencies
displayName
:
Install extra dependencies
# Need del later
-
script
:
|
set -e
python interim_vision_patch.py
displayName
:
Vision MNIST Patch
-
script
:
|
-
script
:
|
set -e
set -e
cd test
cd test
...
@@ -243,6 +249,13 @@ stages:
...
@@ -243,6 +249,13 @@ stages:
python -m pip install -e .[SMAC,BOHB,PPOTuner]
python -m pip install -e .[SMAC,BOHB,PPOTuner]
displayName
:
Install extra dependencies
displayName
:
Install extra dependencies
# Need del later
-
script
:
|
set -e
python interim_vision_patch.py
displayName
:
Vision MNIST Patch
-
script
:
|
-
script
:
|
cd test
cd test
python nni_test/nnitest/run_tests.py --config config/pr_tests.yml
python nni_test/nnitest/run_tests.py --config config/pr_tests.yml
...
@@ -325,6 +338,12 @@ stages:
...
@@ -325,6 +338,12 @@ stages:
python -m pip install -e .[SMAC,BOHB,PPOTuner]
python -m pip install -e .[SMAC,BOHB,PPOTuner]
displayName
:
Install extra dependencies
displayName
:
Install extra dependencies
# Need del later
-
script
:
|
set -e
python interim_vision_patch.py
displayName
:
Vision MNIST Patch
-
script
:
|
-
script
:
|
cd test
cd test
python -m pytest ut
python -m pytest ut
...
@@ -381,6 +400,12 @@ stages:
...
@@ -381,6 +400,12 @@ stages:
python -m pip install -r dependencies/recommended.txt
python -m pip install -r dependencies/recommended.txt
displayName
:
Install extra dependencies
displayName
:
Install extra dependencies
# Need del later
-
script
:
|
set -e
python interim_vision_patch.py
displayName
:
Vision MNIST Patch
-
script
:
|
-
script
:
|
cd test
cd test
python -m pytest ut
python -m pytest ut
...
...
pipelines/full-test-linux.yml
View file @
2d4fdfb2
...
@@ -38,6 +38,12 @@ jobs:
...
@@ -38,6 +38,12 @@ jobs:
sudo apt-get install swig -y
sudo apt-get install swig -y
displayName
:
Install extra dependencies
displayName
:
Install extra dependencies
# Need del later
-
script
:
|
set -e
python3 interim_vision_patch.py
displayName
:
Vision MNIST Patch
-
script
:
|
-
script
:
|
set -e
set -e
cd examples/tuners/customized_tuner
cd examples/tuners/customized_tuner
...
...
pipelines/full-test-windows.yml
View file @
2d4fdfb2
...
@@ -32,6 +32,12 @@ jobs:
...
@@ -32,6 +32,12 @@ jobs:
python -m pip install tensorflow==2.3.1 tensorflow-estimator==2.3.0
python -m pip install tensorflow==2.3.1 tensorflow-estimator==2.3.0
displayName
:
Install extra dependencies
displayName
:
Install extra dependencies
# Need del later
-
script
:
|
set -e
python interim_vision_patch.py
displayName
:
Vision MNIST Patch
-
script
:
|
-
script
:
|
cd examples/tuners/customized_tuner
cd examples/tuners/customized_tuner
python setup.py develop --user
python setup.py develop --user
...
...
pipelines/integration-test-openpai-linux.yml
View file @
2d4fdfb2
...
@@ -79,7 +79,7 @@ jobs:
...
@@ -79,7 +79,7 @@ jobs:
--pai_reuse true \
--pai_reuse true \
--pai_host https://ne.openpai.org \
--pai_host https://ne.openpai.org \
--pai_user $(pai_user) \
--pai_user $(pai_user) \
--nni_docker_image nnidev/nni-
it-pai:latest
\
--nni_docker_image nnidev/nni-
nightly
\
--pai_storage_config_name confignfs-data \
--pai_storage_config_name confignfs-data \
--pai_token $(pai_token) \
--pai_token $(pai_token) \
--nni_manager_nfs_mount_path /home/quzha/mnt-pai-ne/shinyang3 \
--nni_manager_nfs_mount_path /home/quzha/mnt-pai-ne/shinyang3 \
...
...
pipelines/integration-test-remote-l2l.yml
View file @
2d4fdfb2
...
@@ -66,6 +66,16 @@ jobs:
...
@@ -66,6 +66,16 @@ jobs:
displayName
:
Copy test scripts to remote machine
displayName
:
Copy test scripts to remote machine
timeoutInMinutes
:
10
timeoutInMinutes
:
10
# Need del later
-
task
:
CopyFilesOverSSH@0
inputs
:
sshEndpoint
:
$(worker)
contents
:
interim_vision_patch.py
targetFolder
:
/tmp/nnitest/$(Build.BuildId)
overwrite
:
true
displayName
:
Copy vision patch to remote machine
timeoutInMinutes
:
10
-
task
:
SSH@0
-
task
:
SSH@0
inputs
:
inputs
:
sshEndpoint
:
$(worker)
sshEndpoint
:
$(worker)
...
...
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