Repository navigation
Require PyTorch 2.4 and remove obsolete compatibility code - #1174
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4707e937fc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
No approval-blocking issues remain; the outstanding feedback is a minor nit.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
Raises minimum PyTorch and TorchAudio versions to 2.4 to support native RMSNorm, with related documentation updates.
Changes:
- Updates dependency bounds.
- Adds a release-note entry.
- Refreshes ZUNA’s RMSNorm documentation.
| File | Description |
|---|---|
pyproject.toml |
Raises PyTorch and TorchAudio minimum versions. |
docs/whats_new.rst |
Documents the dependency requirement. |
braindecode/models/zuna.py |
Removes stale compatibility wording. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1174 +/- ##
==========================================
+ Coverage 86.57% 86.79% +0.21%
==========================================
Files 142 142
Lines 16303 16271 -32
==========================================
+ Hits 14114 14122 +8
+ Misses 2189 2149 -40 🚀 New features to boost your workflow:
|
Take master's REVE and ZUNA files (same RMSNorm change, from braindecode#1176) and drop the duplicate API-changes entry for the PyTorch >= 2.4 requirement (braindecode#1174). Affected model tests: 328 passed, 56 skipped.

Require PyTorch and TorchAudio >= 2.4 so installations support the native RMSNorm already used by MVPFormer and needed by BaRISTA (#1173). Merge this PR before #1173.
Remove REVE's old-version import guard, availability flag, warning, manual attention fallback, and intermediate attention wrapper. Call native scaled-dot-product attention directly. Replace handwritten RMS normalization in REVE and ZUNA with native
functional.rms_norm, retaining only the float32 accumulation and output casts needed for their reference behavior. Epsilon values and checkpoint parameter keys are preserved. CodeBrain's normalization is unchanged because its formula differs from standard RMSNorm.Address both review comments: move the release note into Requirements, remove Intel macOS from uv's required environments, and document the dropped platform in the installation guide. PyTorch stopped publishing Intel macOS binaries after 2.2.
Validation:
The full documentation build exposed an existing MNE 1.13 incompatibility in the sleep-staging gallery example: N3 and N4 intentionally share a class target, but MNE now rejects duplicate event-ID values. Keep annotation event IDs unique in the shared windower and retain the requested class targets in metadata, including per-event strides. Also repair the unresolved Copilot link in the changelog. The windowing suite passed 141 tests with two skips on MNE 1.13.2; eight alias/stride/preload regression cases passed after expanding coverage. All configured pre-commit hooks pass.