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
b9c65391
"vscode:/vscode.git/clone" did not exist on "71434918bf223396f0c3e067c75bef7d547c5bb1"
Unverified
Commit
b9c65391
authored
Jan 13, 2021
by
Yuge Zhang
Committed by
GitHub
Jan 13, 2021
Browse files
Fix sqlite3 build on pipeline (#3295)
parent
93457237
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
3 additions
and
929 deletions
+3
-929
deployment/deployment-pipelines.yml
deployment/deployment-pipelines.yml
+0
-238
setup_ts.py
setup_ts.py
+3
-2
test/pipelines/pipelines-it-frameworkcontroller.yml
test/pipelines/pipelines-it-frameworkcontroller.yml
+0
-69
test/pipelines/pipelines-it-installation.yml
test/pipelines/pipelines-it-installation.yml
+0
-41
test/pipelines/pipelines-it-kubeflow.yml
test/pipelines/pipelines-it-kubeflow.yml
+0
-68
test/pipelines/pipelines-it-local-tf2.yml
test/pipelines/pipelines-it-local-tf2.yml
+0
-37
test/pipelines/pipelines-it-local-windows.yml
test/pipelines/pipelines-it-local-windows.yml
+0
-28
test/pipelines/pipelines-it-local.yml
test/pipelines/pipelines-it-local.yml
+0
-45
test/pipelines/pipelines-it-pai-windows.yml
test/pipelines/pipelines-it-pai-windows.yml
+0
-80
test/pipelines/pipelines-it-pai.yml
test/pipelines/pipelines-it-pai.yml
+0
-70
test/pipelines/pipelines-it-paiYarn.yml
test/pipelines/pipelines-it-paiYarn.yml
+0
-61
test/pipelines/pipelines-it-remote-linux-to-linux.yml
test/pipelines/pipelines-it-remote-linux-to-linux.yml
+0
-75
test/pipelines/pipelines-it-remote-linux-to-windows.yml
test/pipelines/pipelines-it-remote-linux-to-windows.yml
+0
-55
test/pipelines/pipelines-it-remote-windows-to-linux.yml
test/pipelines/pipelines-it-remote-windows-to-linux.yml
+0
-60
No files found.
deployment/deployment-pipelines.yml
deleted
100644 → 0
View file @
93457237
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
jobs
:
-
job
:
'
version_number_validation'
pool
:
vmImage
:
'
Ubuntu
16.04'
strategy
:
matrix
:
Python36
:
PYTHON_VERSION
:
'
3.6'
steps
:
-
script
:
|
echo $(build_version)
if [[ $(build_version) =~ ^v[0-9](.[0-9]){1,3}$ ]]; then
echo 'valid build version $(build_version)'
echo `git describe --tags --abbrev=0`
else
echo 'invalid build version $(build_version)'
exit 1
fi
condition
:
eq( variables['build_type'], 'prerelease' )
displayName
:
'
Validate
prerelease
version
number'
-
script
:
|
export BRANCH_TAG=`git describe --tags --abbrev=0`
echo $BRANCH_TAG
if [[ $BRANCH_TAG = $(build_version) && $BRANCH_TAG =~ ^v[0-9](.[0-9]){1,3}$ ]]; then
echo 'Build version match branch tag'
else
echo 'Build version does not match branch tag'
exit 1
fi
condition
:
eq( variables['build_type'], 'release' )
displayName
:
'
Validate
release
version
number
and
branch
tag'
-
job
:
'
Build_upload_nni_ubuntu'
dependsOn
:
version_number_validation
condition
:
succeeded()
pool
:
vmImage
:
'
Ubuntu
16.04'
strategy
:
matrix
:
Python36
:
PYTHON_VERSION
:
'
3.6'
steps
:
-
script
:
|
python3 -m pip install --upgrade pip setuptools --user
python3 -m pip install twine --user
displayName
:
'
Install
twine'
-
script
:
|
cd deployment/pypi
if [ $(build_type) = 'prerelease' ]
then
# NNI build scripts (Makefile) uses branch tag as package version number
git tag $(build_version)
echo 'building prerelease package...'
make version_ts=true build
else
echo 'building release package...'
make build
fi
condition
:
eq( variables['upload_package'], 'true')
displayName
:
'
build
nni
bdsit_wheel'
-
script
:
|
cd deployment/pypi
if [ $(build_type) = 'prerelease' ]
then
echo 'uploading prerelease package to testpypi...'
python3 -m twine upload -u $(testpypi_user) -p $(testpypi_pwd) --repository-url https://test.pypi.org/legacy/ dist/*
else
echo 'uploading release package to pypi...'
python3 -m twine upload -u $(pypi_user) -p $(pypi_pwd) dist/*
fi
condition
:
eq( variables['upload_package'], 'true')
displayName
:
'
upload
nni
package
to
pypi/testpypi'
-
script
:
|
cd deployment/docker
if [ $(build_type) = 'prerelease' ]
then
docker login -u $(docker_hub_dev_user) -p $(docker_hub_dev_pwd)
export IMG_NAME=$(dev_docker_img)
export IMG_TAG=`git describe --tags --abbrev=0`.`date -u +%y%m%d%H%M`
echo 'updating docker file for testpyi...'
sed -ie 's/RUN python3 -m pip --no-cache-dir install nni/RUN python3 -m pip install --no-cache-dir --index-url https:\/\/test.pypi.org\/simple --extra-index-url https:\/\/pypi.org\/simple nni/' Dockerfile
else
docker login -u $(docker_hub_user) -p $(docker_hub_pwd)
export IMG_NAME=msranni/nni
export IMG_TAG=`git describe --tags --abbrev=0`
fi
echo $IMG_NAME:$IMG_TAG
cat Dockerfile
docker build -f Dockerfile -t $IMG_NAME:$IMG_TAG .
docker push $IMG_NAME:$IMG_TAG
if [ $(update_latest_tag) = 'true' ]
then
docker tag $IMG_NAME:$IMG_TAG $IMG_NAME:latest
docker push $IMG_NAME:latest
fi
condition
:
eq( variables['build_docker_img'], 'true')
displayName
:
'
build
and
upload
nni
docker
image'
-
job
:
'
Build_upload_nni_macos'
dependsOn
:
version_number_validation
condition
:
succeeded()
pool
:
vmImage
:
'
macOS-10.15'
steps
:
-
script
:
|
python3 -m pip install --upgrade pip setuptools --user
python3 -m pip install twine --user
displayName
:
'
Install
twine'
-
script
:
|
make install-dependencies
displayName
:
'
Install
nni
dependencies'
-
script
:
|
cd deployment/pypi
if [ $(build_type) = 'prerelease' ]
then
# NNI build scripts (Makefile) uses branch tag as package version number
git tag $(build_version)
echo 'building prerelease package...'
PATH=$HOME/Library/Python/3.8/bin:$PATH make version_ts=true build
else
echo 'building release package...'
PATH=$HOME/Library/Python/3.8/bin:$PATH make build
fi
condition
:
eq( variables['upload_package'], 'true')
displayName
:
'
build
nni
bdsit_wheel'
-
script
:
|
cd deployment/pypi
if [ $(build_type) = 'prerelease' ]
then
echo 'uploading prerelease package to testpypi...'
python3 -m twine upload -u $(testpypi_user) -p $(testpypi_pwd) --repository-url https://test.pypi.org/legacy/ dist/*
else
echo 'uploading release package to pypi...'
python3 -m twine upload -u $(pypi_user) -p $(pypi_pwd) dist/*
fi
condition
:
eq( variables['upload_package'], 'true')
displayName
:
'
upload
nni
package
to
pypi/testpypi'
-
job
:
'
Build_upload_nni_win32'
dependsOn
:
version_number_validation
condition
:
succeeded()
pool
:
vmImage
:
'
vs2017-win2016'
strategy
:
matrix
:
Python36
:
PYTHON_VERSION
:
'
3.6'
steps
:
-
powershell
:
|
python -m pip install --upgrade pip setuptools
python -m pip install twine
displayName
:
'
Install
twine'
-
powershell
:
|
cd deployment\pypi
if($env:BUILD_TYPE -eq 'prerelease'){
# NNI build scripts (powershell) uses branch tag as package version number
git tag $env:BUILD_VERSION
Write-Host 'building prerelease package...'
.\install.ps1 -version_os 32 -version_ts $True
}
else{
Write-Host 'building release package...'
.\install.ps1 -version_os 32 -version_ts $False
}
condition
:
eq( variables['upload_package'], 'true')
displayName
:
'
build
nni
bdsit_wheel'
-
powershell
:
|
cd deployment\pypi
if($env:BUILD_TYPE -eq 'prerelease'){
Write-Host 'uploading prerelease package to testpypi...'
python -m twine upload -u $(testpypi_user) -p $(testpypi_pwd) --repository-url https://test.pypi.org/legacy/ dist/*
}
else{
Write-Host 'uploading release package to pypi...'
python -m twine upload -u $(pypi_user) -p $(pypi_pwd) dist/*
}
condition
:
eq( variables['upload_package'], 'true')
displayName
:
'
upload
nni
package
to
pypi/testpypi'
-
job
:
'
Build_upload_nni_win_amd64'
dependsOn
:
version_number_validation
condition
:
succeeded()
pool
:
vmImage
:
'
vs2017-win2016'
strategy
:
matrix
:
Python36
:
PYTHON_VERSION
:
'
3.6'
steps
:
-
powershell
:
|
python -m pip install --upgrade pip setuptools
python -m pip install twine
displayName
:
'
Install
twine'
-
powershell
:
|
cd deployment\pypi
if($env:BUILD_TYPE -eq 'prerelease'){
# NNI build scripts (powershell) uses branch tag as package version number
git tag $env:BUILD_VERSION
Write-Host 'building prerelease package...'
.\install.ps1 -version_os 64 -version_ts $True
}
else{
Write-Host 'building release package...'
.\install.ps1 -version_os 64 -version_ts $False
}
condition
:
eq( variables['upload_package'], 'true')
displayName
:
'
build
nni
bdsit_wheel'
-
powershell
:
|
cd deployment\pypi
if($env:BUILD_TYPE -eq 'prerelease'){
Write-Host 'uploading prerelease package to testpypi...'
python -m twine upload -u $(testpypi_user) -p $(testpypi_pwd) --repository-url https://test.pypi.org/legacy/ dist/*
}
else{
Write-Host 'uploading release package to pypi...'
python -m twine upload -u $(pypi_user) -p $(pypi_pwd) dist/*
}
condition
:
eq( variables['upload_package'], 'true')
displayName
:
'
upload
nni
package
to
pypi/testpypi'
setup_ts.py
View file @
b9c65391
...
@@ -196,6 +196,7 @@ def copy_nni_node(version):
...
@@ -196,6 +196,7 @@ def copy_nni_node(version):
package_json
[
'version'
]
=
version
package_json
[
'version'
]
=
version
json
.
dump
(
package_json
,
open
(
'nni_node/package.json'
,
'w'
),
indent
=
2
)
json
.
dump
(
package_json
,
open
(
'nni_node/package.json'
,
'w'
),
indent
=
2
)
# reinstall without development dependencies
_yarn
(
'ts/nni_manager'
,
'--prod'
,
'--cwd'
,
str
(
Path
(
'nni_node'
).
resolve
()))
_yarn
(
'ts/nni_manager'
,
'--prod'
,
'--cwd'
,
str
(
Path
(
'nni_node'
).
resolve
()))
shutil
.
copytree
(
'ts/webui/build'
,
'nni_node/static'
)
shutil
.
copytree
(
'ts/webui/build'
,
'nni_node/static'
)
...
@@ -226,9 +227,9 @@ def _symlink(target_file, link_location):
...
@@ -226,9 +227,9 @@ def _symlink(target_file, link_location):
def
_print
(
*
args
):
def
_print
(
*
args
):
if
sys
.
platform
==
'win32'
:
if
sys
.
platform
==
'win32'
:
print
(
*
args
)
print
(
*
args
,
flush
=
True
)
else
:
else
:
print
(
'
\033
[1;36m#'
,
*
args
,
'
\033
[0m'
)
print
(
'
\033
[1;36m#'
,
*
args
,
'
\033
[0m'
,
flush
=
True
)
generated_files
=
[
generated_files
=
[
...
...
test/pipelines/pipelines-it-frameworkcontroller.yml
deleted
100644 → 0
View file @
93457237
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
jobs
:
-
job
:
'
integration_test_frameworkController'
timeoutInMinutes
:
120
steps
:
-
script
:
python3 -m pip install --upgrade pip setuptools --user
displayName
:
'
Install
python
tools'
-
script
:
|
set -e
cd deployment/pypi
if [ -d ./dist ]
then
rm -rf ./dist/*
fi
echo 'building prerelease package...'
make build
ls $(Build.SourcesDirectory)/deployment/pypi/dist/
condition
:
eq( variables['build_docker_img'], 'true' )
displayName
:
'
build
nni
bdsit_wheel'
-
script
:
|
source install.sh
displayName
:
'
Install
nni
toolkit
via
source
code'
-
script
:
|
set -e
sudo apt-get install swig -y
PATH=$HOME/.local/bin:$PATH nnictl package install --name=SMAC
PATH=$HOME/.local/bin:$PATH nnictl package install --name=BOHB
displayName
:
'
Install
dependencies
for
integration
tests
in
frameworkcontroller
mode'
-
script
:
|
set -e
cd examples/tuners/customized_tuner
python3 setup.py develop --user
PATH=$HOME/.local/bin:$PATH nnictl package install ./
displayName
:
'
Install
demotuner
for
customized_tuner
test'
-
script
:
|
set -e
if [ $(build_docker_img) = 'true' ]
then
cd deployment/pypi
docker login -u $(docker_hub_user) -p $(docker_hub_pwd)
echo 'updating docker file for installing nni from local...'
# update Dockerfile to install NNI in docker image from whl file built in last step
sed -ie 's/RUN python3 -m pip --no-cache-dir install nni/COPY .\/dist\/* .\/\nRUN python3 -m pip install nni-*.whl/' ../docker/Dockerfile
cat ../docker/Dockerfile
export IMG_TAG=`date -u +%y%m%d%H%M`
docker build -f ../docker/Dockerfile -t $(test_docker_img_name):$IMG_TAG .
docker push $(test_docker_img_name):$IMG_TAG
export TEST_IMG=$(test_docker_img_name):$IMG_TAG
cd ../../
else
export TEST_IMG=$(existing_docker_img)
fi
echo "TEST_IMG:$TEST_IMG"
cd test
python3 nni_test/nnitest/generate_ts_config.py --ts frameworkcontroller --keyvault_vaultname $(keyVault_vaultName) --keyvault_name $(keyVault_name) \
--azs_account $(azureStorage_accountName) --azs_share $(azureStorage_azureShare) --nni_docker_image $TEST_IMG --nni_manager_ip $(nni_manager_ip)
cat config/training_service.yml
PATH=$HOME/.local/bin:$PATH python3 nni_test/nnitest/run_tests.py --config config/integration_tests.yml --ts frameworkcontroller --exclude multi-phase
displayName
:
'
integration
test'
test/pipelines/pipelines-it-installation.yml
deleted
100644 → 0
View file @
93457237
jobs
:
-
job
:
'
pip_install_ubuntu_python36'
pool
:
vmImage
:
'
ubuntu-18.04'
strategy
:
matrix
:
Python36
:
PYTHON_VERSION
:
'
3.6'
steps
:
-
script
:
|
python3 -V
python3 -m pip install --upgrade pip setuptools --user
python3 -m pip install --upgrade nni --user
displayName
:
'
Install
nni'
-
job
:
'
pip_install_macOS_python3'
pool
:
vmImage
:
'
macOS-latest'
steps
:
-
script
:
|
python3 -V
python3 -m pip install --upgrade pip setuptools --user
python3 -m pip install --upgrade nni --user
displayName
:
'
Install
nni'
-
job
:
'
pip_install_windows_python36'
pool
:
vmImage
:
'
windows-latest'
strategy
:
matrix
:
Python36
:
PYTHON_VERSION
:
'
3.6'
steps
:
-
script
:
|
python -V
python -m pip install --upgrade pip setuptools --user
python -m pip install --upgrade nni --user
displayName
:
'
Install
nni'
test/pipelines/pipelines-it-kubeflow.yml
deleted
100644 → 0
View file @
93457237
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
jobs
:
-
job
:
'
integration_test_kubeflow'
timeoutInMinutes
:
120
steps
:
-
script
:
python3 -m pip install --upgrade pip setuptools --user
displayName
:
'
Install
python
tools'
-
script
:
|
set -e
cd deployment/pypi
if [ -d ./dist ]
then
rm -rf ./dist/*
fi
echo 'building prerelease package...'
make build
ls $(Build.SourcesDirectory)/deployment/pypi/dist/
condition
:
eq( variables['build_docker_img'], 'true' )
displayName
:
'
build
nni
bdsit_wheel'
-
script
:
|
source install.sh
displayName
:
'
Install
nni
toolkit
via
source
code'
-
script
:
|
sudo apt-get install swig -y
PATH=$HOME/.local/bin:$PATH nnictl package install --name=SMAC
PATH=$HOME/.local/bin:$PATH nnictl package install --name=BOHB
displayName
:
'
Install
dependencies
for
integration
tests
in
Kubeflow
mode'
-
script
:
|
set -e
cd examples/tuners/customized_tuner
python3 setup.py develop --user
PATH=$HOME/.local/bin:$PATH nnictl package install ./
displayName
:
'
Install
demotuner
for
customized_tuner
test'
-
script
:
|
set -e
if [ $(build_docker_img) = 'true' ]
then
cd deployment/pypi
docker login -u $(docker_hub_user) -p $(docker_hub_pwd)
echo 'updating docker file for installing nni from local...'
# update Dockerfile to install NNI in docker image from whl file built in last step
sed -ie 's/RUN python3 -m pip --no-cache-dir install nni/COPY .\/dist\/* .\/\nRUN python3 -m pip install nni-*.whl/' ../docker/Dockerfile
cat ../docker/Dockerfile
export IMG_TAG=`date -u +%y%m%d%H%M`
docker build -f ../docker/Dockerfile -t $(test_docker_img_name):$IMG_TAG .
docker push $(test_docker_img_name):$IMG_TAG
export TEST_IMG=$(test_docker_img_name):$IMG_TAG
cd ../../
else
export TEST_IMG=$(existing_docker_img)
fi
echo "TEST_IMG:$TEST_IMG"
cd test
python3 nni_test/nnitest/generate_ts_config.py --ts kubeflow --keyvault_vaultname $(keyVault_vaultName) --keyvault_name $(keyVault_name) \
--azs_account $(azureStorage_accountName) --azs_share $(azureStorage_azureShare) --nni_docker_image $TEST_IMG --nni_manager_ip $(nni_manager_ip)
cat config/training_service.yml
PATH=$HOME/.local/bin:$PATH python3 nni_test/nnitest/run_tests.py --config config/integration_tests.yml --ts kubeflow --exclude multi-phase
displayName
:
'
integration
test'
test/pipelines/pipelines-it-local-tf2.yml
deleted
100644 → 0
View file @
93457237
jobs
:
-
job
:
'
integration_test_local_ubuntu'
timeoutInMinutes
:
120
steps
:
-
script
:
python3 -m pip install --upgrade pip setuptools --user
displayName
:
'
Install
python
tools'
-
script
:
|
source install.sh
displayName
:
'
Install
nni
toolkit
via
source
code'
-
script
:
|
set -e
python3 -m pip install scikit-learn==0.23.2 --user
python3 -m pip install torch==1.3.1 torchvision==0.4.2 -f https://download.pytorch.org/whl/torch_stable.html --user
python3 -m pip install tensorflow-gpu==2.2.0 tensorflow-estimator==2.2.0 --force --user
python3 -m pip install keras==2.4.2 --user
sudo apt-get install swig -y
PATH=$HOME/.local/bin:$PATH nnictl package install --name=SMAC
PATH=$HOME/.local/bin:$PATH nnictl package install --name=BOHB
PATH=$HOME/.local/bin:$PATH nnictl package install --name=PPOTuner
displayName
:
'
Install
dependencies
for
integration
tests'
-
script
:
|
cd test
source scripts/unittest.sh
displayName
:
'
Unit
test'
-
script
:
|
cd test
PATH=$HOME/.local/bin:$PATH python3 nni_test/nnitest/run_tests.py --config config/integration_tests_tf2.yml --ts local
displayName
:
'
Integration
test'
-
script
:
|
cd test
PATH=$HOME/.local/bin:$PATH source scripts/nas.sh
displayName
:
'
NAS
test'
-
script
:
|
cd test
source scripts/model_compression.sh
displayName
:
'
Model
compression
test'
test/pipelines/pipelines-it-local-windows.yml
deleted
100644 → 0
View file @
93457237
jobs
:
-
job
:
'
integration_test_local_windows'
timeoutInMinutes
:
120
steps
:
-
script
:
|
powershell.exe -file install.ps1
displayName
:
'
Install
nni
toolkit
via
source
code'
-
script
:
|
python -m pip install scikit-learn==0.23.2 --user
python -m pip install keras==2.1.6 --user
python -m pip install torchvision===0.4.1 torch===1.3.1 -f https://download.pytorch.org/whl/torch_stable.html --user
python -m pip install tensorflow-gpu==1.15.2 tensorflow-estimator==1.15.1 --force --user
nnictl package install --name=PPOTuner
displayName
:
'
Install
dependencies
for
integration
tests'
-
script
:
|
cd examples/tuners/customized_tuner
python setup.py develop --user
nnictl package install ./
displayName
:
'
Install
demotuner
for
customized_tuner
test'
-
script
:
|
cd test
powershell.exe -file scripts/unittest.ps1
displayName
:
'
unit
test'
-
script
:
|
cd test
python nni_test/nnitest/run_tests.py --config config/integration_tests.yml --ts local
displayName
:
'
Integration
tests'
test/pipelines/pipelines-it-local.yml
deleted
100644 → 0
View file @
93457237
jobs
:
-
job
:
'
integration_test_local_ubuntu'
timeoutInMinutes
:
120
steps
:
-
script
:
python3 -m pip install --upgrade pip setuptools --user
displayName
:
'
Install
python
tools'
-
script
:
|
source install.sh
displayName
:
'
Install
nni
toolkit
via
source
code'
-
script
:
|
set -e
python3 -m pip install scikit-learn==0.23.2 --user
python3 -m pip install torchvision==0.4.2 --user
python3 -m pip install torch==1.3.1 --user
python3 -m pip install keras==2.1.6 --user
python3 -m pip install tensorflow-gpu==1.15.2 tensorflow-estimator==1.15.1 --force --user
python3 -m pip install thop --user
sudo apt-get install swig -y
PATH=$HOME/.local/bin:$PATH nnictl package install --name=SMAC
PATH=$HOME/.local/bin:$PATH nnictl package install --name=BOHB
PATH=$HOME/.local/bin:$PATH nnictl package install --name=PPOTuner
displayName
:
'
Install
dependencies
for
integration
tests'
-
script
:
|
set -e
cd examples/tuners/customized_tuner
python3 setup.py develop --user
PATH=$HOME/.local/bin:$PATH nnictl package install ./
displayName
:
'
Install
demotuner
for
customized_tuner
test'
-
script
:
|
cd test
source scripts/unittest.sh
displayName
:
'
Unit
test'
-
script
:
|
cd test
PATH=$HOME/.local/bin:$PATH python3 nni_test/nnitest/run_tests.py --config config/integration_tests.yml --ts local
displayName
:
'
Integration
test'
-
script
:
|
cd test
PATH=$HOME/.local/bin:$PATH source scripts/nas.sh
displayName
:
'
NAS
test'
-
script
:
|
cd test
source scripts/model_compression.sh
displayName
:
'
Model
compression
test'
test/pipelines/pipelines-it-pai-windows.yml
deleted
100644 → 0
View file @
93457237
jobs
:
-
job
:
'
build_docker_image'
timeoutInMinutes
:
120
pool
:
vmImage
:
'
Ubuntu
16.04'
steps
:
-
script
:
python3 -m pip install --upgrade pip setuptools --user
displayName
:
'
Install
python
tools'
-
script
:
|
cd deployment/pypi
if [ -d ./dist ]
then
rm -rf ./dist/*
fi
echo 'building prerelease package...'
make build
ls $(Build.SourcesDirectory)/deployment/pypi/dist/
condition
:
eq( variables['build_docker_img'], 'true' )
displayName
:
'
build
nni
bdsit_wheel'
-
script
:
|
set -e
if [ $(build_docker_img) = 'true' ]
then
cd deployment/pypi
docker login -u $(docker_hub_user) -p $(docker_hub_pwd)
echo 'updating docker file for installing nni from local...'
# update Dockerfile to install NNI in docker image from whl file built in last step
sed -ie 's/RUN python3 -m pip --no-cache-dir install nni/COPY .\/dist\/* .\/\nRUN python3 -m pip install nni-*.whl/' ../docker/Dockerfile
cat ../docker/Dockerfile
export IMG_TAG=`date -u +%y%m%d%H%M`
echo 'build and upload docker image'
docker build -f ../docker/Dockerfile -t $(test_docker_img_name):$IMG_TAG .
docker push $(test_docker_img_name):$IMG_TAG
export TEST_IMG=$(test_docker_img_name):$IMG_TAG
cd ../../
else
export TEST_IMG=$(existing_docker_img)
fi
echo "##vso[task.setvariable variable=TEST_IMG]$TEST_IMG"
displayName
:
'
build
docker
image'
-
script
:
echo $TEST_IMG
echo "##vso[task.setvariable variable=docker_image;isOutput=true]$TEST_IMG"
name
:
setvariableStep
displayName
:
'
set
image
variable'
-
job
:
'
integration_test_pai'
timeoutInMinutes
:
0
dependsOn
:
build_docker_image
variables
:
docker_image
:
$[ dependencies.build_docker_image.outputs['setvariableStep.docker_image'] ]
steps
:
-
script
:
|
set PATH=$(ENV_PATH)
python --version
powershell.exe -file install.ps1
displayName
:
'
Install
nni
toolkit
via
source
code'
-
script
:
|
set PATH=$(ENV_PATH)
python -m pip install scikit-learn==0.23.2 --user
displayName
:
'
Install
dependencies
for
integration
tests'
-
script
:
|
set PATH=$(ENV_PATH)
cd examples/tuners/customized_tuner
python setup.py develop --user
nnictl package install ./
displayName
:
'
Install
demotuner
for
customized_tuner
test'
-
script
:
|
cd test
set PATH=$(ENV_PATH)
python --version
mount -o anon $(pai_nfs_uri) $(local_nfs_uri)
python nni_test/nnitest/generate_ts_config.py --ts pai --pai_token $(pai_token) --pai_host $(pai_host) --pai_user $(pai_user) --nni_docker_image $(docker_image) --pai_storage_config_name $(pai_storage_config_name) --nni_manager_nfs_mount_path $(nni_manager_nfs_mount_path) --container_nfs_mount_path $(container_nfs_mount_path) --nni_manager_ip $(nni_manager_ip) --vc $(virtual_cluster)
python nni_test/nnitest/run_tests.py --config config/integration_tests.yml --ts pai
displayName
:
'
Examples
and
advanced
features
tests
on
pai'
test/pipelines/pipelines-it-pai.yml
deleted
100644 → 0
View file @
93457237
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
jobs
:
-
job
:
'
integration_test_pai'
timeoutInMinutes
:
120
steps
:
-
script
:
python3 -m pip install --upgrade pip setuptools --user
displayName
:
'
Install
python
tools'
-
script
:
|
set -e
cd deployment/pypi
if [ -d ./dist ]
then
rm -rf ./dist/*
fi
echo 'building prerelease package...'
make build
ls $(Build.SourcesDirectory)/deployment/pypi/dist/
condition
:
eq( variables['build_docker_img'], 'true' )
displayName
:
'
build
nni
bdsit_wheel'
-
script
:
|
source install.sh
displayName
:
'
Install
nni
toolkit
via
source
code'
-
script
:
|
set -e
sudo apt-get install swig -y
PATH=$HOME/.local/bin:$PATH nnictl package install --name=SMAC
PATH=$HOME/.local/bin:$PATH nnictl package install --name=BOHB
displayName
:
'
Install
dependencies
for
integration
tests
in
PAI
mode'
-
script
:
|
set -e
cd examples/tuners/customized_tuner
python3 setup.py develop --user
PATH=$HOME/.local/bin:$PATH nnictl package install ./
displayName
:
'
Install
demotuner
for
customized_tuner
test'
-
script
:
|
set -e
if [ $(build_docker_img) = 'true' ]
then
cd deployment/pypi
docker login -u $(docker_hub_user) -p $(docker_hub_pwd)
echo 'updating docker file for installing nni from local...'
# update Dockerfile to install NNI in docker image from whl file built in last step
sed -ie 's/RUN python3 -m pip --no-cache-dir install nni/COPY .\/dist\/* .\/\nRUN python3 -m pip install nni-*.whl/' ../docker/Dockerfile
cat ../docker/Dockerfile
export IMG_TAG=`date -u +%y%m%d%H%M`
echo 'build and upload docker image'
docker build -f ../docker/Dockerfile -t $(test_docker_img_name):$IMG_TAG .
docker push $(test_docker_img_name):$IMG_TAG
export TEST_IMG=$(test_docker_img_name):$IMG_TAG
cd ../../
else
export TEST_IMG=$(existing_docker_img)
fi
echo "TEST_IMG:$TEST_IMG"
cd test
python3 nni_test/nnitest/generate_ts_config.py --ts pai --pai_reuse $(pai_reuse) --pai_host $(pai_host) --pai_user $(pai_user) --nni_docker_image $TEST_IMG --pai_storage_config_name $(pai_storage_config_name)\
--pai_token $(pai_token) --nni_manager_nfs_mount_path $(nni_manager_nfs_mount_path) --container_nfs_mount_path $(container_nfs_mount_path) --nni_manager_ip $(nni_manager_ip) --vc $(virtual_cluster)
PATH=$HOME/.local/bin:$PATH python3 nni_test/nnitest/run_tests.py --config config/integration_tests.yml --ts pai
displayName
:
'
integration
test'
test/pipelines/pipelines-it-paiYarn.yml
deleted
100644 → 0
View file @
93457237
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
jobs
:
-
job
:
'
integration_test_paiYarn'
timeoutInMinutes
:
0
steps
:
-
script
:
python3 -m pip install --upgrade pip setuptools --user
displayName
:
'
Install
python
tools'
-
script
:
|
set -e
cd deployment/pypi
echo 'building prerelease package...'
make build
ls $(Build.SourcesDirectory)/deployment/pypi/dist/
condition
:
eq( variables['build_docker_img'], 'true' )
displayName
:
'
build
nni
bdsit_wheel'
-
script
:
|
source install.sh
displayName
:
'
Install
nni
toolkit
via
source
code'
-
script
:
|
set -e
sudo apt-get install swig -y
PATH=$HOME/.local/bin:$PATH nnictl package install --name=SMAC
PATH=$HOME/.local/bin:$PATH nnictl package install --name=BOHB
displayName
:
'
Install
dependencies
for
integration
tests
in
PAI
mode'
-
script
:
|
set -e
if [ $(build_docker_img) = 'true' ]
then
cd deployment/pypi
docker login -u $(docker_hub_user) -p $(docker_hub_pwd)
echo 'updating docker file for installing nni from local...'
# update Dockerfile to install NNI in docker image from whl file built in last step
sed -ie 's/RUN python3 -m pip --no-cache-dir install nni/COPY .\/dist\/* .\nRUN python3 -m pip install nni-*.whl/' ../docker/Dockerfile
cat ../docker/Dockerfile
export IMG_TAG=`date -u +%y%m%d%H%M`
echo 'build and upload docker image'
docker build -f ../docker/Dockerfile -t $(test_docker_img_name):$IMG_TAG .
docker push $(test_docker_img_name):$IMG_TAG
export TEST_IMG=$(test_docker_img_name):$IMG_TAG
cd ../../
else
export TEST_IMG=$(existing_docker_img)
fi
echo "TEST_IMG:$TEST_IMG"
cd test
python3 generate_ts_config.py --ts paiYarn --pai_host $(pai_host) --pai_user $(pai_user) --pai_pwd $(pai_pwd) --vc $(pai_virtual_cluster) \
--nni_docker_image $TEST_IMG --data_dir $(data_dir) --output_dir $(output_dir) --nni_manager_ip $(nni_manager_ip)
PATH=$HOME/.local/bin:$PATH python3 config_test.py --ts paiYarn
PATH=$HOME/.local/bin:$PATH python3 metrics_test.py
displayName
:
'
integration
test'
test/pipelines/pipelines-it-remote-linux-to-linux.yml
deleted
100644 → 0
View file @
93457237
jobs
:
-
job
:
'
integration_test_remote_linux_to_linux'
timeoutInMinutes
:
120
steps
:
-
script
:
python3 -m pip install --upgrade pip setuptools --user
displayName
:
'
Install
python
tools'
-
script
:
|
set -e
cd deployment/pypi
echo 'building prerelease package...'
make build
ls $(Build.SourcesDirectory)/deployment/pypi/dist/
displayName
:
'
build
nni
bdsit_wheel'
-
script
:
|
source install.sh
displayName
:
'
Install
nni
toolkit
via
source
code'
-
script
:
|
set -e
sudo apt-get install swig -y
PATH=$HOME/.local/bin:$PATH nnictl package install --name=SMAC
PATH=$HOME/.local/bin:$PATH nnictl package install --name=BOHB
displayName
:
'
Install
dependencies
for
integration
tests
in
remote
mode'
-
script
:
|
set -e
cd examples/tuners/customized_tuner
python3 setup.py develop --user
PATH=$HOME/.local/bin:$PATH nnictl package install ./
displayName
:
'
Install
demotuner
for
customized_tuner
test'
-
task
:
CopyFilesOverSSH@0
inputs
:
sshEndpoint
:
$(end_point)
sourceFolder
:
deployment/pypi/dist/
targetFolder
:
/tmp/nnitest/$(Build.BuildId)/dist
overwrite
:
true
displayName
:
'
Copy
dist
files
to
remote
machine'
timeoutInMinutes
:
10
-
task
:
CopyFilesOverSSH@0
inputs
:
sshEndpoint
:
$(end_point)
sourceFolder
:
test
targetFolder
:
/tmp/nnitest/$(Build.BuildId)/test
overwrite
:
true
displayName
:
'
Copy
test
files
to
remote
machine'
timeoutInMinutes
:
10
-
task
:
SSH@0
inputs
:
sshEndpoint
:
$(end_point)
runOptions
:
commands
commands
:
python3 /tmp/nnitest/$(Build.BuildId)/test/nni_test/nnitest/remote_docker.py --mode start --name $(Build.BuildId) --image nni/nni
displayName
:
'
Start
docker'
-
task
:
DownloadSecureFile@1
inputs
:
secureFile
:
$(remote_private_key)
-
script
:
|
set -e
cp $(Agent.TempDirectory)/$(remote_private_key) test/id_rsa
chmod 600 test/id_rsa
scp -P $(remote_port) -i test/id_rsa $(remote_user)@$(remote_host):/tmp/nnitest/$(Build.BuildId)/port test/port
cat test/port
displayName
:
'
Get
docker
port'
-
script
:
|
set -e
cd test
python3 nni_test/nnitest/generate_ts_config.py --ts remote --remote_reuse $(remote_reuse) --remote_user $(docker_user) --remote_host $(remote_host) \
--remote_port $(cat port) --remote_pwd $(docker_pwd) --nni_manager_ip $(nni_manager_ip)
cat config/training_service.yml
PATH=$HOME/.local/bin:$PATH python3 nni_test/nnitest/run_tests.py --config config/integration_tests.yml --ts remote
displayName
:
'
integration
test'
-
task
:
SSH@0
inputs
:
sshEndpoint
:
$(end_point)
runOptions
:
commands
commands
:
python3 /tmp/nnitest/$(Build.BuildId)/test/nni_test/nnitest/remote_docker.py --mode stop --name $(Build.BuildId)
displayName
:
'
Stop
docker'
test/pipelines/pipelines-it-remote-linux-to-windows.yml
deleted
100644 → 0
View file @
93457237
jobs
:
-
job
:
"
integration_test_remote_linux_to_windows"
timeoutInMinutes
:
120
steps
:
-
script
:
make clean
displayName
:
"
clean
nni
source
code"
-
task
:
CopyFilesOverSSH@0
inputs
:
sshEndpoint
:
$(end_point)
contents
:
|
**
!**/dist/**
!**/node_modules/**
targetFolder
:
/tmp/nnitest/$(Build.BuildId)
overwrite
:
true
displayName
:
"
Copy
all
files
to
remote
machine"
timeoutInMinutes
:
10
-
task
:
SSH@0
inputs
:
sshEndpoint
:
$(end_point)
runOptions
:
commands
commands
:
cd "\tmp\nnitest\$(Build.BuildId)" && powershell.exe -command "conda activate l2w | .\uninstall.ps1 | .\install.ps1"
failOnStdErr
:
false
displayName
:
"
install
on
remote
windows"
-
script
:
python3 -m pip install --upgrade pip setuptools --user
displayName
:
"
Install
python
tools"
-
script
:
make easy-install
displayName
:
"
Install
nni
via
source
code"
-
script
:
|
set -e
sudo apt-get install swig -y
PATH=$HOME/.local/bin:$PATH nnictl package install --name=SMAC
PATH=$HOME/.local/bin:$PATH nnictl package install --name=BOHB
displayName
:
"
Install
dependencies
for
integration
tests
in
remote
mode"
-
script
:
|
set -e
cd examples/tuners/customized_tuner
python3 setup.py develop --user
PATH=$HOME/.local/bin:$PATH nnictl package install ./
displayName
:
'
Install
demotuner
for
customized_tuner
test'
-
script
:
|
set -e
cd test
python3 nni_test/nnitest/generate_ts_config.py --ts remote --remote_user $(remote_user) --remote_host $(remote_host) \
--remote_port $(remote_port) --remote_pwd $(remote_pwd) --nni_manager_ip $(nni_manager_ip)
cat config/training_service.yml
PATH=$HOME/.local/bin:$PATH python3 nni_test/nnitest/run_tests.py --config config/integration_tests.yml --ts remote
displayName
:
"
integration
test"
-
task
:
SSH@0
inputs
:
sshEndpoint
:
$(end_point)
runOptions
:
commands
commands
:
rmdir /s /q "\\?\c:\tmp\nnitest\$(Build.BuildId)"
condition
:
always()
displayName
:
"
clean
up
on
remote
server"
test/pipelines/pipelines-it-remote-windows-to-linux.yml
deleted
100644 → 0
View file @
93457237
jobs
:
-
job
:
'
integration_test_remote_windows_to_linux'
timeoutInMinutes
:
120
steps
:
-
script
:
python -m pip install --upgrade pip setuptools
displayName
:
'
Install
python
tools'
-
task
:
CopyFilesOverSSH@0
inputs
:
sshEndpoint
:
$(end_point)
targetFolder
:
/tmp/nnitest/$(Build.BuildId)/nni-remote
overwrite
:
true
displayName
:
'
Copy
all
files
to
remote
machine'
timeoutInMinutes
:
10
-
script
:
|
powershell.exe -file install.ps1
displayName
:
'
Install
nni
toolkit
via
source
code'
-
script
:
|
python -m pip install scikit-learn==0.23.2 --user
displayName
:
'
Install
dependencies
for
integration
tests'
-
script
:
|
cd examples/tuners/customized_tuner
python setup.py develop --user
nnictl package install ./
displayName
:
'
Install
demotuner
for
customized_tuner
test'
-
task
:
SSH@0
inputs
:
sshEndpoint
:
$(end_point)
runOptions
:
inline
inline
:
cd /tmp/nnitest/$(Build.BuildId)/nni-remote/deployment/pypi;make build
failOnStdErr
:
false
continueOnError
:
true
displayName
:
'
build
nni
bdsit_wheel'
-
task
:
SSH@0
inputs
:
sshEndpoint
:
$(end_point)
runOptions
:
commands
commands
:
python3 /tmp/nnitest/$(Build.BuildId)/nni-remote/test/nni_test/nnitest/remote_docker.py --mode start --name $(Build.BuildId) --image nni/nni --os windows
displayName
:
'
Start
docker'
-
powershell
:
|
Write-Host "Downloading Putty..."
(New-Object Net.WebClient).DownloadFile("https://the.earth.li/~sgtatham/putty/latest/w64/pscp.exe", "$(Agent.TempDirectory)\pscp.exe")
Write-Host "Download Putty success!"
Write-Host "Connecting to host..."
$(Agent.TempDirectory)\pscp.exe -P $(remote_port) -hostkey $(hostkey) -pw $(pscp_pwd) $(remote_user)@$(remote_host):/tmp/nnitest/$(Build.BuildId)/port test\port
Write-Host "Get port success!"
Get-Content test\port
displayName
:
'
Get
docker
port'
-
powershell
:
|
cd test
python nni_test/nnitest/generate_ts_config.py --ts remote --remote_reuse $(remote_reuse) --remote_user $(docker_user) --remote_host $(remote_host) --remote_port $(Get-Content port) --remote_pwd $(docker_pwd) --nni_manager_ip $(nni_manager_ip)
Get-Content config/training_service.yml
python nni_test/nnitest/run_tests.py --config config/integration_tests.yml --ts remote --exclude cifar10
displayName
:
'
integration
test'
-
task
:
SSH@0
inputs
:
sshEndpoint
:
$(end_point)
runOptions
:
commands
commands
:
python3 /tmp/nnitest/$(Build.BuildId)/nni-remote/test/nni_test/nnitest/remote_docker.py --mode stop --name $(Build.BuildId) --os windows
displayName
:
'
Stop
docker'
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