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
8 changes: 7 additions & 1 deletion sagemaker-train/tests/integ/train/shallow/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ What this suite changes about the gate is not which job runs, but what the exist
one selects: the `gpu_intensive` marks added here deselect the deep tests that
submit a job and wait for it, and this suite covers those code paths instead.

`integ-tests` does not rerun this suite. It invokes pytest through tox over the
whole `tests/integ` tree, which would otherwise sweep this directory in and submit
every job here a second time on the same commit. `tox.ini` passes
`--ignore=tests/integ/train/shallow` to keep that from happening; `fast-integ-tests`
calls pytest directly, so the ignore does not apply to it.

> **Where this runs.** The `fast-integ-tests` job in `pr-checks-master.yml` does not
> execute this suite on the GitHub runner — it starts the CodeBuild project
> `sagemaker-python-sdk-ci-sagemaker-train-fast-integ-tests` via
Expand All @@ -19,7 +25,7 @@ submit a job and wait for it, and this suite covers those code paths instead.
> — which is nearly all of them — without exposing those credentials to PR code.
>
> **Consequence for editing this suite:** the marker selection above (`-n 8`,
> `--dist loadfile`, `-m "not gpu_intensive and not us_east_1"`) lives in
> `-m "not gpu_intensive and not us_east_1"`) lives in
> `createCIShallowIntegBuildSpec` in the `SageMakerMLFPySDKInfraCDK` package, not in
> this repo. Adding a file under `shallow/` is picked up automatically, but changing
> *how* the suite is invoked means a change there, which deploys through a pipeline
Expand Down
10 changes: 9 additions & 1 deletion sagemaker-train/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,15 @@ commands =
pip install 'torchvision==0.18.1+cpu' -f 'https://download.pytorch.org/whl/torch_stable.html'
pip install 'dill>=0.3.9'

pytest {posargs}
# --ignore keeps the shallow suite out of directory sweeps like
# `tox -- tests/integ`, which is how the deep integ-tests CodeBuild project
# invokes pytest. Without it, that project reruns all ~100 shallow tests
# that fast-integ-tests has already run on the same commit -- duplicate
# CreateTrainingJob calls against the shared job quota, for no extra
# coverage. fast-integ-tests calls pytest directly rather than through tox,
# so it is unaffected. --ignore only prunes recursion, so naming the
# directory explicitly (`tox -- tests/integ/train/shallow`) still runs it.
pytest --ignore=tests/integ/train/shallow {posargs}
deps =
-r ../requirements/extras/test_requirements.txt
../sagemaker-core
Expand Down
Loading