added tests trasnforms and scripts for v2 and added event.copy() at tranforms v2 EnglishBCBLPreprocessing._run mutates events #12
Open
Karan24Soni wants to merge 1 commit into
Conversation
Author
|
@jarod1212 could you check this out if possible |
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
v2 is missing test coverage that v1 already has. v1 has tests for transforms,
scripts, model and pl_module. v2 only had model and losses tests, nothing for
transforms.py or scripts/extract_predictions.py, even though those are the
most likely place for silent breakage (pandas event preprocessing, the
splitter, the CLI metrics script).
Added tests/test_v2_transforms.py covering EnglishBCBLPreprocessing,
Brain2QwertyV2Splitter, WordCreator and SentenceKeySeq - practice trial
removal, space -> "&" normalization, dropping / tokens and
any out-of-vocab key, perception trials and too-sparse sentences getting
dropped, button_UID ordering, and split determinism / no leakage across a
sentence's rows.
Added tests/test_v2_scripts.py covering extract_predictions.py
(compute_cer, compute_wer, summarize, print_summary, main) including the
CSV path resolution and the --output summary file.
Also fixed a SettingWithCopyWarning in EnglishBCBLPreprocessing._run -
events wasn't copied after the first filter, unlike the rest of the
pipeline. Doesn't change any computed values, just stops the warning.
Test plan
pytestpasses locallyruff checkandruff format --checkpassChecklist