Repository navigation
[train][torchft] Remove ray.train.report from test case that continues training with fewer workers - #63783
Conversation
…s training with fewer workers Signed-off-by: Timothy Seah <[email protected]>
There was a problem hiding this comment.
Code Review
This pull request introduces a temporary workaround to conditionally report training progress based on whether all workers are required for training (training_requires_all_workers), updating both the example and test suite. The reviewer suggests optimizing the training loop in torchft_linear_example.py by checking the training_requires_all_workers condition before entering the tempfile.TemporaryDirectory() context manager to avoid unnecessary disk I/O operations when reporting is skipped.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Signed-off-by: Timothy Seah <[email protected]>
…s training with fewer workers (ray-project#63783) # Summary If torchft's min_replicas is less than ScalingConfig's num_workers, training can continue even if not all workers are present. However, `ray.train.report` only works if all `ScalingConfig.num_workers` workers form a barrier by calling `ray.train.report`. If the surviving worker calls `ray.train.report` after training, it will hang indefinitely - I need to investigate why the replacement worker fails to join the same barrier (take a look at these logs: https://gist.github.com/TimothySeah/1b6af036119b6fa284505ad48df3f4f9), but since we are optimizing for the "fixed training + ray data happy path," I think it's fine to punt this for now. # Testing Failing unit test now passes. --------- Signed-off-by: Timothy Seah <[email protected]>
…s training with fewer workers (ray-project#63783) # Summary If torchft's min_replicas is less than ScalingConfig's num_workers, training can continue even if not all workers are present. However, `ray.train.report` only works if all `ScalingConfig.num_workers` workers form a barrier by calling `ray.train.report`. If the surviving worker calls `ray.train.report` after training, it will hang indefinitely - I need to investigate why the replacement worker fails to join the same barrier (take a look at these logs: https://gist.github.com/TimothySeah/1b6af036119b6fa284505ad48df3f4f9), but since we are optimizing for the "fixed training + ray data happy path," I think it's fine to punt this for now. # Testing Failing unit test now passes. --------- Signed-off-by: Timothy Seah <[email protected]>
…s training with fewer workers (ray-project#63783) # Summary If torchft's min_replicas is less than ScalingConfig's num_workers, training can continue even if not all workers are present. However, `ray.train.report` only works if all `ScalingConfig.num_workers` workers form a barrier by calling `ray.train.report`. If the surviving worker calls `ray.train.report` after training, it will hang indefinitely - I need to investigate why the replacement worker fails to join the same barrier (take a look at these logs: https://gist.github.com/TimothySeah/1b6af036119b6fa284505ad48df3f4f9), but since we are optimizing for the "fixed training + ray data happy path," I think it's fine to punt this for now. # Testing Failing unit test now passes. --------- Signed-off-by: Timothy Seah <[email protected]> Signed-off-by: 400Ping <[email protected]>
Summary
If torchft's min_replicas is less than ScalingConfig's num_workers, training can continue even if not all workers are present. However,
ray.train.reportonly works if allScalingConfig.num_workersworkers form a barrier by callingray.train.report. If the surviving worker callsray.train.reportafter training, it will hang indefinitely - I need to investigate why the replacement worker fails to join the same barrier (take a look at these logs: https://gist.github.com/TimothySeah/1b6af036119b6fa284505ad48df3f4f9), but since we are optimizing for the "fixed training + ray data happy path," I think it's fine to punt this for now.Testing
Failing unit test now passes.