Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Time streaming exec scheduling #43112

Merged
merged 6 commits into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions python/ray/data/_internal/execution/streaming_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,15 @@ def run(self):
"""
try:
# Run scheduling loop until complete.
while self._scheduling_loop_step(self._topology) and not self._shutdown:
pass
while True:
# use process_time to avoid timing ray.wait in _scheduling_loop_step
t_start = time.process_time()
continue_sched = self._scheduling_loop_step(self._topology)
self._initial_stats.streaming_exec_schedule_s.add(
time.process_time() - t_start
)
if not continue_sched or self._shutdown:
break
omatthew98 marked this conversation as resolved.
Show resolved Hide resolved
except Exception as e:
# Propagate it to the result iterator.
self._output_node.mark_finished(e)
Expand Down
3 changes: 3 additions & 0 deletions python/ray/data/_internal/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,9 @@ def __init__(
self.needs_stats_actor = needs_stats_actor
self.stats_uuid = stats_uuid

# Streaming executor stats
self.streaming_exec_schedule_s: Timer = Timer()

# Iteration stats, filled out if the user iterates over the dataset.
self.iter_wait_s: Timer = Timer()
self.iter_get_s: Timer = Timer()
Expand Down
Loading