Repository navigation
Conversation
Count subsets containing a pass before dividing so pass@1 meets the threshold when one of five runs passes.
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
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.
Link to Issue or Description of Change
With one passing run out of five,
pass@1returns0.19999999999999996. A threshold of0.2then fails the whole case. Count the subsets that contain a pass using integer subtraction and divide once, as the neighboringpass^kimplementation does for its subset count.Testing Plan
Unit Tests:
The new regression checks the probability, the criterion status and the final case status. It failed on
03725e8. Both multi-run aggregation test modules pass with the change (139 tests on each of Python 3.11 to 3.14). Full tox passed on all four versions (26,557 / 26,548 / 26,548 / 26,550 passed). All 14 pre-commit hooks passed.Manual End-to-End (E2E) Tests:
Install the checkout with evaluation dependencies (
python -m pip install -e ".[eval]"). From the directory containing the input files below, run a single case with reference answeryes. Have a local agent answeryesonce andnofour times. Set the response match threshold to 0.5 and usepass_ratewith a 0.2 threshold for cross-run metric scoring.adk eval fixed_answers boundary.evalset.json --config_file_path config.json --parallelism 1CLI input files
fixed_answers/__init__.pyfixed_answers/agent.pyboundary.evalset.json{"eval_set_id":"boundary","eval_cases":[{"eval_id":"one_in_five","conversation":[{"user_content":{"role":"user","parts":[{"text":"Answer yes."}]},"final_response":{"role":"model","parts":[{"text":"yes"}]}}],"session_input":{"app_name":"fixed_answers","user_id":"tester","state":{}}}]}config.json{ "criteria": { "response_match_score": 0.5 }, "multi_run_config": { "num_runs": 5, "cross_run_criteria": [ { "method": "pass_at_k", "k": 1, "threshold": 0.2 } ], "cross_run_scoring": { "method": "pass_rate", "threshold": 0.2 } } }Checklist
Additional context
The CLI prints both scores to two decimal places. The saved eval result shows the change from
0.19999999999999996to0.2.