Repository navigation
[train] Enable v2 for train py_doctest - #57256
Merged
Merged
Conversation
added 3 commits
October 6, 2025 19:09
Signed-off-by: Justin Yu <[email protected]>
Signed-off-by: Justin Yu <[email protected]>
Signed-off-by: Justin Yu <[email protected]>
Contributor
There was a problem hiding this comment.
Code Review
Overall, the changes in this pull request are well-aligned with the goal of enabling and fixing doctests for Ray Train V2. The modifications to the build files and the updates to the doctest examples are logical and consistent. I've found one critical issue that needs to be addressed.
added 3 commits
October 7, 2025 14:08
Signed-off-by: Justin Yu <[email protected]>
justinvyu
enabled auto-merge (squash)
October 7, 2025 23:05
added 3 commits
October 7, 2025 16:30
Signed-off-by: Justin Yu <[email protected]>
Signed-off-by: Justin Yu <[email protected]>
Signed-off-by: Justin Yu <[email protected]>
added 3 commits
October 7, 2025 19:05
Signed-off-by: Justin Yu <[email protected]>
Signed-off-by: Justin Yu <[email protected]>
Signed-off-by: Justin Yu <[email protected]>
ArturNiederfahrenhorst
pushed a commit
to ArturNiederfahrenhorst/ray
that referenced
this pull request
Oct 13, 2025
Enables Train V2 for py_doctest. Train v2 doctest wasn't running before this, so this PR also enables those to run in CI. This was because Bazel glob stops at nested BUILD.bazel files. --------- Signed-off-by: Justin Yu <[email protected]>
1 of 7 tasks
justinvyu
pushed a commit
that referenced
this pull request
Oct 16, 2025
Ports over the remaining unit tests that were marked as TODOs from this series of PRs: #57534, #57256, #56868, #56820, #56816. Notably: * `test_new_dataset_config -> test_data_integration` * `test_backend -> test_torch_trainer, test_worker_group` * `test_gpu -> test_torch_gpu` This PR also finishes migrating the Tune LightGBM/Keras examples which were unblocked by #57042 and #57121. --------- Signed-off-by: Justin Yu <[email protected]>
xinyuangui2
pushed a commit
to xinyuangui2/ray
that referenced
this pull request
Oct 22, 2025
Enables Train V2 for py_doctest. Train v2 doctest wasn't running before this, so this PR also enables those to run in CI. This was because Bazel glob stops at nested BUILD.bazel files. --------- Signed-off-by: Justin Yu <[email protected]> Signed-off-by: xgui <[email protected]>
xinyuangui2
pushed a commit
to xinyuangui2/ray
that referenced
this pull request
Oct 22, 2025
Ports over the remaining unit tests that were marked as TODOs from this series of PRs: ray-project#57534, ray-project#57256, ray-project#56868, ray-project#56820, ray-project#56816. Notably: * `test_new_dataset_config -> test_data_integration` * `test_backend -> test_torch_trainer, test_worker_group` * `test_gpu -> test_torch_gpu` This PR also finishes migrating the Tune LightGBM/Keras examples which were unblocked by ray-project#57042 and ray-project#57121. --------- Signed-off-by: Justin Yu <[email protected]> Signed-off-by: xgui <[email protected]>
snorkelopsstgtesting1-spec
pushed a commit
to snorkel-marlin-repos/ray-project_ray_pr_57256_27e4ffe4-80af-4a1d-baf7-52fd600b4bd2
that referenced
this pull request
Oct 22, 2025
Original PR #57256 by justinvyu Original: ray-project/ray#57256
snorkelopstesting1-a11y
added a commit
to snorkel-marlin-repos/ray-project_ray_pr_57256_27e4ffe4-80af-4a1d-baf7-52fd600b4bd2
that referenced
this pull request
Oct 22, 2025
Merged from original PR #57256 Original: ray-project/ray#57256
elliot-barn
pushed a commit
that referenced
this pull request
Oct 23, 2025
Enables Train V2 for py_doctest. Train v2 doctest wasn't running before this, so this PR also enables those to run in CI. This was because Bazel glob stops at nested BUILD.bazel files. --------- Signed-off-by: Justin Yu <[email protected]> Signed-off-by: elliot-barn <[email protected]>
elliot-barn
pushed a commit
that referenced
this pull request
Oct 23, 2025
Ports over the remaining unit tests that were marked as TODOs from this series of PRs: #57534, #57256, #56868, #56820, #56816. Notably: * `test_new_dataset_config -> test_data_integration` * `test_backend -> test_torch_trainer, test_worker_group` * `test_gpu -> test_torch_gpu` This PR also finishes migrating the Tune LightGBM/Keras examples which were unblocked by #57042 and #57121. --------- Signed-off-by: Justin Yu <[email protected]> Signed-off-by: elliot-barn <[email protected]>
landscapepainter
pushed a commit
to landscapepainter/ray
that referenced
this pull request
Nov 17, 2025
Enables Train V2 for py_doctest. Train v2 doctest wasn't running before this, so this PR also enables those to run in CI. This was because Bazel glob stops at nested BUILD.bazel files. --------- Signed-off-by: Justin Yu <[email protected]>
landscapepainter
pushed a commit
to landscapepainter/ray
that referenced
this pull request
Nov 17, 2025
Ports over the remaining unit tests that were marked as TODOs from this series of PRs: ray-project#57534, ray-project#57256, ray-project#56868, ray-project#56820, ray-project#56816. Notably: * `test_new_dataset_config -> test_data_integration` * `test_backend -> test_torch_trainer, test_worker_group` * `test_gpu -> test_torch_gpu` This PR also finishes migrating the Tune LightGBM/Keras examples which were unblocked by ray-project#57042 and ray-project#57121. --------- Signed-off-by: Justin Yu <[email protected]>
Future-Outlier
pushed a commit
to Future-Outlier/ray
that referenced
this pull request
Dec 7, 2025
Enables Train V2 for py_doctest. Train v2 doctest wasn't running before this, so this PR also enables those to run in CI. This was because Bazel glob stops at nested BUILD.bazel files. --------- Signed-off-by: Justin Yu <[email protected]> Signed-off-by: Future-Outlier <[email protected]>
Future-Outlier
pushed a commit
to Future-Outlier/ray
that referenced
this pull request
Dec 7, 2025
Ports over the remaining unit tests that were marked as TODOs from this series of PRs: ray-project#57534, ray-project#57256, ray-project#56868, ray-project#56820, ray-project#56816. Notably: * `test_new_dataset_config -> test_data_integration` * `test_backend -> test_torch_trainer, test_worker_group` * `test_gpu -> test_torch_gpu` This PR also finishes migrating the Tune LightGBM/Keras examples which were unblocked by ray-project#57042 and ray-project#57121. --------- Signed-off-by: Justin Yu <[email protected]> Signed-off-by: Future-Outlier <[email protected]>
5 of 7 tasks
pseudo-rnd-thoughts
pushed a commit
that referenced
this pull request
Nov 16, 2026
…n legacy LightGBM/XGBoost trainers (#68145) ## Why are these changes needed? In `_get_legacy_train_fn_per_worker` for both `LightGBMTrainer` (`python/ray/train/lightgbm/lightgbm_trainer.py`) and `XGBoostTrainer` (`python/ray/train/xgboost/xgboost_trainer.py`): 1. `num_boost_round = num_boost_round or DEFAULT_NUM_BOOST_ROUND` used truthiness instead of an explicit `is None` check. When a caller explicitly passed `num_boost_round=0` (for example in dry-run initialization or checkpoint evaluation without additional boosting rounds), `0 or 10` silently evaluated to `10`. 2. `callbacks = trainer_kwargs.get("callbacks", [])` retrieved the caller's list reference directly and appended `default_callback_cls()` in-place (`callbacks.append(...)`). Reusing the same configuration dictionary across multiple `Trainer` instantiations mutated the caller's `callbacks` list on each run, and passing `callbacks=None` or a tuple raised an `AttributeError`. This PR: - Checks `if num_boost_round is None: num_boost_round = DEFAULT_NUM_BOOST_ROUND` so explicit `0` is preserved. - Copies `callbacks = list(trainer_kwargs.get("callbacks") or [])` before appending the default `RayTrainReportCallback`. ## Related issue number N/A ## Checks - [x] I've signed off every commit(by using the -s flag, i.e., `git commit -s`) in this PR. - [x] I've run `scripts/format.sh` to lint the changes in this PR. - [x] I've included any doc changes needed for https://docs.ray.io/en/master/. - [x] I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/ - Testing Strategy - [x] Unit tests (`python/ray/train/tests/test_lightgbm_trainer.py` and `python/ray/train/tests/test_xgboost_trainer.py`) - [ ] Release tests - [ ] This PR is not tested :( ## Acknowledgements Thanks to @dstrodtman (#67821, #67786, #67620), @pseudo-rnd-thoughts (#63988, #63427, #63365), and @justinvyu (#57256, #50042) for their work maintaining `LightGBMTrainer` and `XGBoostTrainer`. --------- Signed-off-by: Parth Vadera <[email protected]> Co-authored-by: Copilot <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Enables Train V2 for py_doctest.
Train v2 doctest wasn't running before this, so this PR also enables those to run in CI. This was because Bazel glob stops at nested BUILD.bazel files.