Skip to content

Commit f429926

Browse files
author
BruceZhang@eitug
committed
add a todo to conftest to get latest py_version
1 parent 14fd82c commit f429926

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

tests/conftest.py

+15
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,21 @@ def huggingface_pytorch_latest_training_py_version(
318318
)
319319

320320

321+
@pytest.fixture(scope="module")
322+
def pytorch_training_compiler_py_version(
323+
pytorch_training_compiler_version,
324+
):
325+
return "py39" if Version(pytorch_training_compiler_version) > Version("1.12") else "py38"
326+
327+
328+
# TODO:
329+
# @pytest.fixture(scope="module")
330+
# def pytorch_training_compiler_latest_py_version(
331+
# pytorch_training_compiler_latest_version,
332+
# ):
333+
# return "py39" if Version(pytorch_training_compiler_latest_version) > Version("1.12") else "py38"
334+
335+
321336
@pytest.fixture(scope="module")
322337
def huggingface_pytorch_latest_inference_py_version(
323338
huggingface_inference_pytorch_latest_version,

tests/unit/sagemaker/training_compiler/test_pytorch_compiler.py

-7
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,6 @@ def cpu_instance_type():
6161
return "ml.m5.xlarge"
6262

6363

64-
@pytest.fixture(scope="module")
65-
def pytorch_training_compiler_py_version(
66-
pytorch_training_compiler_version,
67-
):
68-
return "py39" if Version(pytorch_training_compiler_version) > Version("1.12") else "py38"
69-
70-
7164
@pytest.fixture(name="sagemaker_session", scope="function")
7265
def fixture_sagemaker_session():
7366
boto_mock = Mock(name="boto_session", region_name=REGION)

0 commit comments

Comments
 (0)