-
Notifications
You must be signed in to change notification settings - Fork 73
125 lines (121 loc) · 3.94 KB
/
test-models.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
name: Model Convert Test
on:
pull_request:
branches: [ main ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
jobs:
conversion-test:
runs-on: ubuntu-latest
steps:
- name: Check space before cleanup
run: df -h
- name: Clean space
run: |
docker images
sudo rm -rf "/opt/*" || true
sudo rm -rf "/usr/share/dotnet" || true
sudo rm -rf "$AGENT_TOOLSDIRECTORY" || true
sudo rm -rf "/usr/local/lib/android" || true
sudo rm -rf "/usr/local/share/boost" || true
sudo rm -rf "/usr/lib/jvm" || true
sudo rm -rf "/usr/share/swift" || true
sudo rm -rf "/usr/local/julia*" || true
sudo rm -rf "/usr/share/kotlinc" || true
sudo rm -rf "/usr/local/share/edge_driver" || true
sudo rm -rf "/usr/local/share/chromedriver-linux64" || true
sudo rm -rf "/usr/local/share/gecko_driver" || true
sudo rm -rf "/usr/share/miniconda" || true
sudo rm -rf "/usr/local/share/phantomjs*" || true
sudo rm -rf "/usr/share/sbt" || true
sudo rm -rf "/usr/local/sqlpackage" || true
docker rmi $(docker image ls -q --filter "reference=node*")
docker rmi $(docker image ls -q --filter "reference=moby/buildkit*")
docker rmi $(docker image ls -q --filter "reference=debian*")
docker rmi $(docker image ls -q --filter "reference=alpine*")
docker rmi $(docker image ls -q --filter "reference=ubuntu:20.04")
sudo npm uninstall bazel
rustup self uninstall -y
sudo apt purge \
ansible \
apache2 \
aria2 \
azure-cli \
cabal* \
clang* \
dotnet-sdk* \
firefox \
ghc* \
google-chrome-stable \
google-cloud-sdk \
kubectl \
libpq-dev \
microsoft-edge-stable \
moby-buildx \
moby-cli \
moby-compose \
moby-engine \
mongodb* \
mono-complete \
mysql* \
nginx \
node* \
npm* \
nuget \
php* \
postgresql* \
powershell \
r-base \
rpm \
ruby* \
sphinxsearch \
subversion \
yarn \
-yq >/dev/null 2>&1 || true
sudo apt-get autoremove -y >/dev/null 2>&1 || true
sudo apt-get autoclean -y >/dev/null 2>&1 || true
df -h
- name: Set Swap Space
uses: pierotofy/set-swap-space@49819abfb41bd9b44fb781159c033dba90353a7c
with:
swap-size-gb: 13
- name: Checkout onnx2tf
uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
pip install pip -U
pip install cmake==3.26.4
pip install psutil==5.9.5
pip install onnx==1.16.1
pip install tensorflow==2.17.0
pip install nvidia-pyindex
pip install onnx-graphsurgeon
pip install protobuf==3.20.3
pip install onnxsim==0.4.33
pip install sng4onnx
pip install onnxruntime==1.18.1
pip install ml_dtypes==0.3.2
pip install tf-keras~=2.16
pip install flatbuffers>=23.5.26
pip install -e .
- name: Download models
run: |
curl "https://s3.us-central-1.wasabisys.com/onnx2tf-en/models/resources.tar.gz" -o resources.tar.gz
tar -zxvf resources.tar.gz
rm resources.tar.gz
- name: Run Model Convert Tests
run: |
python tests/test_model_convert.py -m models -o wiki -v
- name: Update wiki content
uses: Andrew-Chen-Wang/github-wiki-action@v4
continue-on-error: true
with:
path: wiki/
ignore: |
test_model_pb/