Skip to content

Commit b6bf8cf

Browse files
authored
Fixing Pytorch training python version in tests (#5084)
* Fixing Pytorch training python version in tests * Updating Inference test handling
1 parent 30fe0ee commit b6bf8cf

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/conftest.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,8 @@ def mxnet_eia_latest_py_version():
254254

255255
@pytest.fixture(scope="module", params=["py2", "py3"])
256256
def pytorch_training_py_version(pytorch_training_version, request):
257+
if Version(pytorch_training_version) >= Version("2.6"):
258+
return "py312"
257259
if Version(pytorch_training_version) >= Version("2.3"):
258260
return "py311"
259261
elif Version(pytorch_training_version) >= Version("2.0"):
@@ -270,7 +272,9 @@ def pytorch_training_py_version(pytorch_training_version, request):
270272

271273
@pytest.fixture(scope="module", params=["py2", "py3"])
272274
def pytorch_inference_py_version(pytorch_inference_version, request):
273-
if Version(pytorch_inference_version) >= Version("2.3"):
275+
if Version(pytorch_inference_version) >= Version("2.6"):
276+
return "py312"
277+
elif Version(pytorch_inference_version) >= Version("2.3"):
274278
return "py311"
275279
elif Version(pytorch_inference_version) >= Version("2.0"):
276280
return "py310"

0 commit comments

Comments
 (0)