Repository navigation
feat(eval): add gym eval reverify to recompute rewards from stored ro… - #2078
Conversation
…llouts Signed-off-by: Martyna Patelka <[email protected]>
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
|
🌿 Preview your docs: https://nvidia-preview-mpatelka-compute-reward-from-existing-rollouts.docs.buildwithfern.com/nemo/gym Here are the markdown pages you've updated: |
Signed-off-by: Martyna Patelka <[email protected]>
Signed-off-by: Martyna Patelka <[email protected]>
Signed-off-by: Martyna Patelka <[email protected]>
Signed-off-by: Martyna Patelka <[email protected]>
Signed-off-by: Martyna Patelka <[email protected]>
Signed-off-by: Martyna Patelka <[email protected]>
Signed-off-by: Martyna Patelka <[email protected]>
…reward-from-existing-rollouts' into mpatelka/compute-reward-from-existing-rollouts Signed-off-by: Martyna Patelka <[email protected]>
Signed-off-by: Martyna Patelka <[email protected]>
…he code Signed-off-by: Martyna Patelka <[email protected]>
Signed-off-by: Martyna Patelka <[email protected]>
Signed-off-by: Martyna Patelka <[email protected]>
Signed-off-by: Martyna Patelka <[email protected]>
…reward-from-existing-rollouts' into mpatelka/compute-reward-from-existing-rollouts Signed-off-by: Martyna Patelka <[email protected]>
|
|
||
|
|
||
| def _agent_to_rs_mapping_from_agent_blocks( | ||
| global_conflict_dict: Union[Dict[str, Any], "DictConfig"], |
There was a problem hiding this comment.
is global_conflict_dict instead of global_config_dict here intentional?
There was a problem hiding this comment.
no, good call, fixed
|
Have you tested the resources-server-only scenario? Will it work well and respect the stateless/unsupported/unknown mode safety checks? |
| Before starting, `gym eval reverify` calls `GET /reverify_mode` on each resources server it will use. Servers report one of two modes: | ||
|
|
||
| | Mode | Meaning | | ||
| | --- | --- | | ||
| | `stateless` | Reverification is safe. The verifier is a pure function of `(request body, server config)`. This is the default for most resources servers. | | ||
| | `unsupported` | Reverification is not safe. The verifier reads per-rollout session state that was seeded during the original run and is no longer present. Results would be silently wrong. | |
There was a problem hiding this comment.
Aren't there three values? Stateless, unsupported, unknown
There was a problem hiding this comment.
yes, I forgot to change the documentation, fixed
|
|
||
| | Mode | Meaning | | ||
| | --- | --- | | ||
| | `stateless` | Reverification is safe. The verifier is a pure function of `(request body, server config)`. This is the default for most resources servers. | |
There was a problem hiding this comment.
Isn't the default unknown currently?
There was a problem hiding this comment.
yes, I forgot to change the documentation, fixed
Signed-off-by: Martyna Patelka <[email protected]>
Signed-off-by: Martyna Patelka <[email protected]>
Signed-off-by: Rita Fernandes Neves <[email protected]>
Signed-off-by: Rita Fernandes Neves <[email protected]>
What & why
Adds
gym eval reverify— recompute rewards from collected rollouts by re-running only the verifier, no model or agent inference. Use it when you change a verifier (grading mode, threshold, judge prompt) and want fresh rewards on existing rollouts, or to compare verifier configs on the same rollouts without sampling noise.How it works
Pairs each rollout with its materialized input on
(_ng_task_index, _ng_rollout_index)and POSTsinput_row | {"response": ...}to the server's/verify— no/seed_session, no session cookie. Writes recomputed-reward rows, a<output>_failures.jsonlsidecar, and (unless--disable-aggregation)<output>_aggregate_metrics.json.Safety:
REVERIFY_MODEReplaying
/verifyagainst a fresh session is only correct when the reward is a pure function of request body + config. NewReverifyModeenum (STATELESS/UNSUPPORTED) as aREVERIFY_MODEClassVaronBaseResourcesServerConfig(defaultUNSUPPORTED), served atGET /reverify_mode. Reverify queries it per server and refuses onUNSUPPORTED(reward depends on gone session state → silently wrong);--forceoverrides and prefixes outputsunsafe_. Servers opt in withREVERIFY_MODE: ClassVar[ReverifyMode] = ReverifyMode.STATELESS.