Skip to content

differentiate skippable exception and non-skippable exception#96

Merged
mayinghan merged 3 commits intomainfrom
custom-rollout-errtype
Aug 19, 2025
Merged

differentiate skippable exception and non-skippable exception#96
mayinghan merged 3 commits intomainfrom
custom-rollout-errtype

Conversation

@mayinghan
Copy link
Copy Markdown
Collaborator

@mayinghan mayinghan commented Aug 18, 2025

Introducing a new custom Exception type: RolloutTerminationException, which means the rollout should be interrupted but the trajectory should be kept for future evaluation or analysis, unlike the system retryable errors such as network error or timeout.

For error messages, we pass it from control_plane_summary and then preserve them into the rollout_status.extra_info, and align the rollout_status.termination_reason with the TerninationReason enum.

In practice, we should expect custom Policy implementation can throw RolloutTerminationException to terminate the rollout, while keeping the rollout_status.status as "finished" to make sure poeople wont filter these results when doing post processing or evaluation

Differentiate SKIPPABLE_ERROR & NON_SKIPPABLE_ERROR in rollout

  • Introduce new custom exception type NonSkippableException, and updated termination_reason with "SKIPPABLE_ERROR" and "NON_SKIPPABLE_ERROR". Skippable errors are typically retry-able and can be skipped in following operations (such as evaluation, post analysis or training), while Non-skippable errors need to be explicitly handled by the user later. During rollout, NonSkippableException will cause NON_SKIPPABLE_ERROR, and it will keep the trajectory history so far.
  • Multiturn rollout execution manager (mcp/execution/manager.py) will only try catch on NonSkippableException, and will mark the rollout_status.status as finished while marking the rollout_status.termination_reason as NON_SKIPPABLE_ERROR. The rest exceptions will be raised to upper layers, and will be handled inside rollout_processors.

@mayinghan mayinghan changed the title custom rollout exception and termination_reason=interrupted differentiate skippable exception and non-skippable exception Aug 19, 2025
@mayinghan mayinghan merged commit 159a12f into main Aug 19, 2025
7 checks passed
@mayinghan mayinghan deleted the custom-rollout-errtype branch August 19, 2025 04:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants