"docs/en_US/Tuner/BatchTuner.rst" did not exist on "dbb2434f5d2d976be26b594342a68cb46619ecea"
azure-pipelines.yml 5.43 KB
Newer Older
chicm-ms's avatar
chicm-ms committed
1
2
3
# Azure hosted agents specification:
# https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops

Gems Guo's avatar
Gems Guo committed
4
jobs:
chicm-ms's avatar
chicm-ms committed
5
- job: 'ubuntu_1804_python36'
chicm-ms's avatar
chicm-ms committed
6
  pool:
chicm-ms's avatar
chicm-ms committed
7
    vmImage: 'Ubuntu 18.04'
Gems Guo's avatar
Gems Guo committed
8
9

  steps:
chicm-ms's avatar
chicm-ms committed
10
  - script: |
11
      set -e
chicm-ms's avatar
chicm-ms committed
12
13
14
      python3 -m pip install --upgrade pip setuptools --user
      python3 -m pip install pylint==2.3.1 astroid==2.2.5 --user
      python3 -m pip install coverage --user
15
      echo "##vso[task.setvariable variable=PATH]${HOME}/.local/bin:${PATH}"
Gems Guo's avatar
Gems Guo committed
16
    displayName: 'Install python tools'
chicm-ms's avatar
chicm-ms committed
17
18
19
  - script: |
      source install.sh
    displayName: 'Install nni toolkit via source code'
20
21
22
23
  - script: |
      set -e
      cd src/nni_manager
      yarn eslint
chicm-ms's avatar
chicm-ms committed
24
      # uncomment following 2 lines to enable webui eslint
Lijiao's avatar
Lijiao committed
25
26
      cd ../webui
      yarn eslint
27
    displayName: 'Run eslint'
28
  - script: |
29
      set -e
chicm-ms's avatar
chicm-ms committed
30
31
      python3 -m pip install torch==1.5.0+cpu torchvision==0.6.0+cpu -f https://download.pytorch.org/whl/torch_stable.html --user
      python3 -m pip install tensorflow==1.15.2 --user
chicm-ms's avatar
chicm-ms committed
32
33
      python3 -m pip install keras==2.1.6 --user
      python3 -m pip install gym onnx --user
34
      python3 -m pip install sphinx==1.8.3 sphinx-argparse==0.2.5 sphinx-markdown-tables==0.0.9 sphinx-rtd-theme==0.4.2 sphinxcontrib-websupport==1.1.0 recommonmark==0.5.0 --user
chicm-ms's avatar
chicm-ms committed
35
      sudo apt-get install swig -y
36
37
      nnictl package install --name=SMAC
      nnictl package install --name=BOHB
chicm-ms's avatar
chicm-ms committed
38
    displayName: 'Install dependencies'
Gems Guo's avatar
Gems Guo committed
39
  - script: |
chicm-ms's avatar
chicm-ms committed
40
41
42
43
44
45
46
47
      set -e
      python3 -m pylint --rcfile pylintrc nni_annotation
      python3 -m pylint --rcfile pylintrc nni_cmd
      python3 -m pylint --rcfile pylintrc nni_gpu_tool
      python3 -m pylint --rcfile pylintrc nni_trial_tool
      python3 -m pylint --rcfile pylintrc nni
      python3 -m pylint --rcfile pylintrc nnicli
    displayName: 'Run pylint'
48
  - script: |
49
      set -e
50
      python3 -m pip install flake8 --user
chicm-ms's avatar
chicm-ms committed
51
      EXCLUDES=./src/nni_manager/,./src/webui,./tools/nni_annotation/testcase/,./examples/trials/mnist-nas/*/mnist*.py,./examples/trials/nas_cifar10/src/cifar10/general_child.py
chicm-ms's avatar
chicm-ms committed
52
      python3 -m flake8 . --count --exclude=$EXCLUDES --select=E9,F63,F72,F82 --show-source --statistics
53
    displayName: 'Run flake8 tests to find Python syntax errors and undefined names'
54
55
  - script: |
      cd test
chicm-ms's avatar
chicm-ms committed
56
      source scripts/unittest.sh
57
    displayName: 'Unit test'
Gems Guo's avatar
Gems Guo committed
58
59
  - script: |
      cd test
chicm-ms's avatar
chicm-ms committed
60
61
      python3 nni_test/nnitest/run_tests.py --config config/pr_tests.yml
    displayName: 'Simple test'
62
63
64
65
  - script: |
      cd docs/en_US/
      sphinx-build -M html . _build -W
    displayName: 'Sphinx Documentation Build check'
66

chicm-ms's avatar
chicm-ms committed
67
68
69
70
71
72
- job: 'ubuntu_1604_python35_legacy_torch'
  pool:
    vmImage: 'Ubuntu 16.04'

  steps:
  - script: |
73
      set -e
chicm-ms's avatar
chicm-ms committed
74
75
76
77
78
79
80
81
      python3 -m pip install --upgrade pip setuptools --user
      python3 -m pip install coverage --user
      echo "##vso[task.setvariable variable=PATH]${HOME}/.local/bin:${PATH}"
    displayName: 'Install python tools'
  - script: |
      source install.sh
    displayName: 'Install nni toolkit via source code'
  - script: |
82
      set -e
chicm-ms's avatar
chicm-ms committed
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
      python3 -m pip install torch==1.3.1+cpu torchvision==0.4.2+cpu -f https://download.pytorch.org/whl/torch_stable.html --user
      python3 -m pip install tensorflow==1.15.2 --user
      python3 -m pip install keras==2.1.6 --user
      python3 -m pip install gym onnx --user
      sudo apt-get install swig -y
      nnictl package install --name=SMAC
      nnictl package install --name=BOHB
    displayName: 'Install dependencies'
  - script: |
      cd test
      source scripts/unittest.sh
    displayName: 'Unit test'
  - script: |
      cd test
      python3 nni_test/nnitest/run_tests.py --config config/pr_tests.yml
    displayName: 'Simple test'


- job: 'macos_1015_python37'
102
  pool:
103
    vmImage: 'macOS-10.15'
104
105

  steps:
106
107
108
  - script: |
      python3 -m pip install --upgrade pip setuptools
      echo "##vso[task.setvariable variable=PATH]${HOME}/Library/Python/3.7/bin:${PATH}"
109
110
    displayName: 'Install python tools'
  - script: |
Yuge Zhang's avatar
Yuge Zhang committed
111
      echo "network-timeout 600000" >> ${HOME}/.yarnrc
112
113
      source install.sh
    displayName: 'Install nni toolkit via source code'
114
  - script: |
115
      set -e
chicm-ms's avatar
chicm-ms committed
116
117
118
      # pytorch Mac binary does not support CUDA, default is cpu version
      python3 -m pip install torchvision==0.6.0 torch==1.5.0 --user
      python3 -m pip install tensorflow==1.15.2 --user
119
      brew install swig@3
120
      rm -f /usr/local/bin/swig
121
      ln -s /usr/local/opt/swig\@3/bin/swig /usr/local/bin/swig
122
123
124
125
      nnictl package install --name=SMAC
    displayName: 'Install dependencies'
  - script: |
      cd test
chicm-ms's avatar
chicm-ms committed
126
      source scripts/unittest.sh
127
    displayName: 'Unit test'
128
129
  - script: |
      cd test
chicm-ms's avatar
chicm-ms committed
130
131
      python3 nni_test/nnitest/run_tests.py --config config/pr_tests.yml
    displayName: 'Simple test'
chicm-ms's avatar
chicm-ms committed
132

chicm-ms's avatar
chicm-ms committed
133
- job: 'win2016_python37'
chicm-ms's avatar
chicm-ms committed
134
135
136
137
138
139
140
141
142
143
  pool:
    vmImage: 'vs2017-win2016'

  steps:
  - script: |
      powershell.exe -file install.ps1
    displayName: 'Install nni toolkit via source code'
  - script: |
      python -m pip install scikit-learn==0.20.0 --user
      python -m pip install keras==2.1.6 --user
chicm-ms's avatar
chicm-ms committed
144
145
      python -m pip install torch==1.5.0+cpu torchvision==0.6.0+cpu -f https://download.pytorch.org/whl/torch_stable.html --user
      python -m pip install tensorflow==1.15.2 --user
chicm-ms's avatar
chicm-ms committed
146
147
148
    displayName: 'Install dependencies'
  - script: |
      cd test
chicm-ms's avatar
chicm-ms committed
149
      powershell.exe -file scripts/unittest.ps1
chicm-ms's avatar
chicm-ms committed
150
151
152
    displayName: 'unit test'
  - script: |
      cd test
chicm-ms's avatar
chicm-ms committed
153
154
      python nni_test/nnitest/run_tests.py --config config/pr_tests.yml
    displayName: 'Simple test'