integration-test-hybrid.yml 2.32 KB
Newer Older
1
2
3
4
5
6
7
8
9
trigger: none
pr: none
schedules:
- cron: 0 16 * * *
  branches:
    include: [ master ]

jobs:
- job: hybrid
10
  pool: nni-it
11
12
13
  timeoutInMinutes: 120

  steps:
14
  # FIXME: should use GPU here
15

16
17
18
19
  - template: templates/install-dependencies.yml
    parameters:
      platform: ubuntu-latest
      python_env: venv
20

21
  - template: templates/install-dependencies-aml.yml
22

23
24
25
26
  - template: templates/install-nni.yml
    parameters:
      wheel: true
      extra_dep: SMAC,BOHB
27

28
  - template: templates/install-customized-tuner.yml
29

30
31
32
33
34
35
36
37
38
39
  # These parts are exactly same as remote.
  # Refactor these as templates when the refactor is done.
  - script: |
      set -e
      mkdir -p /tmp/nnitest/$(Build.BuildId)
      cp Dockerfile /tmp/nnitest/$(Build.BuildId)
      cp -r dist /tmp/nnitest/$(Build.BuildId)
      cp -r test /tmp/nnitest/$(Build.BuildId)
      cp -r test/vso_tools/interim_patch.py /tmp/nnitest/$(Build.BuildId)
    displayName: Prepare for docker
40

41
42
43
44
45
46
47
48
49
  - script: |
      set -e
      export worker_ip=localhost
      export manager_ip=host.docker.internal
      export password_in_docker=123456
      echo "##vso[task.setvariable variable=worker_ip]${worker_ip}"
      echo "##vso[task.setvariable variable=manager_ip]${manager_ip}"
      echo "##vso[task.setvariable variable=password_in_docker]${password_in_docker}"
    displayName: Override environment variables
50

51
52
53
54
55
  - script: |
      set -e
      python /tmp/nnitest/$(Build.BuildId)/test/vso_tools/start_docker.py --sudo $(NNI_RELEASE) $(Build.BuildId) $(password_in_docker)
    displayName: Run a worker in docker
  # End of duplicated region
56
57
58

  - script: |
      cd test
59
      python training_service/nnitest/generate_ts_config.py \
60
61
62
63
64
65
66
          --ts hybrid \
          --remote_reuse true \
          --remote_user nni \
          --remote_host $(worker_ip) \
          --remote_pwd $(password_in_docker) \
          --remote_port $(docker_port) \
          --nni_manager_ip $(manager_ip) \
67
68
69
70
          --subscription_id $(subscription_id) \
          --resource_group $(resource_group) \
          --workspace_name $(workspace_name) \
          --compute_target $(compute_target) \
71
          --config_version v2
72
      python training_service/nnitest/run_tests.py --config training_service/config/integration_tests_config_v2.yml --ts hybrid
73
74
    displayName: Integration test

75
  - template: templates/save-crashed-info.yml