-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Data] Correctly refresh elapsed time in
ProgressBar
output (#46974)
When using Ray Data with a slow UDF for map operators, the progress bar's "elapsed time" item is only updated each time a task finishes. If the task is slow, this means that the elapsed time is left "hanging" and appears to be stuck, when this is not necessarily the case. This PR fixes the refreshing of the progress bar, so that the elapsed time ticks up as expected. For the following example code, we can see the change in behavior in the ticking of the progress bar: ``` import time import ray def f(batch): time.sleep(10) return batch ds = ray.data.range(50, override_num_blocks=50).map(f) ds.materialize() ``` - Before (ticks every 10 seconds): https://github.com/user-attachments/assets/d46f0d6f-dacc-4148-a12c-001fcf44f008 - After (ticks every 1 second): https://github.com/user-attachments/assets/88807215-9e81-434f-b186-b5d597bc3c59 --------- Signed-off-by: Scott Lee <[email protected]>
- Loading branch information
Showing
4 changed files
with
9 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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