-
Notifications
You must be signed in to change notification settings - Fork 20
180 lines (156 loc) · 6.54 KB
/
unittest.yaml
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
name: Unittest
on:
push:
branches-ignore:
- "master"
pull_request:
jobs:
unittest:
name: Unittest
strategy:
fail-fast: false
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11"]
torch-version: ["1.8.*", "1.9.*", "1.10.*", "1.11.*", "1.12.*", "1.13.*", "2.0.*", "2.1.*"]
include:
- torch-version: "1.8.*"
torchvision-version: "0.9.*"
- torch-version: "1.9.*"
torchvision-version: "0.10.*"
- torch-version: "1.10.*"
torchvision-version: "0.11.*"
- torch-version: "1.11.*"
torchvision-version: "0.12.*"
- torch-version: "1.12.*"
torchvision-version: "0.13.*"
- torch-version: "1.13.*"
torchvision-version: "0.14.*"
- torch-version: "2.0.*"
torchvision-version: "0.15.*"
- torch-version: "2.1.*"
torchvision-version: "0.16.*"
exclude:
- python-version: "3.6"
torch-version: "1.11.*"
- python-version: "3.6"
torch-version: "1.12.*"
- python-version: "3.6"
torch-version: "1.13.*"
- python-version: "3.6"
torch-version: "2.0.*"
- python-version: "3.6"
torch-version: "2.1.*"
- python-version: "3.7"
torch-version: "2.0.*"
- python-version: "3.7"
torch-version: "2.1.*"
- python-version: "3.10"
torch-version: "1.8.*"
- python-version: "3.10"
torch-version: "1.9.*"
- python-version: "3.10"
torch-version: "1.10.*"
- python-version: "3.11"
torch-version: "1.8.*"
- python-version: "3.11"
torch-version: "1.9.*"
- python-version: "3.11"
torch-version: "1.10.*"
- python-version: "3.11"
torch-version: "1.11.*"
- python-version: "3.11"
torch-version: "1.12.*"
- python-version: "3.11"
torch-version: "1.13.*"
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Set Swap Space
uses: pierotofy/set-swap-space@master
with:
swap-size-gb: 10
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Install PyAV Dependencies for Python 3.6
if: matrix.python-version == '3.6'
run: |
sudo apt install -y libavformat-dev libavdevice-dev
pip install "av==6.*"
- name: Install dependencies
run: |
sudo apt install -y ffmpeg wget
pip install torch==${{ matrix.torch-version }}
pip install torchvision==${{ matrix.torchvision-version }}
pip install -r requirements.lib.txt
python init.py
- name: Download model checkpoints
run: |
mkdir test/model
wget -O test/model/marlin_vit_base_ytf.encoder.pt https://github.com/ControlNet/MARLIN/releases/download/model_v1/marlin_vit_base_ytf.encoder.pt
wget -O test/model/marlin_vit_base_ytf.full.pt https://github.com/ControlNet/MARLIN/releases/download/model_v1/marlin_vit_base_ytf.full.pt
wget -O test/model/marlin_vit_small_ytf.encoder.pt https://github.com/ControlNet/MARLIN/releases/download/model_v1/marlin_vit_small_ytf.encoder.pt
wget -O test/model/marlin_vit_small_ytf.full.pt https://github.com/ControlNet/MARLIN/releases/download/model_v1/marlin_vit_small_ytf.full.pt
wget -O test/model/marlin_vit_large_ytf.encoder.pt https://github.com/ControlNet/MARLIN/releases/download/model_v1/marlin_vit_large_ytf.encoder.pt
wget -O test/model/marlin_vit_large_ytf.full.pt https://github.com/ControlNet/MARLIN/releases/download/model_v1/marlin_vit_large_ytf.full.pt
- name: Set PYTHONPATH
run: echo "PYTHONPATH=$(pwd)/src" >> $GITHUB_ENV
- name: Run Test
run: | # python -m unittest discover test
python -m unittest test/test_version.py
python -m unittest test/test_marlin_vit_base.py
python -m unittest test/test_marlin_vit_small.py
python -m unittest test/test_marlin_vit_large.py
coverage:
# Run coverage and report to coveralls
name: Coverage
needs: [unittest]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.10"
architecture: x64
- name: Install dependencies
run: |
sudo apt install -y ffmpeg wget
pip install torch=="1.13.*"
pip install torchvision=="0.14.*"
pip install -r requirements.lib.txt
python init.py
pip install coverage pytest coveralls
- name: Download model checkpoints
run: |
mkdir test/model
wget -O test/model/marlin_vit_base_ytf.encoder.pt https://github.com/ControlNet/MARLIN/releases/download/model_v1/marlin_vit_base_ytf.encoder.pt
wget -O test/model/marlin_vit_base_ytf.full.pt https://github.com/ControlNet/MARLIN/releases/download/model_v1/marlin_vit_base_ytf.full.pt
wget -O test/model/marlin_vit_small_ytf.encoder.pt https://github.com/ControlNet/MARLIN/releases/download/model_v1/marlin_vit_small_ytf.encoder.pt
wget -O test/model/marlin_vit_small_ytf.full.pt https://github.com/ControlNet/MARLIN/releases/download/model_v1/marlin_vit_small_ytf.full.pt
wget -O test/model/marlin_vit_large_ytf.encoder.pt https://github.com/ControlNet/MARLIN/releases/download/model_v1/marlin_vit_large_ytf.encoder.pt
wget -O test/model/marlin_vit_large_ytf.full.pt https://github.com/ControlNet/MARLIN/releases/download/model_v1/marlin_vit_large_ytf.full.pt
- name: Set PYTHONPATH
run: echo "PYTHONPATH=$(pwd)/src" >> $GITHUB_ENV
- name: Run Coverage
run: coverage run --source=marlin_pytorch -m unittest discover
- name: Coveralls
run: coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: marlin_pytorch
COVERALLS_PARALLEL: true
coveralls_finish:
name: Coveralls Finish
needs: [coverage]
runs-on: ubuntu-20.04
container: python:3-slim
steps:
- name: Finished
run: |
pip3 install --upgrade coveralls
coveralls --service=github --finish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}