-
Notifications
You must be signed in to change notification settings - Fork 59
49 lines (38 loc) · 1.29 KB
/
integration-test_nni_based_torch.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
name: Integrated Test for Torch Model Based on NNI
on: [push]
jobs:
torch-model-test:
runs-on: ubuntu-latest
strategy:
max-parallel: 5
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Cache
uses: actions/cache@v2
id: cache
env:
cache-name: download-cache
with:
path: |
~/.nn_meter
/home/runner/work/nn-Meter/data/testmodels
key: ${{hashFiles('nn_meter/configs/predictors.yaml')}}-${{hashFiles('tests/integration_test/test_latency_predictor.py')}}
- name: Install dependencies
run: |
pip install torch==1.9.0
pip install torchvision==0.10.0
pip install nni==2.5
- name: Install nn-Meter
run: pip install -U .
- name: Integration test
run: python tests/integration_test/test_latency_predictor_torch.py --apply-nni
- name: Diff result with reference
run: diff tests/integration_test/data/reference_result_nni_based_torch.txt tests/integration_test/test_result_nni_based_torch.txt
- name: clean env
run: rm tests/integration_test/test_result_nni_based_torch.txt