fix: prevent combine_scores from re-consuming aggregation keys on repeated calls#201
Merged
rhoadesScholar merged 3 commits intopq_evalfrom Mar 24, 2026
Merged
fix: prevent combine_scores from re-consuming aggregation keys on repeated calls#201rhoadesScholar merged 3 commits intopq_evalfrom
rhoadesScholar merged 3 commits intopq_evalfrom
Conversation
Open
…ng on re-call Co-authored-by: rhoadesScholar <37990507+rhoadesScholar@users.noreply.github.com> Agent-Logs-Url: https://github.com/janelia-cellmap/cellmap-segmentation-challenge/sessions/4757d3c5-3419-49df-8a4f-c4d01db80ffd
Copilot
AI
changed the title
[WIP] [WIP] Address feedback on Pq eval pull request
fix: prevent combine_scores from re-consuming aggregation keys on repeated calls
Mar 24, 2026
rhoadesScholar
approved these changes
Mar 24, 2026
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.
combine_scoresiterated over all top-level keys inscoreswithout guarding against known aggregation keys (label_scores,overall_*,total_evals, etc.). Passing an already-combined dict back in would re-consume those entries as crop data, corrupting TP/FP/FN accumulators and skewing all PQ outputs.Changes
aggregation.py– Defines_AGGREGATION_KEYSfrozenset of all known non-crop top-level keys; addsif crop_name in _AGGREGATION_KEYS: continueguard at the top of the crop-iteration loop incombine_scorestests/test_evaluate_metrics.py– Addstest_combine_scores_idempotent_on_combined_dictregression test verifying scores are stable across two sequential calls⌨️ Start Copilot coding agent tasks without leaving your editor — available in VS Code, Visual Studio, JetBrains IDEs and Eclipse.