test: expand data.py coverage — load_data, corpus, eval, wrapped keys (33 new tests)#1
Open
hai-pilgrim wants to merge 1 commit into
Open
test: expand data.py coverage — load_data, corpus, eval, wrapped keys (33 new tests)#1hai-pilgrim wants to merge 1 commit into
hai-pilgrim wants to merge 1 commit into
Conversation
… (33 new tests) The existing test_data.py covered only 8 cases around create_dataset, collator, and a few load_dataset formats. Adds 33 new tests: - load_dataset: all 7 wrapper keys (data, samples, completions, training_samples, training_prompts, prompts, questions), plus input/user_message prompt keys and output/completion response keys - load_data: training_prompts path, dataset file path, dataset-over- prompts priority, missing-source error - load_corpus: all 4 formats (papers, text-string, text-dict, list, custom), and None when no corpus_file - build_system_prompt: direct, template+corpus, corpus-only, raises when no source configured - load_eval_data: simple, wrapped (all 4 keys), list answer, input key, lowercase normalisation Co-Authored-By: Claude Sonnet 4.6 <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.
Summary
test_data.pycovered only 8 cases (create_dataset, collator, a few load_dataset formats)load_data,load_corpus,build_system_prompt, andload_eval_datahad zero test coverageTest plan
load_dataset— all 7 wrapper keys (data,samples,completions,training_samples,training_prompts,prompts,questions);input/user_messageprompt keys;output/completionresponse keysload_data—training_promptspath, dataset file path, dataset-over-prompts priority, missing-source errorload_corpus— papers, text-string, text-dict, list, custom, and None when nocorpus_filebuild_system_prompt— direct, template+corpus, corpus-only, raises when no source configuredload_eval_data— simple, wrapped (all 4 keys), list answer,inputkey, lowercase normalisation🤖 Generated with Claude Code