From 2ba38a2c0a59d4a4c297bacac156b787f2a135f3 Mon Sep 17 00:00:00 2001 From: chicm-ms <38930155+chicm-ms@users.noreply.github.com> Date: Mon, 11 Mar 2019 11:43:49 +0800 Subject: [PATCH 1/2] Fix integration test dependencies (#822) * Install dependencies for PAI/k8s IT * updates --- test/pipelines-it-kubeflow.yml | 10 ++++++++++ test/pipelines-it-pai.yml | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/test/pipelines-it-kubeflow.yml b/test/pipelines-it-kubeflow.yml index 5314dd7ce3..b7f86a968a 100644 --- a/test/pipelines-it-kubeflow.yml +++ b/test/pipelines-it-kubeflow.yml @@ -38,6 +38,16 @@ jobs: source install.sh displayName: 'Install nni toolkit via source code' + - script: | + python3 -m pip install scikit-learn==0.20.0 --user + python3 -m pip install torch==0.4.1 --user + python3 -m pip install torchvision==0.2.1 --user + python3 -m pip install keras==2.1.6 --user + python3 -m pip install tensorflow-gpu==1.10.0 --user + sudo apt-get install swig -y + nnictl package install --name=SMAC + displayName: 'Install dependencies for integration tests in Kubeflow mode' + - script: | if [ $(build_docker_img) = 'true' ] then diff --git a/test/pipelines-it-pai.yml b/test/pipelines-it-pai.yml index 7a58eb6cba..5c8f7a9dcc 100644 --- a/test/pipelines-it-pai.yml +++ b/test/pipelines-it-pai.yml @@ -38,6 +38,16 @@ jobs: source install.sh displayName: 'Install nni toolkit via source code' + - script: | + python3 -m pip install scikit-learn==0.20.0 --user + python3 -m pip install torch==0.4.1 --user + python3 -m pip install torchvision==0.2.1 --user + python3 -m pip install keras==2.1.6 --user + python3 -m pip install tensorflow-gpu==1.10.0 --user + sudo apt-get install swig -y + nnictl package install --name=SMAC + displayName: 'Install dependencies for integration tests in PAI mode' + - script: | if [ $(build_docker_img) = 'true' ] then From 9002e2268c19807018fba8c3007e5713e7ef272d Mon Sep 17 00:00:00 2001 From: Chengmin Chi Date: Tue, 12 Mar 2019 10:26:26 +0800 Subject: [PATCH 2/2] Refactoring test pipelines --- azure-pipelines.yml | 28 ++++++++------------------- test/pipelines-it-local.yml | 38 +++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 20 deletions(-) create mode 100644 test/pipelines-it-local.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 7e99de3489..10e2f21138 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,10 +1,11 @@ -trigger: -- master -- dev-remote-ci - jobs: -- job: 'Ubuntu_16_04' - pool: 'NNI CI GPU' +- job: 'basic_test_pr_ubuntu' + pool: + vmImage: 'Ubuntu 16.04' + strategy: + matrix: + Python36: + PYTHON_VERSION: '3.6' steps: - script: python3 -m pip install --upgrade pip setuptools --user @@ -12,15 +13,6 @@ jobs: - script: | source install.sh displayName: 'Install nni toolkit via source code' - - script: | - python3 -m pip install scikit-learn==0.20.0 --user - python3 -m pip install torch==0.4.1 --user - python3 -m pip install torchvision==0.2.1 --user - python3 -m pip install keras==2.1.6 --user - python3 -m pip install tensorflow-gpu==1.10.0 --user - sudo apt-get install swig -y - nnictl package install --name=SMAC - displayName: 'Install dependencies for integration tests' - script: | cd test source unittest.sh @@ -33,16 +25,12 @@ jobs: cd test PATH=$HOME/.local/bin:$PATH python3 tuner_test.py displayName: 'Built-in tuners / assessors tests' - - script: | - cd test - PATH=$HOME/.local/bin:$PATH python3 config_test.py --ts local --local_gpu - displayName: 'Examples and advanced features tests on local machine' - script: | cd test PATH=$HOME/.local/bin:$PATH python3 metrics_test.py displayName: 'Trial job metrics test' -- job: 'macOS_10_13' +- job: 'basic_test_pr_macOS' pool: vmImage: 'macOS 10.13' strategy: diff --git a/test/pipelines-it-local.yml b/test/pipelines-it-local.yml new file mode 100644 index 0000000000..e10dd014bd --- /dev/null +++ b/test/pipelines-it-local.yml @@ -0,0 +1,38 @@ +jobs: +- job: 'integration_test_local_ubuntu' + + 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: | + python3 -m pip install scikit-learn==0.20.0 --user + python3 -m pip install torch==0.4.1 --user + python3 -m pip install torchvision==0.2.1 --user + python3 -m pip install keras==2.1.6 --user + python3 -m pip install tensorflow-gpu==1.10.0 --user + sudo apt-get install swig -y + nnictl package install --name=SMAC + displayName: 'Install dependencies for integration tests' + - script: | + cd test + source unittest.sh + displayName: 'Unit test' + - script: | + cd test + PATH=$HOME/.local/bin:$PATH python3 naive_test.py + displayName: 'Naive test' + - script: | + cd test + PATH=$HOME/.local/bin:$PATH python3 tuner_test.py + displayName: 'Built-in tuners / assessors tests' + - script: | + cd test + PATH=$HOME/.local/bin:$PATH python3 config_test.py --ts local --local_gpu + displayName: 'Examples and advanced features tests on local machine' + - script: | + cd test + PATH=$HOME/.local/bin:$PATH python3 metrics_test.py + displayName: 'Trial job metrics test'