Skip to content

Commit 2ba24a9

Browse files
Pin safetensors for torch 2.2.2 tests
1 parent ee5fd87 commit 2ba24a9

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

.github/workflows/tests.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,11 @@ jobs:
149149
pip install pytest-cov
150150
151151
# We need to downgrade to numpy<2 for torch<2.3 compatibility.
152-
- name: Downgrade NumPy
152+
# Additionally, we need to pin safetensors to <0.6.1 for torch<2.3 compatibility.
153+
# See: https://github.com/huggingface/safetensors/issues/641
154+
- name: Downgrade numpy and safetensors
153155
if: startsWith(matrix.torch_version, '2.2.')
154-
run: pip install "numpy<2"
156+
run: pip install "numpy<2" "safetensors<0.6.1"
155157

156158
- name: Show installed packages
157159
run: pip list
@@ -448,10 +450,12 @@ jobs:
448450
pip install -e ".[test]"
449451
pip install pytest-cov
450452
451-
# We need to downgrade to numpy<2 for torch<2.3 compatibility.
452-
- name: Downgrade NumPy
453+
# We need to downgrade to numpy<2 for torch<2.3 compatibility.
454+
# Additionally, we need to pin safetensors to <0.6.1 for torch<2.3 compatibility.
455+
# See: https://github.com/huggingface/safetensors/issues/641
456+
- name: Downgrade numpy and safetensors
453457
if: startsWith(matrix.torch_version, '2.2.')
454-
run: pip install "numpy<2"
458+
run: pip install "numpy<2" "safetensors<0.6.1"
455459

456460
- name: Show installed packages
457461
run: pip list

0 commit comments

Comments
 (0)