Repository navigation
Conversation
Signed-off-by: RainieLLM <[email protected]>
yaoyu-33
marked this pull request as draft
November 18, 2026 01:56
Contributor
|
We’re doing some cleanup of the open PR list. This PR has had no activity for over a month, so I’ve moved it back to draft. If this change is still needed, please resolve any merge conflicts and mark the PR ready for review again when it’s ready to merge. Thanks! |
7 tasks done
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
When a failed rollout has no reward,
count_failure_classes_as_zeroadds a zero for the metrics. The row may lack fields that custom metrics need, so a custom hook can crash or report the wrong score.This PR checks support before a new or resumed run, and before an offline merge. If custom metrics do not support these rows, the run stops with an error that names the server and option. The metric endpoint also checks marked rows sent directly to it. GDPVal checks all stages before it selects the last one for the base reward stats.
Fixes #3593.
Validation
543 tests and 17 subtests passed:
.venv/bin/python -m pytest \ tests/unit_tests/test_aggregate_metrics.py \ tests/unit_tests/test_rollout_collection.py \ tests/unit_tests/test_reward_profile.py \ tests/unit_tests/test_base_resources_server.py \ tests/unit_tests/test_base_responses_api_agent.py \ tests/unit_tests/test_fern_docs_links.py \ environment_servers/legacy_agent/tests/test_app.py \ environment_servers/single_agent_turn/tests/test_app.py \ environment_servers/single_agent_turn_legacy/tests/test_app.py \ responses_api_agents/simple_agent/tests/test_app.py \ resources_servers/gdpval/tests/test_app.py \ --import-mode=importlib --override-ini addopts='' -qpre-commit run --all-filesandgit diff --checkpassed.npm run checkinfern/reported zero errors and one warning.Tests cover real zero scores, added zeros, custom metric support, and checks before a run or merge. They also check that a rejected run leaves existing files unchanged. An ASGI test confirms that the error reaches the caller through the environment, Simple Agent, and ASR servers. Eight tests fail as expected when the new check is disabled.
The full CI suite was not run locally.
Rollouts
N/A. This change checks metric support before execution. Model calls, agent behavior, and score formulas stay the same. Tests use local servers and fixed data, so no model run was needed.
Compatibility and benchmark impact
The option stays off by default. Default reward statistics still accept added zeros. Custom benchmarks must define and test how each metric handles these rows before they set
supports_imputed_zero_rewards = True.A failed row with a real reward keeps its value. Added zeros and their marker are used only for metrics; they are never saved to rollout or failure files. With
disable_aggregation=True, Gym skips the check during rollout collection and runs it when you usegym eval aggregate.Suggested labels:
bug,area:evaluation,needs-review.Checklist