Repository navigation
Conversation
…ed coverage coexist pivot_table(dropna=False) builds the cartesian product of the index levels, so with a declared subgroup every overall row was repeated per subgroup level and _primary_rows crashed on a Series from cov_auroc.get(). Found running the HELM BoolQ roster (10 models with unequal coverage plus a perturbation subgroup). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LeQ5eAyfbApPDkXxbExQS9
…overage Fails on the pre-fix pivot_table (duplicated overall rows per model) and passes with the groupby version. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LeQ5eAyfbApPDkXxbExQS9
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.
Requested by Precious · project thread
Before:
write_reportcrashed withValueError: The truth value of a Series is ambiguouswhenever a cohort declared a subgroup and the models had unequal coverage. The PCam and GUSTO fixtures never combine the two, so it went unnoticed. It surfaced running a 10-model HELM BoolQ roster with a perturbation subgroup.After: the report renders, and the coverage-delta column shows one value per model.
coverage_deltabuilt its full-vs-common table withpivot_table(dropna=False), which takes the cartesian product of the index levels. Overall rows were repeated once per subgroup level, socov_auroc.get(model)in_primary_rowsreturned a Series instead of a scalar.How: replaced the pivot with
groupby(..., dropna=False).first().unstack("subset"), which keeps only key combinations that exist. The other caller (identical_coverageinbuild_context) drops NaN values first, and the spurious rows were all NaN, so its result is unchanged. A new test intests/test_evaluate.pyfails on the old code and passes on the new.ruff check,ruff format --check, andpytestall pass locally. The golden tests skip here because their fixtures are not in the repo.🤖 Generated with Claude Code
https://claude.ai/code/session_01LeQ5eAyfbApPDkXxbExQS9
Generated by Claude Code