Repository navigation
Keep the 1.8.1 positional parameters of Labram, CBraMod and LUNA - #1514
Merged
bruAristimunha merged 1 commit intoNov 2, 2026
Merged
bruAristimunha merged 1 commit into
bruAristimunha merged 1 commit into
Conversation
braindecode#1226 inserted on_non_divisible after patch_size/learned_patcher, so a positional call written for 1.8.1 passed embed_dim (Labram), dim_feedforward (CBraMod) or num_queries (LUNA) as on_non_divisible. Move it after the 1.8.1 parameters and pin the 1.8.1 positional order of every 1.8.1 model in a test.
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the changes restoring positional-call compatibility in Labram, CBraMod, and LUNA.
No open issues 🎉
What changed in this PR
Restores braindecode 1.8.1 positional-call compatibility for Labram, CBraMod, and LUNA, correcting parameter shifts introduced by #1226.
Changes:
- Moves
on_non_divisibleafter the existing 1.8.1 parameters in all three constructors, preserving its"pad"default. - Adds a regression test that checks the positional parameter order of all 61 models covered by the 1.8.1 baseline.
| File | Description |
|---|---|
test/unit_tests/models/test_positional_compat.py |
Pins the 1.8.1 positional parameter order for 61 models. |
braindecode/models/luna.py |
Restores LUNA’s original positional parameter order. |
braindecode/models/labram.py |
Restores Labram’s original positional parameter order. |
braindecode/models/cbramod.py |
Restores CBraMod’s original positional parameter order. |
Review effort: Balanced
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1514 +/- ##
=======================================
Coverage 91.33% 91.33%
=======================================
Files 170 170
Lines 22100 22100
=======================================
Hits 20184 20184
Misses 1916 1916 🚀 New features to boost your workflow:
|
This was referenced Nov 2, 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.
Restores the 1.8.1 positional order of
Labram,CBraModandLUNA. #1226 insertedon_non_divisiblein the middle of their signatures, so a positional call written for 1.8.1 raisedValueErroron master. The parameter now sits at the end, as a new keyword.A new test pins the 1.8.1 positional order of all 61 models that existed in 1.8.1, so this cannot slip again before 2.0. It fails on master and passes here;
test/unit_tests/modelspasses (514 passed, 0 failed).Found by the v1.8.1 → master compatibility audit for the 2.0 release.