Skip to content

Commit 3781228

Browse files
authored
Merge pull request #43 from leobavila/fix-amp-get-pytorch-version
Update amp.py
2 parents 250114a + 1d4f1be commit 3781228

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

splade/tasks/amp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# inspired from Colbert repo: https://github.com/stanford-futuredata/ColBERT
44

5-
PyTorch_over_1_6 = float((torch.__version__.split('.')[1])) >= 6 and float((torch.__version__.split('.')[0])) >= 1
5+
PyTorch_over_1_6 = float(".".join([torch.__version__.split('.')[0], torch.__version__.split('.')[1]])) >= 1.6
66

77

88
# replace this with contextlib.nullcontext if python >3.7

0 commit comments

Comments
 (0)