Skip to content

Commit e920b44

Browse files
committed
Add MV2 and MV3 export jobs with pip caching
1 parent 8622988 commit e920b44

1 file changed

Lines changed: 66 additions & 1 deletion

File tree

.github/workflows/export-models.yml

Lines changed: 66 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,12 @@ jobs:
2929
uses: actions/setup-python@v5
3030
with:
3131
python-version: '3.11'
32+
cache: 'pip'
3233

3334
- name: Install dependencies
3435
run: |
3536
python -m pip install --upgrade pip
36-
pip install executorch
37+
pip install executorch torchvision
3738
3839
- name: Run export script
3940
working-directory: dl3/python
@@ -45,3 +46,67 @@ jobs:
4546
name: dl3-xnnpack-fp32
4647
path: dl3/python/dl3_xnnpack_fp32.pte
4748
if-no-files-found: error
49+
50+
mv2_export:
51+
runs-on: ubuntu-latest
52+
name: Export MV2 to XNNPACK
53+
54+
steps:
55+
- name: Checkout repository
56+
uses: actions/checkout@v4
57+
58+
- name: Set up Python
59+
uses: actions/setup-python@v5
60+
with:
61+
python-version: '3.11'
62+
cache: 'pip'
63+
64+
- name: Install dependencies
65+
run: |
66+
python -m pip install --upgrade pip
67+
pip install executorch torchvision
68+
69+
- name: Run export script
70+
working-directory: mv2/python
71+
run: python export.py
72+
73+
- name: Upload exported model
74+
uses: actions/upload-artifact@v4
75+
with:
76+
name: mv2-xnnpack
77+
path: mv2/python/model_mv2_xnnpack.pte
78+
if-no-files-found: error
79+
80+
mv3_export:
81+
runs-on: ubuntu-latest
82+
name: Export MV3 to XNNPACK and CoreML
83+
84+
steps:
85+
- name: Checkout repository
86+
uses: actions/checkout@v4
87+
88+
- name: Set up Python
89+
uses: actions/setup-python@v5
90+
with:
91+
python-version: '3.11'
92+
cache: 'pip'
93+
94+
- name: Install dependencies
95+
run: |
96+
python -m pip install --upgrade pip
97+
pip install executorch torchvision
98+
99+
- name: Run export script
100+
working-directory: mv3/python
101+
run: python export.py
102+
103+
- name: Upload exported models
104+
uses: actions/upload-artifact@v4
105+
with:
106+
name: mv3-models
107+
path: |
108+
mv3/python/mv3.pte
109+
mv3/python/mv3_coreml_all.pte
110+
mv3/python/mv3_mps_float16.pte
111+
mv3/python/mv3_xnnpack_fp32.pte
112+
if-no-files-found: error

0 commit comments

Comments
 (0)