-
Notifications
You must be signed in to change notification settings - Fork 52
57 lines (48 loc) · 1.57 KB
/
model_coverage.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
50
51
52
53
54
55
56
57
# YAML schema for GitHub Actions:
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions
#
# Helpful YAML parser to clarify YAML syntax:
# https://yaml-online-parser.appspot.com/
#
# This workflow will run nightly or when triggered from PR comment
name: Model Coverage
on:
workflow_call:
inputs:
trigger-sha:
required: true
type: string
jobs:
test-model-coverage:
strategy:
matrix:
python-version: ["3.10", "3.11"]
runs-on:
labels: Linux_runner_8_core
steps:
- uses: actions/checkout@v3
with:
ref: ${{ inputs.trigger-sha }}
- name: Checkout benchmark repository
uses: actions/checkout@v3
with:
repository: ${{ secrets.PYTORCH_BENCHMARK_REPO }}
path: ${{ github.workspace }}/benchmark
token: ${{ secrets.PYTORCH_BENCHMARK_REPO_READER }}
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- run: |
python -m pip install --upgrade pip setuptools
python -m pip cache purge
- name: Install ai-edge-torch
run: |
python -m pip install -r dev-requirements.txt --force-reinstall
python -m pip install . --no-cache-dir
- name: Setup benchmark repository
run: |
bash ${{ github.workspace }}/benchmark/ci_ai_edge_torch/ci_setup.sh
- name: Run tests
run: |
cd ${{ github.workspace }}/benchmark
python -m pytest ci_ai_edge_torch -n 4