1
+
1
2
name : Fast tests for PRs
2
3
3
4
on :
@@ -114,17 +115,20 @@ jobs:
114
115
115
116
- name : Install dependencies
116
117
run : |
117
- uv pip install -e [quality]
118
- pip uninstall transformers -y && pip uninstall huggingface_hub -y && uv pip install --prerelease allow -U transformers@git+https://github.com/huggingface/transformers.git
119
- pip uninstall accelerate -y && uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git --no-deps
118
+ python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
119
+ python -m uv pip install -e [quality,test]
120
+ pip uninstall transformers -y && pip uninstall huggingface_hub -y && python -m uv pip install --prerelease allow -U transformers@git+https://github.com/huggingface/transformers.git
121
+ pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git --no-deps
120
122
121
123
- name : Environment
122
124
run : |
125
+ python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
123
126
python utils/print_env.py
124
127
125
128
- name : Run fast PyTorch Pipeline CPU tests
126
129
if : ${{ matrix.config.framework == 'pytorch_pipelines' }}
127
130
run : |
131
+ python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
128
132
python -m pytest -n 8 --max-worker-restart=0 --dist=loadfile \
129
133
-s -v -k "not Flax and not Onnx" \
130
134
--make-reports=tests_${{ matrix.config.report }} \
@@ -133,6 +137,7 @@ jobs:
133
137
- name : Run fast PyTorch Model Scheduler CPU tests
134
138
if : ${{ matrix.config.framework == 'pytorch_models' }}
135
139
run : |
140
+ python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
136
141
python -m pytest -n 4 --max-worker-restart=0 --dist=loadfile \
137
142
-s -v -k "not Flax and not Onnx and not Dependency" \
138
143
--make-reports=tests_${{ matrix.config.report }} \
@@ -141,6 +146,7 @@ jobs:
141
146
- name : Run example PyTorch CPU tests
142
147
if : ${{ matrix.config.framework == 'pytorch_examples' }}
143
148
run : |
149
+ python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
144
150
python -m uv pip install peft timm
145
151
python -m pytest -n 4 --max-worker-restart=0 --dist=loadfile \
146
152
--make-reports=tests_${{ matrix.config.report }} \
@@ -190,15 +196,18 @@ jobs:
190
196
191
197
- name : Install dependencies
192
198
run : |
193
- python -m uv pip install -e [quality]
199
+ python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
200
+ python -m uv pip install -e [quality,test]
194
201
195
202
- name : Environment
196
203
run : |
204
+ python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
197
205
python utils/print_env.py
198
206
199
207
- name : Run Hub tests for models, schedulers, and pipelines on a staging env
200
208
if : ${{ matrix.config.framework == 'hub_tests_pytorch' }}
201
209
run : |
210
+ python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
202
211
HUGGINGFACE_CO_STAGING=true python -m pytest \
203
212
-m "is_staging_test" \
204
213
--make-reports=tests_${{ matrix.config.report }} \
@@ -241,18 +250,22 @@ jobs:
241
250
242
251
- name : Install dependencies
243
252
run : |
244
- python -m uv pip install -e [quality]
253
+ python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
254
+ python -m uv pip install -e [quality,test]
245
255
# TODO (sayakpaul, DN6): revisit `--no-deps`
246
256
python -m pip install -U peft@git+https://github.com/huggingface/peft.git --no-deps
257
+ python -m uv pip install -U tokenizers
247
258
pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git --no-deps
248
259
pip uninstall transformers -y && pip uninstall huggingface_hub -y && python -m uv pip install --prerelease allow -U transformers@git+https://github.com/huggingface/transformers.git
249
260
250
261
- name : Environment
251
262
run : |
263
+ python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
252
264
python utils/print_env.py
253
265
254
266
- name : Run fast PyTorch LoRA tests with PEFT
255
267
run : |
268
+ python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
256
269
python -m pytest -n 4 --max-worker-restart=0 --dist=loadfile \
257
270
-s -v \
258
271
--make-reports=tests_peft_main \
@@ -274,4 +287,3 @@ jobs:
274
287
with :
275
288
name : pr_main_test_reports
276
289
path : reports
277
-
0 commit comments