Open
Conversation
13 tasks
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
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.

Fix eval grouping and preserve environment-declared state columns during deferred scoring.
Description
Two related fixes in
vf_utils.py:1. Fix eval group construction
evaluate()was passingrollouts_per_exampleto_get_eval_inputs()(which repeats examples) and then settingrollouts_per_example=1ongenerate(). This meant each "group" had only one rollout, breaking group-based scoring and pass@k semantics.Fixed by passing
rollouts_per_example=1to_get_eval_inputs()to get unique examples, then passing the realrollouts_per_exampletogenerate()so groups are constructed correctly.Fixes:
2. Preserve environment-declared state columns
run_rollout()now readsenv.state_columns(if present) and includes those fields in the serialization columns. This allows environments to declare which custom state fields (e.g.eval_score,eval_error) should survivestate_to_output()serialization, so deferred group scoring can access them without the orchestrator needing to hardcode environment-specific field names.Resolves to the task-specific sub-environment via
get_env_for_task()when running underEnvGroup.Falls back gracefully: if the environment has no
state_columnsattribute,getattrreturns[]and behavior is unchanged.Companion PR: PrimeIntellect-ai/verifiers#1054
Type of Change
Testing
uv run pytestlocally.Verified locally that
state_columnsdeclared by an environment are correctly appended to serialization columns. The eval grouping fix was validated by confirming_get_eval_inputs(..., 1)produces unique examples andgenerate()constructs proper groups.Checklist
Additional Notes
The
state_columnsfeature depends on PrimeIntellect-ai/verifiers#1054, which adds thestate_columnsattribute toEnvironment.__init__. Without that PR, thegetattrfallback returns[]and the behavior is identical to today.Note
Medium Risk
Changes evaluation batching semantics and rollout serialization columns, which can affect pass@k/group-scoring correctness and downstream metrics, but is localized to
vf_utilswrappers.Overview
Fixes eval grouping so
evaluate()builds true groups of sizerollouts_per_exampleby requesting unique eval inputs (_get_eval_inputs(..., rollouts_per_example=1)) and passing the realrollouts_per_examplethrough togenerate().Updates
run_rollout()to preserve environment-declared custom state fields by appending task-specificstate_columns(viaget_env_for_task()when available) to the serialized output columns, ensuring deferred/group scoring can access them.Written by Cursor Bugbot for commit ef25835. This will update automatically on new commits. Configure here.