This repository has been archived by the owner on Sep 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Fix bugs found in integration test #3214
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ data | |
checkpoints | ||
runs | ||
nni_auto_gen_search_space.json | ||
checkpoint.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Copyright (c) Microsoft Corporation. | ||
# Licensed under the MIT license. | ||
|
||
import os | ||
from pathlib import Path | ||
import shutil | ||
import sys | ||
|
||
import nni | ||
|
||
def get_config_directory() -> Path: | ||
""" | ||
Get NNI config directory. | ||
Create it if not exist. | ||
""" | ||
if sys.prefix != sys.base_prefix or Path(sys.prefix, 'conda-meta').is_dir(): | ||
config_dir = Path(sys.prefix, 'nni') | ||
elif sys.platform == 'win32': | ||
config_dir = Path(os.environ['APPDATA'], 'nni') | ||
else: | ||
config_dir = Path.home() / '.config/nni' | ||
config_dir.mkdir(parents=True, exist_ok=True) | ||
return config_dir | ||
|
||
def get_config_file(name: str) -> Path: | ||
""" | ||
Get an NNI config file. | ||
Copy from `nni/runtime/default_config` if not exist. | ||
""" | ||
config_file = get_config_directory() / name | ||
if not config_file.exists(): | ||
default = Path(nni.__path__[0], 'runtime/default_config', name) | ||
shutil.copyfile(default, config_file) | ||
return config_file |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
trigger: none | ||
pr: none | ||
schedules: | ||
- cron: 0 16 * * * | ||
branches: | ||
include: [ master ] | ||
|
||
# variables set on VSO: (mostly for security concern) | ||
# manager_ip | ||
# docker_hub_password | ||
|
||
jobs: | ||
- job: frameworkcontroller | ||
pool: NNI CI KUBE CLI | ||
timeoutInMinutes: 120 | ||
|
||
steps: | ||
- script: | | ||
echo "Working directory: ${PWD}" | ||
echo "##vso[task.setvariable variable=PATH]${PATH}:${HOME}/.local/bin" | ||
python3 test/vso_tools/generate_nni_version.py | ||
python3 -m pip install --upgrade pip setuptools | ||
displayName: Prepare | ||
|
||
- script: | | ||
set -e | ||
python3 test/vso_tools/install_nni.py $(NNI_RELEASE) SMAC,BOHB | ||
cd examples/tuners/customized_tuner | ||
python3 setup.py develop --user | ||
nnictl algo register --meta meta_file.yml | ||
displayName: Install NNI | ||
|
||
- script: | | ||
set -e | ||
docker login -u nnidev -p $(docker_hub_password) | ||
docker build --build-arg NNI_RELEASE=$(NNI_RELEASE) -t nnidev/nni-nightly . | ||
docker push nnidev/nni-nightly | ||
displayName: Build and upload docker image | ||
|
||
- script: | | ||
set -e | ||
cd test | ||
python3 nni_test/nnitest/generate_ts_config.py \ | ||
--ts frameworkcontroller \ | ||
--keyvault_vaultname NNIKeyVault \ | ||
--keyvault_name AzureStorageAccountKey \ | ||
--azs_account nniazurestorage \ | ||
--azs_share nni \ | ||
--nni_docker_image nnidev/nni-nightly \ | ||
--nni_manager_ip $(manager_ip) | ||
python3 nni_test/nnitest/run_tests.py --config config/integration_tests.yml --ts frameworkcontroller --exclude multi-phase | ||
displayName: Integration test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
trigger: none | ||
pr: none | ||
schedules: | ||
- cron: 0 16 * * * | ||
branches: | ||
include: [ master ] | ||
|
||
# variables set on VSO: (mostly for security concern) | ||
# manager_ip | ||
# docker_hub_password | ||
|
||
jobs: | ||
- job: kubeflow | ||
pool: NNI CI KUBE CLI | ||
timeoutInMinutes: 120 | ||
|
||
steps: | ||
- script: | | ||
export NNI_RELEASE=999.$(date -u +%Y%m%d%H%M%S) | ||
echo "##vso[task.setvariable variable=PATH]${PATH}:${HOME}/.local/bin" | ||
echo "##vso[task.setvariable variable=NNI_RELEASE]${NNI_RELEASE}" | ||
|
||
echo "Working directory: ${PWD}" | ||
echo "NNI version: ${NNI_RELEASE}" | ||
|
||
python3 -m pip install --upgrade pip setuptools | ||
displayName: Prepare | ||
|
||
- script: | | ||
set -e | ||
python3 setup.py build_ts | ||
python3 setup.py bdist_wheel -p manylinux1_x86_64 | ||
python3 -m pip install dist/nni-$(NNI_RELEASE)-py3-none-manylinux1_x86_64.whl[SMAC,BOHB] | ||
displayName: Build and install NNI | ||
|
||
- script: | | ||
set -e | ||
cd examples/tuners/customized_tuner | ||
python3 setup.py develop --user | ||
nnictl algo register --meta meta_file.yml | ||
displayName: Install customized tuner | ||
|
||
- script: | | ||
set -e | ||
docker login -u nnidev -p $(docker_hub_password) | ||
docker build --build-arg NNI_RELEASE=$(NNI_RELEASE) -t nnidev/nni-nightly . | ||
docker push nnidev/nni-nightly | ||
displayName: Build and upload docker image | ||
|
||
- script: | | ||
set -e | ||
cd test | ||
python3 nni_test/nnitest/generate_ts_config.py \ | ||
--ts kubeflow \ | ||
--keyvault_vaultname NNIKeyVault \ | ||
--keyvault_name AzureStorageAccountKey \ | ||
--azs_account nniazurestorage \ | ||
--azs_share nni \ | ||
--nni_docker_image nnidev/nni-nightly \ | ||
--nni_manager_ip $(manager_ip) | ||
python3 nni_test/nnitest/run_tests.py --config config/integration_tests.yml --ts kubeflow --exclude multi-phase | ||
displayName: Integration test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,37 +26,30 @@ jobs: | |
echo "NNI version: ${NNI_RELEASE}" | ||
echo "Build docker image: $(build_docker_image)" | ||
|
||
python3 -m pip install -U --upgrade pip setuptools | ||
python3 -m pip install --upgrade pip setuptools | ||
displayName: Prepare | ||
|
||
- script: | | ||
set -e | ||
python3 setup.py build_ts | ||
python3 setup.py bdist_wheel -p manylinux1_x86_64 | ||
python3 -m pip install -U dist/nni-${NNI_RELEASE}-py3-none-manylinux1_x86_64.whl | ||
python3 -m pip install dist/nni-${NNI_RELEASE}-py3-none-manylinux1_x86_64.whl[SMAC,BOHB] | ||
displayName: Build and install NNI | ||
|
||
- script: | | ||
set -e | ||
sudo apt-get install swig -y | ||
nnictl package install --name=SMAC | ||
nnictl package install --name=BOHB | ||
displayName: Install extra tuners | ||
|
||
- script: | | ||
set -e | ||
cd examples/tuners/customized_tuner | ||
python3 setup.py develop --user | ||
nnictl package install . | ||
nnictl algo register --meta meta_file.yml | ||
displayName: Install customized tuner | ||
|
||
- script: | | ||
set -e | ||
docker login -u nnidev -p $(docker_hub_password) | ||
echo '## Build docker image ##' | ||
docker build --build-arg NNI_RELEASE=${NNI_RELEASE} -t nnidev/nni-it-pai:latest . | ||
docker build --build-arg NNI_RELEASE=${NNI_RELEASE} -t nnidev/nni-nightly . | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nightly? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Each day scheduled pipelines will build and push several docker images with same content. So it's effectively the nightly version. |
||
echo '## Upload docker image ##' | ||
docker push nnidev/nni-it-pai:latest | ||
docker push nnidev/nni-nightly | ||
condition: eq(variables['build_docker_image'], 'true') | ||
displayName: Build and upload docker image | ||
|
||
|
@@ -68,7 +61,7 @@ jobs: | |
--pai_reuse false \ | ||
--pai_host https://ne.openpai.org \ | ||
--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_token $(pai_token) \ | ||
--nni_manager_nfs_mount_path /home/quzha/mnt-pai-ne/shinyang3 \ | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why remove
-U
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because it's duplicate to
--upgrade
.I mistakenly thought it was
--user
.