|
28 | 28 | from tests.integ.utils import gpu_list, retry_with_instance_list
|
29 | 29 | from tests.integ.s3_utils import assert_s3_file_patterns_exist
|
30 | 30 |
|
| 31 | +from packaging.version import Version |
31 | 32 |
|
32 | 33 | ROLE = "SageMakerRole"
|
33 | 34 |
|
@@ -56,6 +57,12 @@ def test_framework_processing_job_with_deps(
|
56 | 57 | tensorflow_training_latest_py_version,
|
57 | 58 | **kwargs,
|
58 | 59 | ):
|
| 60 | + if ( |
| 61 | + Version(tensorflow_training_latest_version) >= Version("2.12") |
| 62 | + and kwargs["instance_type"] == "ml.p2.xlarge" |
| 63 | + ): |
| 64 | + pytest.skip("P2 instances have been deprecated for sagemaker jobs starting TensorFlow 2.12") |
| 65 | + |
59 | 66 | with timeout.timeout(minutes=TRAINING_DEFAULT_TIMEOUT_MINUTES):
|
60 | 67 | code_path = os.path.join(DATA_DIR, "dummy_code_bundle_with_reqs")
|
61 | 68 | entry_point = "main_script.py"
|
@@ -187,6 +194,12 @@ def test_mwms_gpu(
|
187 | 194 | capsys,
|
188 | 195 | **kwargs,
|
189 | 196 | ):
|
| 197 | + if ( |
| 198 | + Version(tensorflow_training_latest_version) >= Version("2.12") |
| 199 | + and kwargs["instance_type"] == "ml.p2.xlarge" |
| 200 | + ): |
| 201 | + pytest.skip("P2 instances have been deprecated for sagemaker jobs starting TensorFlow 2.12") |
| 202 | + |
190 | 203 | instance_count = 2
|
191 | 204 | estimator = TensorFlow(
|
192 | 205 | source_dir=os.path.join(RESOURCE_PATH, "tensorflow_mnist"),
|
@@ -243,6 +256,12 @@ def test_mnist_distributed_gpu(
|
243 | 256 | tensorflow_training_latest_py_version,
|
244 | 257 | **kwargs,
|
245 | 258 | ):
|
| 259 | + if ( |
| 260 | + Version(tensorflow_training_latest_version) >= Version("2.12") |
| 261 | + and kwargs["instance_type"] == "ml.p2.xlarge" |
| 262 | + ): |
| 263 | + pytest.skip("P2 instances have been deprecated for sagemaker jobs starting TensorFlow 2.12") |
| 264 | + |
246 | 265 | _create_and_fit_estimator(
|
247 | 266 | sagemaker_session,
|
248 | 267 | tensorflow_training_latest_version,
|
|
0 commit comments