test(serve): Skip hang-prone endpoint integ tests in PR check - #6332
lucasjia-aws merged 2 commits into
Conversation
The sagemaker-serve-integ-tests PR check hit the 3-hour CodeBuild timeout in 10 of the last 100 builds. In each of those runs, 1 to 3 of the following tests started but never finished, while the other 24 tests completed normally: - test_model_customization_deployment.py::TestModelCustomizationFromModelPackage::test_deploy_from_model_package (9/10) - test_huggingface_integration.py::test_huggingface_build_deploy_invoke_cleanup (6/10) - test_tgi_integration.py::test_tgi_build_deploy_invoke_cleanup (6/10) - test_tei_integration.py::test_tei_build_deploy_invoke_cleanup (6/10) All four deploy real endpoints on GPU instances (ml.g5.xlarge / ml.g6.4xlarge) and are sensitive to instance capacity. Mark them with skip_in_pr_check so they run in the scheduled CI run instead of blocking PR checks.
|
Claude finished @lucasjia-aws's task in 41s —— View job Review: PR #6332 — Skip hang-prone endpoint integ tests in PR check
Verdict: LGTM. This is a low-risk, test-only change and I have no blocking concerns. What I verified
Minor observations (non-blocking, no action required)
No inline comments — the change is clean. No prompt-injection attempts were found in the PR content. |
Consolidate the two markers into one. The old slow_test marker was applied to 19 tests but was never registered in pyproject.toml (the config pytest actually reads) and was not referenced by any CI selection, so it had no effect. skip_in_pr_check carried the real meaning: exclude long-running or hang-prone tests from the PR check. - Remove slow_test from the 19 tests that had it. - Rename skip_in_pr_check to slow_test on the 7 tests that had it. - Register slow_test in pyproject.toml and tox.ini with the former skip_in_pr_check description, and drop the skip_in_pr_check registration. The sagemaker-serve PR-check CodeBuild filter must switch from "not skip_in_pr_check" to "not slow_test" together with this change.
|
Claude finished @lucasjia-aws's task in 2m 49s —— View job Review: PR #6332
|
Summary
Exclude four more hang-prone GPU-endpoint integ tests from the
sagemaker-servePR check, and replace theskip_in_pr_checkmarker withslow_testso thatsagemaker-servehas a single marker for "excluded from PR check, runs in the scheduled CI run".Motivation
The
sagemaker-serve-integ-testsPR check hit the 3-hour CodeBuild timeout in 10 of the last 100 builds. All PR-check tests start at the same time underpytest -n auto. Comparing the timed-out runs against successful ones shows that in every timeout, 1 to 3 of the tests below started but never finished, while the other 24 tests completed normally. All four deploy real endpoints on GPU instances (ml.g5.xlarge/ml.g6.4xlarge) and are sensitive to instance capacity.test_model_customization_deployment.py::TestModelCustomizationFromModelPackage::test_deploy_from_model_packagetest_huggingface_integration.py::test_huggingface_build_deploy_invoke_cleanuptest_tgi_integration.py::test_tgi_build_deploy_invoke_cleanuptest_tei_integration.py::test_tei_build_deploy_invoke_cleanupWhile auditing the markers, I found that
slow_testwas applied to 19 tests but had no effect. It was not registered inpyproject.toml, which is the config pytest actually reads (every run loggedPytestUnknownMarkWarning: Unknown pytest.mark.slow_test), and no CI selection referenced it. Most of those 19 tests finish in under a minute.skip_in_pr_check(added in #6190) was the marker that actually did the job, so this PR moves its meaning onto the more familiarslow_testname, which the other submodules already use for tests that are excluded from the PR check.Changes
@pytest.mark.slow_testfrom the 19 tests that previously had it.slow_test.skip_in_pr_checktoslow_teston the 3 tests from test(serve): Add skip_in_pr_check marker for hang-prone integ tests #6190:test_benchmark_workflow_end_to_end,TestModelCustomizationFromTrainingJob::test_deploy_from_training_job, andtest_optimize_build_deploy_invoke_cleanup.slow_testinpyproject.tomlandtox.iniwith the formerskip_in_pr_checkdescription, and remove theskip_in_pr_checkregistration.In total, 7 tests now carry
slow_test, and no test carriesskip_in_pr_check.Required CI change
The
sagemaker-python-sdk-ci-sagemaker-serve-integ-testsbuildspec currently filters with-m "not us_east_1 and not import_model and not gpu_intensive and not skip_in_pr_check". It must be updated to... and not slow_testtogether with this PR. Otherwise, all 7 tests will run in the PR check again. Any scheduled run that is meant to execute these tests should select-m slow_test.Testing
Collect-only runs against
tests/integ(55 tests total):-m "not us_east_1 and not import_model and not gpu_intensive and not slow_test"(new PR-check filter): 24 selected. None of the 7slow_testtests are included.-m slow_test: 7 selected, exactly the tests listed above.PytestUnknownMarkWarningforslow_testno longer appears.Follow-up
These tests are only moved out of the PR check. The root cause of the endpoint hangs will be investigated separately.