integration_tests.yml 8.38 KB
Newer Older
chicm-ms's avatar
chicm-ms committed
1
2

defaultTestCaseConfig:
3
  launchCommand: nnictl create --config $configFile --debug
chicm-ms's avatar
chicm-ms committed
4
5
6
  stopCommand: nnictl stop
  experimentStatusCheck: True
  platform: linux darwin win32
chicm-ms's avatar
chicm-ms committed
7
  trainingService: all
chicm-ms's avatar
chicm-ms committed
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

testCases:
#######################################################################
# nni examples test
#######################################################################
- name: sklearn-classification
  # test case config yml file relative to nni source code directory
  configFile: test/config/examples/sklearn-classification.yml

  # test case specific config, the content of configFile will be overrided
  # by config section
  config:

  # validator is called after experiment is done
  # validator class needs to be implemented in nni_test/nnitest/validators.py
  validator:

  # launch command, default launch command is 'nnictl create --config $configFile'
26
  launchCommand: nnictl create --config $configFile --debug
chicm-ms's avatar
chicm-ms committed
27
28
29
30
31
32
33
34
35
36

  # stop command, default stop command is 'nnictl stop', empty means no stop command
  stopCommand: nnictl stop

  # set experiment ID into variable, variable name should start with $, such as $expId
  setExperimentIdtoVar: $expId

  # check status of experiment before calling validator
  experimentStatusCheck: True

37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
- name: shared-storage-remote-azureblob
  configFile: test/config/sharedstorage_test/config_sharedstorage_remote_azureblob.yml
  config:
    sharedStorage:
      localMountPoint: /tmp/nnimount/testlocalrootpath
      remoteMountPoint: /tmp/nnimount/testremoterootpath
      storageAccountName: nennistorage
      storageAccountKey: $(azureblob_token_test)
      containerName: sharedstorage
  validator:
    class: FileExistValidator
    kwargs:
      rootpath: /tmp/nnimount/testlocalrootpath

# TODO: Enable this case after nfs server is ready
#- name: shared-storage-remote-nfs
#  configFile: test/config/sharedstorage_test/config_sharedstorage_remote_nfs.yml
#  config:
#    sharedStorage:
#      localMountPoint: /tmp/nnimount/testlocalrootpath
#      remoteMountPoint: /tmp/nnimount/testremoterootpath
#      nfsServer: $(NFS_IP)
#      exportedDirectory: /home/nni/mnt/
#  validator:
#    class: FileExistValidator
#    kwargs:
#      rootpath: /tmp/nnimount/testlocalrootpath

chicm-ms's avatar
chicm-ms committed
65
66
67
- name: sklearn-regression
  configFile: test/config/examples/sklearn-regression.yml

liuzhe-lz's avatar
liuzhe-lz committed
68
69
- name: mnist-tensorflow
  configFile: test/config/examples/mnist-tfv2.yml
70
  config:
SparkSnail's avatar
SparkSnail committed
71
    maxExecDuration: 10m # This example will use longger time in remote mode, set max_duration to 10m to avoid timeout error.
72
73
    maxTrialNum: 1
    trialConcurrency: 1
liuzhe-lz's avatar
liuzhe-lz committed
74
  trainingService: local remote # FIXME: timeout on pai, looks like tensorflow failed to link CUDA
chicm-ms's avatar
chicm-ms committed
75

76
- name: mnist-pytorch-local
chicm-ms's avatar
chicm-ms committed
77
  configFile: test/config/examples/mnist-pytorch.yml
78
79
  # download data first, to prevent concurrent issue.
  launchCommand: python3 ../examples/trials/mnist-pytorch/mnist.py --epochs 1 --batch_num 0 --data_dir ../examples/trials/mnist-pytorch/data && nnictl create --config $configFile --debug
80
81
82
83
84
85
86
  trainingService: local

- name: mnist-pytorch-non-local
  configFile: test/config/examples/mnist-pytorch.yml
  # download data first, to prevent concurrent issue.
  launchCommand: nnictl create --config $configFile --debug
  trainingService: remote pai kubeflow frameworkcontroller dlts
chicm-ms's avatar
chicm-ms committed
87

liuzhe-lz's avatar
liuzhe-lz committed
88
89
90
91
92
93
# TODO: move this and following commented test cases to pytorch or tf2
#- name: mnist-annotation
#  configFile: test/config/examples/mnist-annotation.yml
#  config:
#    maxTrialNum: 1
#    trialConcurrency: 1
chicm-ms's avatar
chicm-ms committed
94
95
96
97
98
99
100
101
102
103
104
105
106

- name: cifar10-pytorch
  configFile: test/config/examples/cifar10-pytorch.yml
  config:
    # this example downloads large pretrained model weights
    # test 1 trial to save time
    maxExecDuration: 10m
    maxTrialNum: 1
    trialConcurrency: 1
    trial:
      command: python3 main.py --epochs 1 --batches 1
      gpuNum: 0

SparkSnail's avatar
SparkSnail committed
107
108
109
110
- name: cifar10-pytorch-adl
  configFile: test/config/examples/cifar10-pytorch-adl.yml
  trainingService: adl

liuzhe-lz's avatar
liuzhe-lz committed
111
112
#- name: nested-ss
#  configFile: test/config/examples/mnist-nested-search-space.yml
chicm-ms's avatar
chicm-ms committed
113

114
115
- name: classic-nas-gen-ss
  configFile: test/config/examples/classic-nas-pytorch.yml
SparkSnail's avatar
SparkSnail committed
116
  launchCommand: nnictl ss_gen --trial_command="python3 mnist.py --epochs 1" --trial_dir=../examples/nas/legacy/classic_nas --file=config/examples/nni-nas-search-space.json
117
118
  stopCommand:
  experimentStatusCheck: False
chicm-ms's avatar
chicm-ms committed
119
  trainingService: local
120
121
122
123
124

- name: classic-nas-pytorch
  configFile: test/config/examples/classic-nas-pytorch.yml
  # remove search space file
  stopCommand: nnictl stop
125
  onExitCommand: python3 -c "import os; os.remove('config/examples/nni-nas-search-space.json')"
chicm-ms's avatar
chicm-ms committed
126
  trainingService: local
chicm-ms's avatar
chicm-ms committed
127
128
129
130
131
132
133
134
135
136
137
138
139
140

#########################################################################
# nni features test
#########################################################################
- name: metrics-float
  configFile: test/config/metrics_test/config.yml
  config:
    maxTrialNum: 1
    trialConcurrency: 1
  validator:
    class: MetricsValidator
    kwargs:
      expected_result_file: expected_metrics.json

Yan Ni's avatar
Yan Ni committed
141
142
143
144
145
146
147
148
- name: export-float
  configFile: test/config/metrics_test/config.yml
  config:
    maxTrialNum: 1
    trialConcurrency: 1
  validator:
    class: ExportValidator 

chicm-ms's avatar
chicm-ms committed
149
150
151
152
153
154
155
156
157
- name: metrics-dict
  configFile: test/config/metrics_test/config_dict_metrics.yml
  config:
    maxTrialNum: 1
    trialConcurrency: 1
  validator:
    class: MetricsValidator
    kwargs:
      expected_result_file: expected_metrics_dict.json
chicm-ms's avatar
chicm-ms committed
158

Yan Ni's avatar
Yan Ni committed
159
160
161
162
163
164
165
166
- name: export-dict
  configFile: test/config/metrics_test/config_dict_metrics.yml
  config:
    maxTrialNum: 1
    trialConcurrency: 1
  validator:
    class: ExportValidator 

167
168
169
170
171
172
173
- name: experiment-import
  configFile: test/config/nnictl_experiment/sklearn-classification.yml
  validator:
    class: ImportValidator
    kwargs:
      import_data_file_path: config/nnictl_experiment/test_import.json

chicm-ms's avatar
chicm-ms committed
174
175
176
177
178
179
180
181
182
183
184
- name: foreground
  configFile: test/config/examples/sklearn-regression.yml
  launchCommand: python3 nni_test/nnitest/foreground.py --config $configFile --timeout 45
  stopCommand:
  experimentStatusCheck: False
  platform: linux darwin

# Experiment resume test part 1
- name: nnictl-resume-1
  configFile: test/config/examples/sklearn-regression.yml
  setExperimentIdtoVar: $resumeExpId
185
  # for subfolder in codedir test
186
  launchCommand: python3 -c "import os; os.makedirs('../examples/trials/sklearn/regression/subfolder', exist_ok=True); open('../examples/trials/sklearn/regression/subfolder/subfile', 'a').close()" && nnictl create --config $configFile --debug
chicm-ms's avatar
chicm-ms committed
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214

# Experiment resume test part 2
- name: nnictl-resume-2
  configFile: test/config/examples/sklearn-regression.yml
  launchCommand: nnictl resume $resumeExpId

# Experiment view test
- name: nnictl-view
  configFile: test/config/examples/sklearn-regression.yml
  launchCommand: nnictl view $resumeExpId
  experimentStatusCheck: False

- name: multi-thread
  configFile: test/config/multi_thread/config.yml


#########################################################################
# nni assessor test
#########################################################################
- name: assessor-curvefitting
  configFile: test/config/assessors/curvefitting.yml

- name: assessor-medianstop
  configFile: test/config/assessors/medianstop.yml

#########################################################################
# nni tuners test
#########################################################################
liuzhe-lz's avatar
liuzhe-lz committed
215
216
#- name: tuner-annel
#  configFile: test/config/tuners/anneal.yml
chicm-ms's avatar
chicm-ms committed
217

liuzhe-lz's avatar
liuzhe-lz committed
218
219
#- name: tuner-evolution
#  configFile: test/config/tuners/evolution.yml
chicm-ms's avatar
chicm-ms committed
220

liuzhe-lz's avatar
liuzhe-lz committed
221
222
#- name: tuner-random
#  configFile: test/config/tuners/random.yml
chicm-ms's avatar
chicm-ms committed
223

liuzhe-lz's avatar
liuzhe-lz committed
224
225
226
#- name: tuner-smac
#  configFile: test/config/tuners/smac.yml
#  platform: linux darwin
chicm-ms's avatar
chicm-ms committed
227

liuzhe-lz's avatar
liuzhe-lz committed
228
229
#- name: tuner-tpe
#  configFile: test/config/tuners/tpe.yml
chicm-ms's avatar
chicm-ms committed
230

liuzhe-lz's avatar
liuzhe-lz committed
231
232
#- name: tuner-batch
#  configFile: test/config/tuners/batch.yml
chicm-ms's avatar
chicm-ms committed
233

liuzhe-lz's avatar
liuzhe-lz committed
234
235
236
#- name: tuner-bohb
#  configFile: test/config/tuners/bohb.yml
#  platform: linux darwin
chicm-ms's avatar
chicm-ms committed
237

liuzhe-lz's avatar
liuzhe-lz committed
238
239
#- name: tuner-gp
#  configFile: test/config/tuners/gp.yml
chicm-ms's avatar
chicm-ms committed
240

liuzhe-lz's avatar
liuzhe-lz committed
241
242
#- name: tuner-grid
#  configFile: test/config/tuners/gridsearch.yml
chicm-ms's avatar
chicm-ms committed
243

liuzhe-lz's avatar
liuzhe-lz committed
244
245
#- name: tuner-hyperband
#  configFile: test/config/tuners/hyperband.yml
chicm-ms's avatar
chicm-ms committed
246

liuzhe-lz's avatar
liuzhe-lz committed
247
248
#- name: tuner-metis
#  configFile: test/config/tuners/metis.yml
249

250
251
252
- name: tuner-regularized_evolution
  configFile: test/config/tuners/regularized_evolution_tuner.yml

253
254
255
256
257
#########################################################################
# nni customized-tuners test
#########################################################################
- name: customized-tuners-demotuner
  configFile: test/config/customized_tuners/demotuner-sklearn-classification.yml