tinker_cookbook.rl.StopReason - Tinker Documentation
tinker_cookbook.rl.StopReason
class tinker_cookbook.rl.StopReason (StrEnum)
Why a trajectory ended.
Environments that know why an episode terminated record the reason as a one-hot metric metrics["stop/<reason>"] = 1.0 on the final transition (alongside any pre-existing metric keys), and the rollout loop mirrors it onto Trajectory.stop_reason.
Not every value is produced by every environment; some values are reserved for rollout features that report them (e.g. sampled-token budgets, tool-call caps, and rollout timeouts).