Skip to content

chore: add flaky test markers & skip region with low P3 instance capacity #4870

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tests/integ/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
"ap-south-1",
"ap-northeast-2", # it has p3, but not enough
"us-east-2", # it has p3, but not enough
"eu-west-1", # it has p3, but not enough
]

# EI is currently only supported in the following regions
Expand Down
8 changes: 8 additions & 0 deletions tests/integ/test_huggingface.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@


@pytest.mark.release
@pytest.mark.skipif(
tests.integ.test_region() in tests.integ.TRAINING_NO_P3_REGIONS,
reason="No P3 instances or low capacity in this region",
)
def test_framework_processing_job_with_deps(
sagemaker_session,
huggingface_training_latest_version,
Expand Down Expand Up @@ -59,6 +63,10 @@ def test_framework_processing_job_with_deps(


@pytest.mark.release
@pytest.mark.skipif(
tests.integ.test_region() in tests.integ.TRAINING_NO_P3_REGIONS,
reason="No P3 instances or low capacity in this region",
)
def test_huggingface_training(
sagemaker_session,
huggingface_training_latest_version,
Expand Down
4 changes: 4 additions & 0 deletions tests/integ/test_training_compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ def skip_if_incompatible(gpu_instance_type, request):
pytest.param("ml.p3.16xlarge", 2),
],
)
@pytest.mark.skipif(
integ.test_region() in integ.TRAINING_NO_P3_REGIONS,
reason="No P3 instances or low capacity in this region",
)
def test_huggingface_pytorch(
sagemaker_session,
gpu_instance_type,
Expand Down
2 changes: 2 additions & 0 deletions tests/unit/sagemaker/jumpstart/test_notebook_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ def test_list_jumpstart_models_simple_case(

@patch("sagemaker.jumpstart.accessors.JumpStartModelsAccessor._get_manifest")
@patch("sagemaker.jumpstart.notebook_utils.DEFAULT_JUMPSTART_SAGEMAKER_SESSION.read_s3_file")
@pytest.mark.flaky(reruns=5, reruns_delay=1)
def test_list_jumpstart_models_script_filter(
self, patched_read_s3_file: Mock, patched_get_manifest: Mock
):
Expand Down Expand Up @@ -583,6 +584,7 @@ def vulnerable_training_model_spec(bucket, key, *args, **kwargs):

@patch("sagemaker.jumpstart.accessors.JumpStartModelsAccessor._get_manifest")
@patch("sagemaker.jumpstart.notebook_utils.DEFAULT_JUMPSTART_SAGEMAKER_SESSION.read_s3_file")
@pytest.mark.flaky(reruns=5, reruns_delay=1)
def test_list_jumpstart_models_deprecated_models(
self,
patched_read_s3_file: Mock,
Expand Down
1 change: 1 addition & 0 deletions tests/unit/sagemaker/workflow/test_transform_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
custom_step.properties.OutputDataConfig.S3OutputPath,
],
)
@pytest.mark.flaky(reruns=5, reruns_delay=1)
def test_transform_step_with_transformer(model_name, data, output_path, pipeline_session):
transformer = Transformer(
model_name=model_name,
Expand Down