Skip to content

Commit d24f83b

Browse files
authored
Debug failing straggler test (#580)
1 parent 5b604ef commit d24f83b

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

cubed/runtime/backup.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,10 @@ def should_launch_backup(
2929
[end_times[task] - start_times[task] for task in end_times]
3030
)
3131
duration = now - start_times[task]
32-
return duration > completed_durations[n] * slow_factor
32+
result = duration > completed_durations[n] * slow_factor
33+
if result:
34+
print(
35+
"should_launch_backup is True, with duration=%s, completed_durations=%s, n=%s, completed_durations[n]=%s, slow_factor=%s"
36+
% (duration, completed_durations, n, completed_durations[n], slow_factor)
37+
)
38+
return result

cubed/runtime/executors/asyncio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ async def async_map_unordered(
8181
task, now, start_times, end_times
8282
):
8383
# launch backup task
84-
print("Launching backup task")
8584
i = tasks[task]
85+
print(f"Launching backup task for input {i} at time {now}")
8686
i, new_task = create_backup_futures_func([i], **kwargs)[0]
8787
tasks[new_task] = i
8888
start_times[new_task] = time.monotonic()

0 commit comments

Comments
 (0)