Repository navigation
functional.patch_count / pad_or_crop_to_patches public; nine models and PatchTokenizer import them - #1459
Merged
bruAristimunha merged 3 commits intoOct 18, 2026
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #1459 +/- ##
==========================================
- Coverage 91.04% 91.01% -0.03%
==========================================
Files 165 167 +2
Lines 21653 21621 -32
==========================================
- Hits 19714 19679 -35
- Misses 1939 1942 +3 🚀 New features to boost your workflow:
|
…blocks); nine models and PatchTokenizer import them
…aled_dot_product_attention; private re-exports in modules.attention removed
Collaborator
Author
|
Review pass (two more commits): the private |
bruAristimunha
force-pushed
the
cleanup/t23-patch-helpers
branch
from
October 18, 2026 11:16
9dc878a to
39cfc86
Compare
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.
Part of #1442, Tier 1 (last item).
_patch_count,_pad_or_crop_to_patchesand_check_on_non_divisiblelived inmodules/blocks.pyas private names imported by nine models, the tests andPatchTokenizer. They move tobraindecode/functional/patches.py;patch_countandpad_or_crop_to_patchesare public (numpydoc,docs/api.rst),_check_on_non_divisiblestays a private validator.modules.blockskeeps_patch_count/_pad_or_crop_to_patchesas aliases for anything that imported them from there. Code unchanged (nn.functional.pad→F.pad).Characterization vs master: BaRISTA, BrainBERT, Brant, CSBrain, DuIN, NeuroRVQ, NeuroRVQTokenizer, REVE, SleepFM have identical state_dict keys, weights and bit-identical outputs. 754 related tests pass.