integration-test-remote-l2w.yml 2.49 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
trigger: none
pr: none
schedules:
- cron: 0 16 * * *
  branches:
    include: [ master ]

variables:
  worker: remote_nni-ci-gpu-04-w

# variables set on VSO: (for security concern)
#   manager_ip
#   worker_ip
#   worker_port
#   worker_password

jobs:
- job: remote_linux2windows
QuanluZhang's avatar
QuanluZhang committed
19
  pool: NNI CI EAST US REMOTE CLI
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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
65
66
67
68
  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 ID: $(Build.BuildId)"
      python3 -m pip install --upgrade pip setuptools
      python3 setup.py clean --all
    displayName: Prepare on Linux manager

  - task: CopyFilesOverSSH@0
    inputs:
      sshEndpoint: $(worker)
      targetFolder: /tmp/nnitest/$(Build.BuildId)
      overwrite: true
    displayName: Copy source files to Windows worker
    timeoutInMinutes: 10

  - task: SSH@0
    inputs:
      sshEndpoint: $(worker)
      runOptions: commands
      commands: |
        conda activate l2w & python -m pip install --upgrade pip setuptools
        conda activate l2w & python /tmp/nnitest/$(Build.BuildId)/test/vso_tools/install_nni.py $(NNI_RELEASE)
      failOnStdErr: false
    displayName: Install NNI on Windows worker

  - script: |
      set -e
      python3 setup.py build_ts
      python3 setup.py bdist_wheel -p manylinux1_x86_64
      python3 -m pip install dist/nni-${NNI_RELEASE}-py3-none-manylinux1_x86_64.whl[SMAC,BOHB]
    displayName: Install NNI on Linux manager

  - script: |
      set -e
      cd examples/tuners/customized_tuner
      python3 setup.py develop --user
      nnictl algo register --meta meta_file.yml
    displayName: Install customized tuner

  - script: |
      set -e
      cd test
69
      python3 training_service/nnitest/generate_ts_config.py \
70
71
72
73
74
75
          --ts remote \
          --remote_user AzureUser \
          --remote_host $(worker_ip) \
          --remote_port $(worker_port) \
          --remote_pwd $(worker_password) \
          --nni_manager_ip $(manager_ip)
76
      python3 training_service/nnitest/run_tests.py --config training_service/config/integration_tests.yml --ts remote
77
78
79
80
81
82
83
84
85
    displayName: Integration test

  - task: SSH@0
    inputs:
      sshEndpoint: $(worker)
      runOptions: commands
      commands: rm -rf /tmp/nnitest/$(Build.BuildId)
    condition: always()
    displayName: Clean up on Windows worker