File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Copyright (c) Meta Platforms, Inc. and affiliates.
2+ # All rights reserved.
3+ #
4+ # This source code is licensed under the BSD-style license found in the
5+ # LICENSE file in the root directory of this source tree.
6+
7+ name : Export Models
8+
9+ on :
10+ schedule :
11+ # Run nightly at midnight UTC
12+ - cron : ' 0 0 * * *'
13+ workflow_dispatch :
14+
15+ permissions :
16+ contents : read
17+
18+ jobs :
19+ export :
20+ runs-on : ubuntu-latest
21+ strategy :
22+ fail-fast : false
23+ matrix :
24+ include :
25+ - name : dl3
26+ path : dl3/python
27+ artifact : dl3-xnnpack-fp32
28+ output : dl3/python/dl3_xnnpack_fp32.pte
29+ - name : mv2
30+ path : mv2/python
31+ artifact : mv2-xnnpack
32+ output : mv2/python/model_mv2_xnnpack.pte
33+ - name : mv3
34+ path : mv3/python
35+ artifact : mv3-models
36+ output : |
37+ mv3/python/mv3.pte
38+ mv3/python/mv3_coreml_all.pte
39+ mv3/python/mv3_mps_float16.pte
40+ mv3/python/mv3_xnnpack_fp32.pte
41+
42+ name : Export ${{ matrix.name }}
43+
44+ steps :
45+ - name : Checkout repository
46+ uses : actions/checkout@v4
47+
48+ - name : Set up Python
49+ uses : actions/setup-python@v5
50+ with :
51+ python-version : ' 3.11'
52+
53+ - name : Install dependencies
54+ run : |
55+ python -m pip install --upgrade pip
56+ pip install executorch torchvision
57+
58+ - name : Run export script
59+ working-directory : ${{ matrix.path }}
60+ run : python export.py
61+
62+ - name : Upload exported model
63+ uses : actions/upload-artifact@v4
64+ with :
65+ name : ${{ matrix.artifact }}
66+ path : ${{ matrix.output }}
67+ if-no-files-found : error
You can’t perform that action at this time.
0 commit comments