Repository navigation
Conversation
6 tasks
This branch has not been deployed
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.
Implements #260.
Changed files
tests/test_train_next_action.py(new): hermetic pytest coverage using only NumPy, pytest, stdlib, andz0int; episode/report files remain undertmp_path.src/z0int/train.py: two minimal input-boundary fixes, with no refactor:test_load_xy_ignores_blank_lines: skip blank/whitespace-only JSONL lines beforejson.loadsto avoid aJSONDecodeError.test_main_too_few_episodes: reject 1–100 valid episodes withSystemExit("need more than 100 episodes")before the 100-row confirmation floor would leave an empty training split.Acceptance checklist mapped to tests
test_hash_is_unit_norm_and_deterministic— 96-dimensional norm/determinism/case-folding and 8-dimensional override.test_hash_short_and_empty_text— empty,None, and two-character text each produce one normalized trigram bucket.test_ridge_fit_recovers_identity— unregularized identity fit and output shape.test_load_xy_skips_unknown_family_and_joins_prev— unknown/missing family skip; family IDs, missinguser/prev, and joined previous features.test_load_xy_no_valid_rows_exits— both empty file and unknown-only file produceSystemExit("no episodes").test_load_xy_ignores_blank_lines— regression for blank JSONL lines.test_mb_provider_unset— opt-in env unset returns a clear unavailable reason.test_mb_provider_unimportable_and_incomplete— missing module, incomplete provider, and fully populated fake provider resolution.test_main_writes_report_with_time_split— 120 alternating rows, 20/100 split, exact class counts, ridge parameters, baseline accuracy, report file/stdout equality, no MB keys.test_main_mb_unavailable_and_available— missing opt-in provider report and fakefit_fly/predict_flyreport withn_kc=12andseed=1.test_main_too_few_episodes— controlled failure with 1, 50, and 100 rows, no report written.tests NOT RUN - ChatGPT cannot execute code
tests NOT RUN (written via connector)
Exact test command
No CI/test results or device evidence are asserted.