Repository navigation
fix(envs): declare retry for environment-side faults they mask #6072
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
Changes from 3 commits
585dd43
8b631ac
a2cc001
ca67a15
654b314
d3397d9
110c8bf
dbe4183
883f8f8
c8c518c
76a1f51
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -31,9 +31,11 @@ | |
| from nemo_gym.config import ModelServerRef | ||
| from nemo_gym.core import ( | ||
| JUDGE_FAILED, | ||
| FailureClass, | ||
| NeMoGymEasyInputMessage, | ||
| NeMoGymResponse, | ||
| NeMoGymResponseCreateParamsNonStreaming, | ||
| OutcomeAction, | ||
| ) | ||
| from nemo_gym.server_runtime import ( | ||
| BaseResourcesServerConfig, | ||
|
|
@@ -1411,6 +1413,14 @@ async def verify( | |
| failure_kind, failure_reason = self._masked_failure(state) | ||
| if failure_kind is not None: | ||
| response_payload.update(failure_kind=failure_kind, failure_reason=failure_reason) | ||
| if failure_kind == SIMULATOR_CALL_FAILED: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same gap as in
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🤖 Adam’s AI assistant Same scope as in |
||
| # The user or tool simulator call failed during the episode, not the policy: the conversation is unusable, | ||
| # so the row records the agent stage and recovery runs the rollout again. | ||
| response_payload.update( | ||
| failure_outcome_action=OutcomeAction.RETRY, | ||
| failure_outcome_attribution=FailureClass.EVALUATION, | ||
| _ng_failure_stage="agent", | ||
| ) | ||
| verified_response = ConversationalToolUseVerifyResponse.model_validate(response_payload) | ||
| self.session_id_to_state.pop(session_id, None) | ||
| return verified_response | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P2] Apply configurable policy before saving these outcome decisions
These fields are consumed as an already-applied decision, but this path never consults the shared classifier or a configured outcome policy. For example, I reproduced a time-cap row with
classification.by_stage.agent.by_failure_kind["agentic_turn_simulation:time_cap"] = "model"and recovery rulesby_failure_class = {"model": "fail", "evaluation": "retry"}: the shared classifier returnsmodel, but the row hardcodesevaluation, so_recovery_action()still selectsretry. Consumers correctly preserve the saved attribution, and none of these producer configs provides a way to select a different decision before it is saved. The same hardcoded pair is added in conversational_tool_use_simulation and vcqa_agent.Please keep the proposed defaults, but obtain the new action and attribution through the shared classification/outcome-policy mechanism with boundary configuration overrides, then persist the selected decision. Preserve the observed failure kind and originating stage independently of that action. Add a regression showing that the same fault can select
retryorfailthrough configuration and that changing the action alone preserves attribution. This can stay scoped to the newly added decisions.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤖 Adam’s AI assistant
Fixed for all three producers. Each now has an
outcome_policythat classifies the new kinds asevaluationand defaults the agent stage to retry, so the defaults you accepted are unchanged; the action and attribution come from the shared classifier and stage policy and are saved with the stageagent, while the observedfailure_kindis left as it was. A configuration that would selectcount_as_zerofor one of these kinds is refused at load, since these rows are masked and cannot be counted zeros. Tests run the same fault with retry and with fail, asevaluationand asmodel, and your time-cap configuration (modelwithfail,evaluationwithretry) is one of them. A small separate commit makesStageOutcomePolicyConfig.overlaykeep a boundary's default classification under a partial override.