Repository navigation
Add load_bet_log for validated CSV bet logs - #156
Merged
Merged
Conversation
wdm0006
force-pushed
the
autopilot/issue-150
branch
from
October 17, 2026 01:57
b835ea6 to
58a326b
Compare
Owner
Author
|
Rebased onto the latest Validation: 28 loader/replay tests, 79 doctests, Ruff lint/format, and the Sphinx dummy build pass. Full suite: 3,746 passed, 2 skipped, with the same 94 Screenshots: n/a — no user-visible change. |
This was referenced Oct 18, 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.
Closes #150
Adds
keeks.load_bet_log(path, *, probability_column="probability", outcome_column="outcome") -> (list[float], list[int])inkeeks/bet_log.py, re-exported fromkeeks. Stdlibcsvonly, file order preserved. Outcomes accept0/1/true/false(case-insensitive); probabilities must be finite in[0, 1]. Every error is aValueErrornaming the column and 1-based data row (missing columns name the column and list those available).examples/replay_bet_log.pynow imports the public function instead of its private copy. Docs section added todocs/source/utils.rst; the function has a doctest using a temp file.Verification
pytest: 3744 passed, 2 skipped, 94 failed. All 94 aretests/test_bit_exactness.py, which fails the same way on master in this environment (known NumPy golden-fixture drift). Nothing else fails.keeks/bet_log.pyis at 100% coverage.ruff checkandruff format --checkare clean.pytest --doctest-modules keeks/: 79 passed.sphinx -W -b dummy: build succeeded (the custom theme isn't installed locally).examples/replay_bet_log.pyleavesgit statusclean forexamples/output/, so the committed CSV/PNG are unchanged.2and1.0, each asserting the column and row appear in the message.Screenshots
Screenshots: n/a — no user-visible change