integration-test-openpai-linux.yml 2.98 KB
Newer Older
liuzhe-lz's avatar
liuzhe-lz committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
trigger: none
pr: none
schedules:
- cron: 0 16 * * *
  branches:
    include: [ master ]

# variables set on VSO: (mostly for security concern)
#   pai_user
#   pai_token
#   manager_ip
#   docker_hub_password

jobs:
- job: pai
QuanluZhang's avatar
QuanluZhang committed
16
  pool: NNI CI PAI LINUX CLI
liuzhe-lz's avatar
liuzhe-lz committed
17
18
19
20
21
22
23
24
25
26
27
28
  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}"
      echo "Build docker image: $(build_docker_image)"

29
      python3 -m pip install --upgrade pip setuptools
liuzhe-lz's avatar
liuzhe-lz committed
30
31
32
33
34
35
    displayName: Prepare

  - script: |
      set -e
      python3 setup.py build_ts
      python3 setup.py bdist_wheel -p manylinux1_x86_64
36
      python3 -m pip install dist/nni-${NNI_RELEASE}-py3-none-manylinux1_x86_64.whl[SMAC,BOHB]
liuzhe-lz's avatar
liuzhe-lz committed
37
38
39
40
41
42
    displayName: Build and install NNI

  - script: |
      set -e
      cd examples/tuners/customized_tuner
      python3 setup.py develop --user
43
      nnictl algo register --meta meta_file.yml
liuzhe-lz's avatar
liuzhe-lz committed
44
45
46
47
48
49
    displayName: Install customized tuner

  - script: |
      set -e
      docker login -u nnidev -p $(docker_hub_password)
      echo '## Build docker image ##'
50
      docker build --build-arg NNI_RELEASE=${NNI_RELEASE} -t nnidev/nni-nightly .
liuzhe-lz's avatar
liuzhe-lz committed
51
      echo '## Upload docker image ##'
52
      docker push nnidev/nni-nightly
liuzhe-lz's avatar
liuzhe-lz committed
53
54
55
56
57
58
    condition: eq(variables['build_docker_image'], 'true')
    displayName: Build and upload docker image

  - script: |
      set -e
      cd test
59
      python3 training_service/nnitest/generate_ts_config.py \
liuzhe-lz's avatar
liuzhe-lz committed
60
61
62
63
          --ts pai \
          --pai_reuse false \
          --pai_host https://ne.openpai.org \
          --pai_user $(pai_user) \
64
          --nni_docker_image nnidev/nni-nightly \
liuzhe-lz's avatar
liuzhe-lz committed
65
66
          --pai_storage_config_name confignfs-data \
          --pai_token $(pai_token) \
liuzhe-lz's avatar
liuzhe-lz committed
67
68
          --nni_manager_nfs_mount_path $(nni_manager_nfs_mount_path) \
          --container_nfs_mount_path $(container_nfs_mount_path) \
liuzhe-lz's avatar
liuzhe-lz committed
69
          --nni_manager_ip $(manager_ip) \
liuzhe-lz's avatar
liuzhe-lz committed
70
71
          --vc nni \
          --debug true
72
      python3 training_service/nnitest/run_tests.py --config training_service/config/integration_tests.yml --ts pai
liuzhe-lz's avatar
liuzhe-lz committed
73
74
75
76
77
    displayName: Integration test

  - script: |
      set -e
      cd test
78
      python3 training_service/nnitest/generate_ts_config.py \
liuzhe-lz's avatar
liuzhe-lz committed
79
80
81
82
          --ts pai \
          --pai_reuse true \
          --pai_host https://ne.openpai.org \
          --pai_user $(pai_user) \
J-shang's avatar
J-shang committed
83
          --nni_docker_image nnidev/nni-nightly \
liuzhe-lz's avatar
liuzhe-lz committed
84
85
          --pai_storage_config_name confignfs-data \
          --pai_token $(pai_token) \
liuzhe-lz's avatar
liuzhe-lz committed
86
87
          --nni_manager_nfs_mount_path $(nni_manager_nfs_mount_path) \
          --container_nfs_mount_path $(container_nfs_mount_path) \
liuzhe-lz's avatar
liuzhe-lz committed
88
89
          --nni_manager_ip $(manager_ip) \
          --vc nni
90
      python3 training_service/nnitest/run_tests.py --config training_service/config/integration_tests.yml --ts pai
liuzhe-lz's avatar
liuzhe-lz committed
91
    displayName: Integration test (reuse mode)