|
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,14 @@ 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( |
| 65 | + f"P2 instances have been deprecated for sagemaker jobs starting TensorFlow 2.12" |
| 66 | + ) |
| 67 | + |
59 | 68 | with timeout.timeout(minutes=TRAINING_DEFAULT_TIMEOUT_MINUTES):
|
60 | 69 | code_path = os.path.join(DATA_DIR, "dummy_code_bundle_with_reqs")
|
61 | 70 | entry_point = "main_script.py"
|
@@ -187,6 +196,14 @@ def test_mwms_gpu(
|
187 | 196 | capsys,
|
188 | 197 | **kwargs,
|
189 | 198 | ):
|
| 199 | + if ( |
| 200 | + Version(tensorflow_training_latest_version) >= Version("2.12") |
| 201 | + and kwargs["instance_type"] == "ml.p2.xlarge" |
| 202 | + ): |
| 203 | + pytest.skip( |
| 204 | + f"P2 instances have been deprecated for sagemaker jobs starting TensorFlow 2.12" |
| 205 | + ) |
| 206 | + |
190 | 207 | instance_count = 2
|
191 | 208 | estimator = TensorFlow(
|
192 | 209 | source_dir=os.path.join(RESOURCE_PATH, "tensorflow_mnist"),
|
@@ -243,6 +260,14 @@ def test_mnist_distributed_gpu(
|
243 | 260 | tensorflow_training_latest_py_version,
|
244 | 261 | **kwargs,
|
245 | 262 | ):
|
| 263 | + if ( |
| 264 | + Version(tensorflow_training_latest_version) >= Version("2.12") |
| 265 | + and kwargs["instance_type"] == "ml.p2.xlarge" |
| 266 | + ): |
| 267 | + pytest.skip( |
| 268 | + f"P2 instances have been deprecated for sagemaker jobs starting TensorFlow 2.12" |
| 269 | + ) |
| 270 | + |
246 | 271 | _create_and_fit_estimator(
|
247 | 272 | sagemaker_session,
|
248 | 273 | tensorflow_training_latest_version,
|
|
0 commit comments