Skip to content

Commit 5f87dff

Browse files
committed
fix test
1 parent f56b224 commit 5f87dff

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

tests/conftest.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,9 @@ def huggingface_pytorch_training_version(huggingface_training_version):
277277

278278
@pytest.fixture(scope="module")
279279
def huggingface_pytorch_training_py_version(huggingface_pytorch_training_version):
280-
if Version(huggingface_pytorch_training_version) >= Version("1.13"):
280+
if Version(huggingface_pytorch_training_version) >= Version("2.0"):
281+
return "py310"
282+
elif Version(huggingface_pytorch_training_version) >= Version("1.13"):
281283
return "py39"
282284
elif Version(huggingface_pytorch_training_version) >= Version("1.9"):
283285
return "py38"
@@ -337,7 +339,9 @@ def huggingface_training_compiler_pytorch_py_version(
337339
def huggingface_pytorch_latest_training_py_version(
338340
huggingface_training_pytorch_latest_version,
339341
):
340-
if Version(huggingface_training_pytorch_latest_version) >= Version("1.13"):
342+
if Version(huggingface_training_pytorch_latest_version) >= Version("2.0"):
343+
return "py310"
344+
elif Version(huggingface_training_pytorch_latest_version) >= Version("1.13"):
341345
return "py39"
342346
elif Version(huggingface_training_pytorch_latest_version) >= Version("1.9"):
343347
return "py38"
@@ -359,7 +363,9 @@ def pytorch_training_compiler_py_version(
359363
def huggingface_pytorch_latest_inference_py_version(
360364
huggingface_inference_pytorch_latest_version,
361365
):
362-
if Version(huggingface_inference_pytorch_latest_version) >= Version("1.13"):
366+
if Version(huggingface_inference_pytorch_latest_version) >= Version("2.0"):
367+
return "py310"
368+
elif Version(huggingface_inference_pytorch_latest_version) >= Version("1.13"):
363369
return "py39"
364370
elif Version(huggingface_inference_pytorch_latest_version) >= Version("1.9"):
365371
return "py38"

0 commit comments

Comments
 (0)