Repository navigation
[Data] Enable spilling and OOM check for remaining multimodal release tests (#64298) (cherry-pick 2.56.1) - #64758
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces OOM prevention best practices and refines OOM/spilling checks across multimodal inference benchmarks. Specifically, it configures Ray Data context settings to isolate read workers and enable logical memory mapping, applies memory limits to transcription tasks, and filters out expected idle worker evictions from OOM metrics. Feedback suggests removing the memory limit on the row-by-row resample step to avoid unnecessary concurrency bottlenecks, and adding defensive type checks in the OOM filtering function to prevent potential runtime errors.
| ds = ray.data.read_parquet(INPUT_PATH) | ||
| ds = ds.map(resample) | ||
| ds = ds.map_batches(whisper_preprocess, batch_size="auto") | ||
| ds = ds.map(resample, memory=PREPROCESS_MEMORY) |
There was a problem hiding this comment.
Setting memory=PREPROCESS_MEMORY (~3.1 GB) on ds.map(resample) unnecessarily limits the concurrency of the resampling step. Since resample is a row-by-row map that only processes a single audio file at a time, its memory footprint is very small (typically a few megabytes). Restricting it to 3.1 GB of logical memory will cause Ray to schedule very few concurrent resampling tasks, creating a performance bottleneck. Only the batch-based whisper_preprocess step requires the high memory limit.
| ds = ds.map(resample, memory=PREPROCESS_MEMORY) | |
| ds = ds.map(resample) |
| return [ | ||
| series | ||
| for series in worker_oom_kills | ||
| if series.get("metric", {}).get("Type") != IDLE_WORKER_EVICTION_METRIC_TYPE | ||
| ] |
There was a problem hiding this comment.
To prevent potential AttributeError or TypeError during the OOM check, we should defensively verify that worker_oom_kills is a list and that each series element is a dictionary before attempting to access its keys.
| return [ | |
| series | |
| for series in worker_oom_kills | |
| if series.get("metric", {}).get("Type") != IDLE_WORKER_EVICTION_METRIC_TYPE | |
| ] | |
| if not isinstance(worker_oom_kills, list): | |
| return [] | |
| return [ | |
| series | |
| for series in worker_oom_kills | |
| if isinstance(series, dict) and series.get("metric", {}).get("Type") != IDLE_WORKER_EVICTION_METRIC_TYPE | |
| ] |
… tests (#64298) Now that we've fixed the issue where we don't subtract system memory from logical memory in our release test environment, I'm bumping up the spilling and OOM ratchets for the multimodal release tests. In this PR, I've: * Enabled the OOM ratchet for the audio and video release tests * Enabled the spilling ratchet for all multimodal release tests * Fixed a minor issue where I didn't configure `DataContext` currently in the video release test * Added best practices to the audio release test --------- Signed-off-by: Balaji Veeramani <[email protected]> Signed-off-by: elliot-barn <[email protected]>
1952e6a to
8add10d
Compare
…64630) (cherry-pick 2.56.1) (#64761) Cherry-pick of #64630 onto `releases/2.56.1` to fix the failing ReadTheDocs build on the 2.56.1 release line. Original PR: #64630 ## Why The docs build on `releases/2.56.1` fails under `fail_on_warning` (-W) with 3 warnings, all from stale references to a renamed sphinx-collections example: ``` tune/examples/index.rst:25: WARNING: toctree contains reference to nonexisting document '_collections/tune/examples/tune_pytorch_asha/tune_pytorch_asha' tune/examples/index.rst:48: WARNING: unknown document: '.../tune_pytorch_asha/tune_pytorch_asha' tune-pytorch-cifar.ipynb: WARNING: unknown document: '.../tune_pytorch_asha/tune_pytorch_asha' ``` The ASHA example is pulled at build time via `sphinx-collections`; its published notebook was renamed to `README.ipynb`, so the canonical document is now `.../tune_pytorch_asha/README`. The old `tune_pytorch_asha` document no longer exists in the published archive. ## What - `conf.py`: remove the now-wrong `_collections/tune/examples/tune_pytorch_asha/README.md` exclusion (that exclusion was deleting the canonical README page). - `tune/examples/index.rst`: repoint the toctree entry and the `:doc:` list-table row to `.../tune_pytorch_asha/README`. - `tune/examples/tune-pytorch-cifar.ipynb`: repoint the `{doc}` link in the "See More PyTorch Examples" cell. Clean cherry-pick (no conflicts). Verified no `tune_pytorch_asha/tune_pytorch_asha` references remain. ## Note This is a pre-existing docs-build breakage on the release branch (independent of any code cherry-picks). Once merged, in-flight 2.56.1 cherry-pick PRs (#64757, #64758) can be rebased to get green docs builds. --------- Signed-off-by: Douglas Strodtman <[email protected]> Signed-off-by: elliot-barn <[email protected]> Co-authored-by: Douglas Strodtman <[email protected]> Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
Cherry-pick of #64298 onto
releases/2.56.1.Original PR: #64298
Summary
Bumps up the spilling and OOM ratchets for the multimodal release tests (enables the OOM ratchet for the audio and video release tests, plus related
_anyscale_job_wrapperand test yaml changes).Cherry-pick notes
One conflict resolved in
release/nightly_tests/multimodal_inference_benchmarks/video_object_detection/ray_data_main.py: the incoming change adds the opt-in OOM best-practiceDataContextsettings at the start ofrun_pipeline(); accepted the addition (base had no surrounding divergence).