You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
REVE, Labram: accept ch_mask (#1539, merged with master) - #1549
This is #1539 by @julien-gadonneix (REVE and Labram accept ch_mask), with master merged in. #1540 landed after his last merge and conflicted with this branch, and the branch doesn't allow maintainer edits.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Dropping channels can leave a sample with no valid channels and cause attention pooling to produce NaN predictions; the selected mask needs revalidation and a regression test.
This PR integrates #1539 with master, adding channel-mask support to REVE and Labram for batches with different channel counts while preserving #1540’s token-output changes.
Changes:
Mask padded channels in attention, pooling, and Labram’s normalization.
Return zeroed padded tokens through "tokens" and reject masks for incompatible heads.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
The REVE-flatten test case bypasses the network-test guard, allowing an uncached position-bank download to fail the default suite offline without --run-network.
No open issues 🎉
1 previously missed issue
In code that hasn't changed since last review
REVE-flatten bypasses the network-test guard
test/unit_tests/models/test_ch_mask.py:224
test/conftest.py::_is_reve_param recognizes REVE, but not REVE-flatten, so this case bypasses the network-test guard. Constructing REVE downloads its position bank when it is not cached, which can make the default suite fail offline without --run-network. Rename this case to REVE so the collection hook marks it as network-dependent.
❌ Patch coverage is 80.95238% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.39%. Comparing base (b40e1cc) to head (77b23f8). ⚠️ Report is 1 commits behind head on master.
Copilot, REVE-flatten offline: renaming it to "REVE" or widening conftest._is_reve_param would also have marked REVE-overlap (test_on_non_divisible) and REVE-local-bank (test_pretrained_compat) as network tests. Those cases deliberately use a local position bank so that they run offline. So the refusal test now does the same: it writes a one-entry reve_positions.json and sets REVE_POSITIONS_PATH, and REVE-flatten runs in the default offline suite.
@julien-gadonneix, flaky test_registered_model_ch_mask_training[Brant]: the case was unseeded, so every run drew different weights and data. _ch_mask_case now calls torch.manual_seed(0). The Brant case passed 10 of 10 repeated runs in a Voyager job.
Verified in one job without --run-network: the ch_mask, contract, training, routing, module and REVE/Labram model tests gave 357 passed and 0 failed, and pre-commit passed.
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
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.
This is #1539 by @julien-gadonneix (REVE and Labram accept
ch_mask), with master merged in. #1540 landed after his last merge and conflicted with this branch, and the branch doesn't allow maintainer edits.The merge resolution keeps both sides:
docs/whats_new.rst: both Enhancements entries.test_ch_mask.py: his REVE/Labram tests and iEEG foundation models: return the per-token output, padded channels zeroed #1540'stokenstest.No code changes beyond the merge. The squash commit keeps Julien as co-author. #1539 will be closed in favour of this PR.