Skip to content
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
2 changes: 1 addition & 1 deletion sagemaker-serve/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = "-v --tb=short"
markers = [
"skip_in_pr_check: mark a test that is excluded from PR check runs. Long-running or hang-prone tests that would otherwise push the run past the CodeBuild timeout; they run in a dedicated scheduled CI run instead.",
"slow_test: mark a test that is excluded from PR check runs. Long-running or hang-prone tests that would otherwise push the run past the CodeBuild timeout; they run in a dedicated scheduled CI run instead.",
]

[tool.black]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ def test_list_benchmarks_and_recommendations_plumbing():
logger.info("Non-matching filters correctly returned empty lists.")


@pytest.mark.slow_test
@pytest.mark.gpu_intensive
def test_recommendation_deploy_best_and_compare_e2e():
"""Full flow across all three enhancements, sharing one rec job + endpoint:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ def _build_jumpstart_model_builder(role_arn):


@pytest.mark.slow_test
@pytest.mark.skip_in_pr_check
def test_benchmark_workflow_end_to_end():
"""Deploy a JumpStart endpoint, run a benchmark against it, parse the result."""
logger.info("Starting AI inference recommender benchmark integration test...")
Expand Down Expand Up @@ -127,7 +126,6 @@ def test_benchmark_workflow_end_to_end():
)


@pytest.mark.slow_test
@pytest.mark.gpu_intensive
def test_recommendation_workflow_end_to_end():
"""Run an AI recommendation via generate_deployment_recommendations and deploy the top recommendation."""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ def _src(uri):
]


@pytest.mark.slow_test
@pytest.mark.gpu_intensive
def test_deploy_sdkt_model_as_inference_component():
"""A model carrying SD/KT AdditionalModelDataSources deploys as an
Expand Down
1 change: 0 additions & 1 deletion sagemaker-serve/tests/integ/test_in_process_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ def invoke(self, input_object, model):
return {"result": result, "operation": f"multiply by {factor}"}


@pytest.mark.slow_test
def test_in_process_build_deploy_invoke_cleanup():
"""Integration test for In-Process mode build, deploy, invoke, and cleanup workflow"""
logger.info("Starting In-Process integration test...")
Expand Down
2 changes: 0 additions & 2 deletions sagemaker-serve/tests/integ/test_jumpstart_deploy_parity.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
MODEL_NAME_PREFIX = "js-netiso-test"


@pytest.mark.slow_test
def test_jumpstart_build_enables_network_isolation():
"""Integration test verifying JumpStart models are built with EnableNetworkIsolation.

Expand Down Expand Up @@ -71,7 +70,6 @@ def test_jumpstart_build_enables_network_isolation():
VOLUME_SIZE_INSTANCE_TYPE = "ml.inf2.xlarge"


@pytest.mark.slow_test
def test_jumpstart_build_sets_volume_size():
"""Integration test verifying volume_size from model specs is propagated.

Expand Down
1 change: 0 additions & 1 deletion sagemaker-serve/tests/integ/test_jumpstart_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
SERVE_SAGEMAKER_ENDPOINT_TIMEOUT = 15


@pytest.mark.slow_test
@pytest.mark.gpu_intensive
def test_jumpstart_build_deploy_invoke_cleanup():
"""Integration test for JumpStart model build, deploy, invoke, and cleanup workflow"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
MODEL_NAME_PREFIX = "js-vllm-test-model"


@pytest.mark.slow_test
def test_jumpstart_vllm_build():
"""Integration test for JumpStart model using vLLM container image.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def test_build_from_training_job(self, training_job_name, sagemaker_session):
assert model_builder.image_uri is not None
assert model_builder.instance_type is not None

@pytest.mark.skip_in_pr_check
@pytest.mark.slow_test
def test_deploy_from_training_job(self, training_job_name, sagemaker_session):
"""Deploy, reuse, invoke, and clean up one training-job endpoint."""
test_id = uuid.uuid4().hex
Expand Down Expand Up @@ -325,6 +325,7 @@ def test_build_from_model_package(self, model_package_arn, sagemaker_session):
assert model is not None
assert model.model_arn is not None

@pytest.mark.slow_test
def test_deploy_from_model_package(
self, model_package_arn, cleanup_endpoints, sagemaker_session
):
Expand Down
2 changes: 1 addition & 1 deletion sagemaker-serve/tests/integ/test_optimize_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
DJL_LMI_VERSION = "0.31.0"


@pytest.mark.skip_in_pr_check
@pytest.mark.slow_test
def test_optimize_build_deploy_invoke_cleanup():
"""Integration test for Optimize workflow"""
logger.info("Starting Optimize integration test...")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ def _tar_members(s3_client, s3_uri):
return tarfile.open(fileobj=io.BytesIO(body), mode="r:gz").getnames()


@pytest.mark.slow_test
def test_build_repacks_source_code_into_artifact():
"""build() with image_uri + model artifact + source_code repacks code/ into
the model.tar.gz. No deploy - runs in seconds."""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ def execution_role():
return f"arn:aws:iam::{account_id}:role/Admin"


@pytest.mark.slow_test
def test_from_jumpstart_config_derives_hub_arn(private_hub, sagemaker_session):
"""Verify from_jumpstart_config correctly derives hub_arn from hub_name."""
js_config = JumpStartConfig(
Expand All @@ -176,7 +175,6 @@ def test_from_jumpstart_config_derives_hub_arn(private_hub, sagemaker_session):
logger.info("hub_arn correctly derived: %s", mb.hub_arn)


@pytest.mark.slow_test
def test_build_resolves_artifacts_via_private_hub(private_hub, execution_role, sagemaker_session):
"""Verify build() resolves model data through the private hub."""
js_config = JumpStartConfig(
Expand Down Expand Up @@ -388,7 +386,6 @@ def _deploy_and_assert_hub_access_config(
logger.warning("Cleanup failed for %s: %s", kwargs, e)


@pytest.mark.slow_test
def test_deploy_with_no_s3_execution_role(private_hub, no_s3_execution_role, sagemaker_session):
"""E2E: deploy from a private hub with an execution role that has ZERO
S3 permissions. Passes only when the SDK attaches HubAccessConfig to
Expand All @@ -406,7 +403,6 @@ def test_deploy_with_no_s3_execution_role(private_hub, no_s3_execution_role, sag
)


@pytest.mark.slow_test
def test_deploy_with_aliased_hub_content_name(
private_hub, aliased_model_reference, no_s3_execution_role, sagemaker_session
):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
TRAINING_JOB_PREFIX = "e2e-v3-pytorch"


@pytest.mark.slow_test
def test_train_inference_e2e_build_deploy_invoke_cleanup():
"""Integration test for Train-Inference E2E workflow"""
logger.info("Starting Train-Inference E2E integration test...")
Expand Down
1 change: 0 additions & 1 deletion sagemaker-serve/tests/integ/test_triton_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ def forward(self, x):
return torch.softmax(self.linear(x), dim=1)


@pytest.mark.slow_test
def test_triton_build_deploy_invoke_cleanup():
"""Integration test for Triton model build, deploy, invoke, and cleanup workflow"""
logger.info("Starting Triton integration test...")
Expand Down
3 changes: 1 addition & 2 deletions sagemaker-serve/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,13 @@ markers =
canary_quick
cron
local_mode
slow_test
slow_test: mark a test that is excluded from PR check runs. Long-running or hang-prone tests that would otherwise push the run past the CodeBuild timeout; they run in a dedicated scheduled CI run instead.
release
image_uris_unit_test
timeout: mark a test as a timeout.
gpu_intensive: mark a test as GPU resource intensive (runs on scheduled CI, not PR checks).
us_east_1: mark a test that requires us-east-1 test account credentials (784379639078).
import_model: mark a test that creates a Bedrock model import job. Concurrent model import jobs are capped at 1 by a non-raisable Bedrock service quota, so these run serially in a dedicated scheduled CI run, not in PR checks.
skip_in_pr_check: mark a test that is excluded from PR check runs. Long-running or hang-prone tests that would otherwise push the run past the CodeBuild timeout; they run in a dedicated scheduled CI run instead.

[testenv]
setenv =
Expand Down
Loading