Repository navigation
fix(metad): correct bin_ratings docstring, name every rule in count_trials error (#107) - #109
Merged
lenarddome merged 1 commit intoNov 12, 2026
Conversation
…rials error (#107) bin_ratings: document that `rebin` and `binCount` are one-element lists and that `binCount` is the number of trials in the highest bin, fix the `confBins` key name and the `verbose` description, and rewrite the example so it runs. count_trials: the "no valid trials" error now names the accuracy and whole-number confidence rules, matching the Notes section. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Follow-up to #107. The
count_trialsdocstring itself was already fixed in #108; this PR brings the related error message in line with it, and fixes thebin_ratingsdocstring, whose example no longer ran.Changes
count_trialsaccuracymust be 0 or 1 when given, andconfidencemust be a whole number in[1, nRatings].test_no_valid_trials_message_names_every_rule.bin_ratings(docstring only, no behaviour change)rebinandbinCountare documented as one-element lists ([0]/[1],[n]), matching the code since 9a3a44d.binCountis the number of trials in the highest bin, not the number of bins.confBins, notconfbins; the rebinned shapes are described.verboseprints a message rather than returning warnings.CHANGELOG.mdhas both under Unreleased.Testing
python -m doctest cpm/utils/metad.py: passes (thebin_ratingsexample failed before).python -m pytest -q: 791 passed.🤖 Generated with Claude Code