[Train] [release test] Release tests for ray train local mode#56862
Merged
matthewdeng merged 14 commits intoray-project:masterfrom Oct 3, 2025
Merged
[Train] [release test] Release tests for ray train local mode#56862matthewdeng merged 14 commits intoray-project:masterfrom
matthewdeng merged 14 commits intoray-project:masterfrom
Conversation
Signed-off-by: xgui <xgui@anyscale.com>
Signed-off-by: xgui <xgui@anyscale.com>
Signed-off-by: xgui <xgui@anyscale.com>
Signed-off-by: xgui <xgui@anyscale.com>
Signed-off-by: xgui <xgui@anyscale.com>
Signed-off-by: xgui <xgui@anyscale.com>
JasonLi1909
approved these changes
Sep 27, 2025
Co-authored-by: Jason Li <57246540+JasonLi1909@users.noreply.github.com> Signed-off-by: Xinyuan <43737116+xinyuangui2@users.noreply.github.com>
Resolve comments Signed-off-by: Xinyuan <43737116+xinyuangui2@users.noreply.github.com>
Signed-off-by: xgui <xgui@anyscale.com>
matthewdeng
reviewed
Sep 29, 2025
Comment on lines
+94
to
+117
| def fit_func(): | ||
| # Define configurations. | ||
| train_loop_config = {"num_epochs": 20, "lr": 0.01, "batch_size": 32} | ||
| scaling_config = ScalingConfig(num_workers=0, use_gpu=True) | ||
| run_config = RunConfig(checkpoint_config=CheckpointConfig(num_to_keep=1)) | ||
|
|
||
| # Initialize the Trainer. | ||
| trainer = TorchTrainer( | ||
| train_loop_per_worker=train_func, | ||
| train_loop_config=train_loop_config, | ||
| scaling_config=scaling_config, | ||
| run_config=run_config, | ||
| ) | ||
|
|
||
| # Train the model. | ||
| result = trainer.fit() | ||
|
|
||
| # Inspect the results. | ||
| final_loss = result.metrics["loss"] | ||
| logger.info(f"final_loss: {final_loss}") | ||
|
|
||
|
|
||
| if __name__ == "__main__": | ||
| fit_func() |
Contributor
There was a problem hiding this comment.
Is this run anywhere?
Would it be helpful to verify that the runtimes are the same? And maybe set the seeds and compare the results?
Contributor
Author
There was a problem hiding this comment.
Added loss convergence check.
Signed-off-by: xgui <xgui@anyscale.com>
matthewdeng
approved these changes
Oct 3, 2025
dstrodtman
pushed a commit
that referenced
this pull request
Oct 6, 2025
Release test for ray train local mode. Setup: - 2 nodes, each with 4 gpus. - Each node runs `torchrun`. Test job: https://buildkite.com/ray-project/release/builds/61135 --------- Signed-off-by: xgui <xgui@anyscale.com> Signed-off-by: Xinyuan <43737116+xinyuangui2@users.noreply.github.com> Co-authored-by: Jason Li <57246540+JasonLi1909@users.noreply.github.com> Signed-off-by: Douglas Strodtman <douglas@anyscale.com>
eicherseiji
pushed a commit
to eicherseiji/ray
that referenced
this pull request
Oct 6, 2025
…oject#56862) Release test for ray train local mode. Setup: - 2 nodes, each with 4 gpus. - Each node runs `torchrun`. Test job: https://buildkite.com/ray-project/release/builds/61135 --------- Signed-off-by: xgui <xgui@anyscale.com> Signed-off-by: Xinyuan <43737116+xinyuangui2@users.noreply.github.com> Co-authored-by: Jason Li <57246540+JasonLi1909@users.noreply.github.com> Signed-off-by: Seiji Eicher <seiji@anyscale.com>
eicherseiji
pushed a commit
to eicherseiji/ray
that referenced
this pull request
Oct 6, 2025
…oject#56862) Release test for ray train local mode. Setup: - 2 nodes, each with 4 gpus. - Each node runs `torchrun`. Test job: https://buildkite.com/ray-project/release/builds/61135 --------- Signed-off-by: xgui <xgui@anyscale.com> Signed-off-by: Xinyuan <43737116+xinyuangui2@users.noreply.github.com> Co-authored-by: Jason Li <57246540+JasonLi1909@users.noreply.github.com>
eicherseiji
pushed a commit
to eicherseiji/ray
that referenced
this pull request
Oct 6, 2025
…oject#56862) Release test for ray train local mode. Setup: - 2 nodes, each with 4 gpus. - Each node runs `torchrun`. Test job: https://buildkite.com/ray-project/release/builds/61135 --------- Signed-off-by: xgui <xgui@anyscale.com> Signed-off-by: Xinyuan <43737116+xinyuangui2@users.noreply.github.com> Co-authored-by: Jason Li <57246540+JasonLi1909@users.noreply.github.com>
eicherseiji
pushed a commit
to eicherseiji/ray
that referenced
this pull request
Oct 6, 2025
…oject#56862) Release test for ray train local mode. Setup: - 2 nodes, each with 4 gpus. - Each node runs `torchrun`. Test job: https://buildkite.com/ray-project/release/builds/61135 --------- Signed-off-by: xgui <xgui@anyscale.com> Signed-off-by: Xinyuan <43737116+xinyuangui2@users.noreply.github.com> Co-authored-by: Jason Li <57246540+JasonLi1909@users.noreply.github.com>
eicherseiji
pushed a commit
to eicherseiji/ray
that referenced
this pull request
Oct 6, 2025
…oject#56862) Release test for ray train local mode. Setup: - 2 nodes, each with 4 gpus. - Each node runs `torchrun`. Test job: https://buildkite.com/ray-project/release/builds/61135 --------- Signed-off-by: xgui <xgui@anyscale.com> Signed-off-by: Xinyuan <43737116+xinyuangui2@users.noreply.github.com> Co-authored-by: Jason Li <57246540+JasonLi1909@users.noreply.github.com>
liulehui
pushed a commit
to liulehui/ray
that referenced
this pull request
Oct 9, 2025
…oject#56862) Release test for ray train local mode. Setup: - 2 nodes, each with 4 gpus. - Each node runs `torchrun`. Test job: https://buildkite.com/ray-project/release/builds/61135 --------- Signed-off-by: xgui <xgui@anyscale.com> Signed-off-by: Xinyuan <43737116+xinyuangui2@users.noreply.github.com> Co-authored-by: Jason Li <57246540+JasonLi1909@users.noreply.github.com>
joshkodi
pushed a commit
to joshkodi/ray
that referenced
this pull request
Oct 13, 2025
…oject#56862) Release test for ray train local mode. Setup: - 2 nodes, each with 4 gpus. - Each node runs `torchrun`. Test job: https://buildkite.com/ray-project/release/builds/61135 --------- Signed-off-by: xgui <xgui@anyscale.com> Signed-off-by: Xinyuan <43737116+xinyuangui2@users.noreply.github.com> Co-authored-by: Jason Li <57246540+JasonLi1909@users.noreply.github.com> Signed-off-by: Josh Kodi <joshkodi@gmail.com>
justinyeh1995
pushed a commit
to justinyeh1995/ray
that referenced
this pull request
Oct 20, 2025
…oject#56862) Release test for ray train local mode. Setup: - 2 nodes, each with 4 gpus. - Each node runs `torchrun`. Test job: https://buildkite.com/ray-project/release/builds/61135 --------- Signed-off-by: xgui <xgui@anyscale.com> Signed-off-by: Xinyuan <43737116+xinyuangui2@users.noreply.github.com> Co-authored-by: Jason Li <57246540+JasonLi1909@users.noreply.github.com>
landscapepainter
pushed a commit
to landscapepainter/ray
that referenced
this pull request
Nov 17, 2025
…oject#56862) Release test for ray train local mode. Setup: - 2 nodes, each with 4 gpus. - Each node runs `torchrun`. Test job: https://buildkite.com/ray-project/release/builds/61135 --------- Signed-off-by: xgui <xgui@anyscale.com> Signed-off-by: Xinyuan <43737116+xinyuangui2@users.noreply.github.com> Co-authored-by: Jason Li <57246540+JasonLi1909@users.noreply.github.com>
Aydin-ab
pushed a commit
to Aydin-ab/ray-aydin
that referenced
this pull request
Nov 19, 2025
…oject#56862) Release test for ray train local mode. Setup: - 2 nodes, each with 4 gpus. - Each node runs `torchrun`. Test job: https://buildkite.com/ray-project/release/builds/61135 --------- Signed-off-by: xgui <xgui@anyscale.com> Signed-off-by: Xinyuan <43737116+xinyuangui2@users.noreply.github.com> Co-authored-by: Jason Li <57246540+JasonLi1909@users.noreply.github.com> Signed-off-by: Aydin Abiar <aydin@anyscale.com>
Future-Outlier
pushed a commit
to Future-Outlier/ray
that referenced
this pull request
Dec 7, 2025
…oject#56862) Release test for ray train local mode. Setup: - 2 nodes, each with 4 gpus. - Each node runs `torchrun`. Test job: https://buildkite.com/ray-project/release/builds/61135 --------- Signed-off-by: xgui <xgui@anyscale.com> Signed-off-by: Xinyuan <43737116+xinyuangui2@users.noreply.github.com> Co-authored-by: Jason Li <57246540+JasonLi1909@users.noreply.github.com> Signed-off-by: Future-Outlier <eric901201@gmail.com>
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.
Why are these changes needed?
Release test for ray train local mode.
Setup:
torchrun.Test job: https://buildkite.com/ray-project/release/builds/61135
Related issue number
Checks
git commit -s) in this PR.scripts/format.shto lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/under thecorresponding
.rstfile.Note
Adds a nightly Train release test that launches torchrun across 2 GPU nodes to run a Ray Train TorchTrainer on FashionMNIST and validates loss.
torch_local_modetorelease/release_tests.yaml(nightly, BYOD GPU) runningpython torch_local_mode_launcher.pywith cluster configtrain_tests/local_mode/compute_gpu_2x4_aws.yaml.release/train_tests/local_mode/compute_gpu_2x4_aws.yaml: 1 headm5.4xlarge, 2 workersg4dn.12xlarge(non-spot) inus-west-2.release/train_tests/local_mode/torch_local_mode_launcher.py: Starts a Ray cluster task that uploadstorch_local_mode_test.pyto 2 nodes and launchestorchrun(--nnodes=2,--nproc-per-node=4) withRAY_TRAIN_V2_ENABLED=1.release/train_tests/local_mode/torch_local_mode_test.py: Defines aTorchTrainertrainingresnet18on FashionMNIST, reports checkpoints/metrics over 20 epochs, and asserts loss decreases.Written by Cursor Bugbot for commit 1157068. This will update automatically on new commits. Configure here.