integration-test-hybrid.yml 2.36 KB
Newer Older
1
2
3
trigger: none
pr: none
schedules:
Yuge Zhang's avatar
Yuge Zhang committed
4
- cron: 0 20 * * *
5
6
7
8
9
  branches:
    include: [ master ]

jobs:
- job: hybrid
Yuge Zhang's avatar
Yuge Zhang committed
10
  pool: nni-it-1es-11
11
  timeoutInMinutes: 90
12
13

  steps:
14
  # FIXME: should use GPU here
Yuge Zhang's avatar
Yuge Zhang committed
15
  - template: templates/fix-apt-1es.yml
16

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

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

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

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

31
32
33
34
35
36
37
38
39
40
  # 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
41

42
43
44
45
46
47
48
49
50
  - 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
51

52
53
54
55
56
  - 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
57
58
59

  - script: |
      cd test
60
      python training_service/nnitest/generate_ts_config.py \
61
62
63
64
65
66
67
          --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) \
68
69
70
71
          --subscription_id $(subscription_id) \
          --resource_group $(resource_group) \
          --workspace_name $(workspace_name) \
          --compute_target $(compute_target) \
72
          --config_version v2
73
      python training_service/nnitest/run_tests.py --config training_service/config/integration_tests_config_v2.yml --ts hybrid
74
75
    displayName: Integration test

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