Skip to content

Commit a68e383

Browse files
tejaschumbalkarknikure
authored andcommitted
fix test failures
1 parent b66868a commit a68e383

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

tests/integ/test_training_compiler.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,12 @@ def test_tensorflow(
224224
"""
225225
Test the TensorFlow estimator
226226
"""
227-
if version.parse(tensorflow_training_latest_version) < version.parse("2.9"):
228-
pytest.skip("Training Compiler only supports TF >= 2.9")
227+
if (
228+
version.parse("2.9")
229+
<= version.parse(tensorflow_training_latest_version)
230+
< version.parse("2.12")
231+
):
232+
pytest.skip("Training Compiler only supports TF >= 2.9 and < 2.12")
229233
with timeout(minutes=TRAINING_DEFAULT_TIMEOUT_MINUTES):
230234
epochs = 10
231235
batch = 256

tests/unit/sagemaker/image_uris/test_dlc_frameworks.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ def _test_image_uris(
7272
}
7373

7474
TYPES_AND_PROCESSORS = INSTANCE_TYPES_AND_PROCESSORS
75-
if framework == "pytorch" and Version(fw_version) >= Version("1.13"):
75+
if (framework == "pytorch" and Version(fw_version) >= Version("1.13")) or (
76+
framework == "tensorflow" and Version(fw_version) >= Version("2.12")
77+
):
7678
"""Handle P2 deprecation"""
7779
TYPES_AND_PROCESSORS = RENEWED_PYTORCH_INSTANCE_TYPES_AND_PROCESSORS
7880

tests/unit/sagemaker/training_compiler/test_tensorflow_compiler.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@
5757

5858
@pytest.fixture(scope="module", autouse=True)
5959
def skip_if_incompatible(tensorflow_training_version, request):
60-
if version.parse(tensorflow_training_version) < version.parse("2.9"):
61-
pytest.skip("Training Compiler only supports TF >= 2.9")
60+
if version.parse("2.9") <= version.parse(tensorflow_training_version) < version.parse("2.12"):
61+
pytest.skip("Training Compiler only supports TF >= 2.9 and < 2.12")
6262

6363

6464
@pytest.fixture(scope="module")

0 commit comments

Comments
 (0)