fix(eval): hard rollout wall-clock timeout for HUDRuntime training (HUD-2099)#504
Conversation
Bound grade/cancel with a short teardown grace so a wedged tunnel cannot stall Taskset.run. Wire HUDRuntime.run_timeout into rollout, return a terminal failed Run on HostedRuntime timeout, and document GRPO keep- failed-members policy (HUD-2099). Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit e398638. Configure here.
| self.trace.stop_reason = "timeout" | ||
| self.record(Step(source="system", error="grading timed out")) | ||
| with contextlib.suppress(Exception, TimeoutError): | ||
| await self._await_teardown(self.client.cancel()) |
There was a problem hiding this comment.
Cancel after grade timeout is inert
Low Severity
After grade hits the shared deadline-plus-grace via _await_teardown, the follow-up cancel recomputes remaining time against that same budget and gets roughly zero. Because HudClient.grade only times out through that wrapper (not an internal TimeoutError), the cancel path never runs with a usable timeout, so the intended post-grade abort does not take effect.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit e398638. Configure here.


Summary
Taskset.run.HUDRuntime(run_timeout=…)intorollout_timeout;HostedRuntimetimeouts return a terminal failedRun(no raise) so batch gather cannot collapse.Fixes HUD-2099.
Test plan
test_agent_loop_timeout_grades_the_partial_trajectorytest_wedged_grade_cannot_stall_the_rollouttest_run_timeout_requests_platform_cancel— Hosted returns failedRun+ canceltest_hud_runtime_drives_local_rollout/test_taskset_uses_hud_runtime_run_timeouttest_timed_out_runs_keep_grpo_group_fullMade with Cursor