Skip to content

[doc][train] Remove data_ingest_torch_new.py, which duplicates the data-loading page's testcode - #66967

Merged
dstrodtman merged 1 commit into
masterfrom
doc-1819-train-dedupe-data-ingest
Oct 13, 2026
Merged

dstrodtman merged 1 commit into
masterfrom
doc-1819-train-dedupe-data-ingest

Conversation

@dstrodtman

Copy link
Copy Markdown
Contributor

Why are these changes needed?

doc/source/train/doc_code/data_ingest_torch_new.py copies code that train/user-guides/data-loading-preprocessing.md already shows inline as testcode. No page literalincludes the script, but the train/doc_code/*.py glob in doc/BUILD.bazel still runs it. So the same examples live in two places and get tested twice, and the two copies have drifted. A fix to the page doesn't reach the script, and a fix to the script doesn't reach the page.

This PR deletes the script. Before deleting it, I compared each of its marked sections with the page:

  • __basic__: The page's quickstart and the cache block cover reading Iris, normalize_length, map_batches, and passing datasets= to TorchTrainer. The script's other extras, a commented-out randomize_block_order and local_shuffle_buffer_size, are covered by the page's links to the Ray Data shuffling guide.
  • __custom_split__: The page's "Split datasets" block is a superset. It splits only train with datasets_to_split and calls fit(). The script built the trainer but never ran it.
  • __materialized__: The page's "Cache the preprocessed dataset" block is a superset of this section.
  • __custom__: Matches the page's "Advanced: Full customization" block line for line, except that the page reads a different dataset.
  • __options__: DataConfig.default_ingest_options() with an object_store_memory override passed as execution_options. No page shows this snippet. It only built a trainer and asserted nothing. DataConfig(execution_options=...) is covered by the unit tests in python/ray/train/v2/tests/test_data_config.py, and the Ray Data performance tips page documents resource_limits. So I dropped it rather than moving it onto the page.

The page needs no changes, and neither does doc/BUILD.bazel. The glob picks the script up implicitly, so deleting the file removes its test target. git grep data_ingest_torch_new returns nothing after this change.

Reviewers: Is dropping the __options__ snippet right, or should the Train data-loading page document per-trainer ingest resource limits?

Duplicate check

gh pr list --state all --search data_ingest_torch_new returns no PRs. This is one in a series of PRs that remove doc code no page shows, alongside #66966 (Core), #66965 (RLlib), and #66964 (Serve). None of them touch Train.

Testing

  • git grep data_ingest_torch_new shows no remaining references in .buildkite, BUILD files, CODEOWNERS, or docs.
  • The pre-commit hooks pass on the commit.
  • The page's own doctest[train-gpu] target still runs the blocks that replace the script. This PR doesn't change them.

This PR was prepared with AI assistance (Claude Code). I reviewed every changed line.

🤖 Generated with Claude Code

…ta-loading page's testcode

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Douglas Strodtman <[email protected]>
@dstrodtman
dstrodtman requested review from a team as code owners October 13, 2026 18:28

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request deletes the Python file containing various Ray Train and Ray Data integration examples, including basic training loops, custom dataset splitting, materialized datasets, ingestion options, and custom data configurations. There are no review comments, so I have no feedback to provide.

@dstrodtman dstrodtman added the go add ONLY when ready to merge, run all tests label Oct 13, 2026
@ray-gardener ray-gardener Bot added docs An issue or change related to documentation train Ray Train Related Issue labels Oct 13, 2026
@dstrodtman
dstrodtman merged commit c7d36d3 into master Oct 13, 2026
6 checks passed
@dstrodtman
dstrodtman deleted the doc-1819-train-dedupe-data-ingest branch October 13, 2026 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs An issue or change related to documentation go add ONLY when ready to merge, run all tests train Ray Train Related Issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants