Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Refactor integration tests #2190

Merged
merged 38 commits into from
Mar 25, 2020
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
d28d719
Refactor integration tests (#2165)
chicm-ms Mar 18, 2020
3c4b3d7
updates (#2166)
chicm-ms Mar 18, 2020
a246a8c
update tuner test (#2167)
chicm-ms Mar 18, 2020
ecd5893
Refactor integration tests (#2168)
chicm-ms Mar 18, 2020
c7c2f2e
update remote pipeline (#2169)
chicm-ms Mar 18, 2020
0c04e78
add torch (#2170)
chicm-ms Mar 18, 2020
e39958f
remove torch (#2172)
chicm-ms Mar 18, 2020
9755275
Model compression test (#2175)
chicm-ms Mar 18, 2020
c358adc
Remove unused files (#2176)
chicm-ms Mar 18, 2020
faf3e19
Fix trialkeeper flush (#2174) (#2177)
chicm-ms Mar 18, 2020
02bd88e
Fix torch version (#2178)
chicm-ms Mar 18, 2020
4d0f032
fix torch version (#2179)
chicm-ms Mar 18, 2020
4fab5b6
Fix nnictl view test (#2180)
chicm-ms Mar 18, 2020
b9eba86
Fix model compression example (#2181)
chicm-ms Mar 18, 2020
0c6c5af
fix remote pipeline (#2182)
chicm-ms Mar 18, 2020
d5d517c
Add dict metrics test (#2186)
chicm-ms Mar 19, 2020
2fad4eb
add test timestamp (#2188)
chicm-ms Mar 19, 2020
e9865b1
disable dict metrics test (#2189)
chicm-ms Mar 19, 2020
cdf78f4
Fix remote windows (#2191)
chicm-ms Mar 19, 2020
4df0b72
change kubeflow IT config (#2192)
chicm-ms Mar 19, 2020
a8c9aeb
Fix windows launch command (#2193)
chicm-ms Mar 19, 2020
210057e
Refine test case names (#2194)
chicm-ms Mar 19, 2020
4c690a1
refactor PR pipeline (#2196)
chicm-ms Mar 19, 2020
df2d84a
replace stop command for win32 (#2197)
chicm-ms Mar 19, 2020
93e5eb7
exclude nnicli on win32 (#2198)
chicm-ms Mar 19, 2020
468a62a
Add nnictl foreground test (#2200)
chicm-ms Mar 20, 2020
d21e95f
add debug info (#2201)
chicm-ms Mar 20, 2020
6bab8eb
Add platform match support (#2205)
chicm-ms Mar 20, 2020
ee4074a
updates trial concurrency (#2206)
chicm-ms Mar 20, 2020
468cf43
refactor tuner tests (#2207)
chicm-ms Mar 21, 2020
0b9de90
rename pr tests (#2208)
chicm-ms Mar 21, 2020
315b50a
Fix batch/grid test cases (#2209)
chicm-ms Mar 21, 2020
ee5b1b7
add missing files (#2210)
chicm-ms Mar 21, 2020
7bce40c
Refactor naive test (#2211)
chicm-ms Mar 21, 2020
88f2ebf
fix config path for win32 (#2212)
chicm-ms Mar 21, 2020
d0168b0
Fix test case trial concurrency (#2213)
chicm-ms Mar 21, 2020
9858637
update test cases (#2214)
chicm-ms Mar 21, 2020
34252b3
clean up (#2227)
chicm-ms Mar 23, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,23 +52,23 @@ jobs:
displayName: 'Run flake8 tests to find Python syntax errors and undefined names'
- script: |
cd test
source unittest.sh
source scripts/unittest.sh
displayName: 'Unit test'
- script: |
cd test
python3 naive_test.py
python3 nni_test/nnitest/naive_test.py
displayName: 'Naive test'
- script: |
cd test
python3 tuner_test.py
displayName: 'Built-in tuners / assessors tests'
python3 nni_test/nnitest/tuner_test.py
displayName: 'Built-in tuners / assessors with naive trial tests'
- script: |
cd test
python3 metrics_test.py
python3 nni_test/nnitest/run_tests.py --config config/integration_tests.yml --cases metrics
displayName: 'Trial job metrics test'
- script: |
cd test
python3 cli_test.py
python3 nni_test/nnitest/run_tests.py --config config/integration_tests.yml --cases nnicli
displayName: 'nnicli test'
- script: |
cd docs/en_US/
Expand Down Expand Up @@ -101,19 +101,19 @@ jobs:
displayName: 'Install dependencies'
- script: |
cd test
source unittest.sh
source scripts/unittest.sh
displayName: 'Unit test'
- script: |
cd test
python3 naive_test.py
python3 nni_test/nnitest/naive_test.py
displayName: 'Naive test'
- script: |
cd test
python3 tuner_test.py
displayName: 'Built-in tuners / assessors tests'
python3 nni_test/nnitest/tuner_test.py
displayName: 'Built-in tuners / assessors with naive trial tests'
- script: |
cd test
python3 cli_test.py
python3 nni_test/nnitest/run_tests.py --config config/integration_tests.yml --cases nnicli
displayName: 'nnicli test'

- job: 'basic_test_pr_Windows'
Expand All @@ -137,13 +137,13 @@ jobs:
displayName: 'Install dependencies'
- script: |
cd test
powershell.exe -file unittest.ps1
powershell.exe -file scripts/unittest.ps1
displayName: 'unit test'
- script: |
cd test
python tuner_test.py
displayName: 'Built-in tuners / assessors tests'
python nni_test/nnitest/tuner_test.py
displayName: 'Built-in tuners / assessors with naive trial tests'
- script: |
cd test
PATH=$HOME/.local/bin:$PATH python3 cli_test.py
python nni_test/nnitest/run_tests.py --config config/integration_tests.yml --cases nnicli
displayName: 'nnicli test'
2 changes: 1 addition & 1 deletion examples/model_compress/model_prune_torch.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
'dataset_name': 'cifar10',
'model_name': 'vgg16',
'pruner_class': ActivationMeanRankFilterPruner,
'configure_list': [{
'config_list': [{
'sparsity': 0.5,
'op_types': ['default'],
'op_names': ['feature.0', 'feature.24', 'feature.27', 'feature.30', 'feature.34', 'feature.37']
Expand Down
39 changes: 0 additions & 39 deletions test/cli_test.py

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
authorName: nni
experimentName: default_test
maxExecDuration: 5m
maxTrialNum: 2
trialConcurrency: 1
maxTrialNum: 8
trialConcurrency: 8
searchSpacePath: search_space.json

tuner:
Expand All @@ -17,12 +17,12 @@ assessor:
start_step: 6
threshold: 0.95
trial:
codeDir: ../../../examples/trials/mnist-tfv1
command: python3 mnist.py --batch_num 100
codeDir: ./
command: python3 trial.py
gpuNum: 0

useAnnotation: false
multiPhase: false
multiThread: false

trainingServicePlatform: local
trainingServicePlatform: local
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,24 @@ authorName: nni
experimentName: default_test
maxExecDuration: 5m
maxTrialNum: 8
trialConcurrency: 4
searchSpacePath: ./search_space.json
trialConcurrency: 8
searchSpacePath: search_space.json

tuner:
builtinTunerName: TPE
classArgs:
optimize_mode: maximize

assessor:
builtinAssessorName: Medianstop
classArgs:
optimize_mode: maximize

trial:
codeDir: .
command: python3 multi_phase.py
codeDir: ./
command: python3 trial.py
gpuNum: 0

useAnnotation: false
multiPhase: true
multiThread: false

trainingServicePlatform: local
7 changes: 7 additions & 0 deletions test/config/assessors/search_space.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"test":
{
"_type" : "choice",
"_value" : [1, 100]
}
}
25 changes: 25 additions & 0 deletions test/config/assessors/trial.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.

import random
import time
import nni

if __name__ == '__main__':
print('trial start')
if random.random() > 0.5:
up = True
else:
up = False
v = 0.5
nni.get_next_parameter()
for i in range(20):
time.sleep(1)
for _ in range(2):
if up:
v *= 1.1
else:
v *= 0.9
nni.report_intermediate_result(v)
nni.report_final_result(v)
print('trial done')
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ assessor:
optimize_mode: maximize
trial:
codeDir: ../../../examples/trials/mnist-annotation
command: python3 mnist.py --batch_num 100
command: python3 mnist.py --batch_num 10
gpuNum: 0

useAnnotation: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ assessor:
optimize_mode: maximize
trial:
codeDir: ../../../examples/trials/mnist-nested-search-space
command: python3 mnist.py --batch_num 100
command: python3 mnist.py --batch_num 10
gpuNum: 0

useAnnotation: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ assessor:
optimize_mode: maximize
trial:
codeDir: ../../../examples/trials/mnist-pytorch
command: python3 mnist.py --epochs 2
command: python3 mnist.py --epochs 1
gpuNum: 0

useAnnotation: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ assessor:
optimize_mode: maximize
trial:
codeDir: ../../../examples/trials/mnist-tfv1
command: python3 mnist.py --batch_num 100
command: python3 mnist.py --batch_num 10
gpuNum: 0

useAnnotation: false
Expand Down
Loading