Repository navigation
refactor(aggregation): Remove redundant GradVac weighting alias - #811
Merged
Merged
Conversation
GradVac stored its weighting a second time in `_gradvac_weighting`, although the base class already exposes it as `gramian_weighting`, which every other aggregator uses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ValerianRey
marked this pull request as ready for review
October 7, 2026 16:12
ValerianRey
requested review from
KhusPatel4450 and
PierreQuinton
as code owners
October 7, 2026 16:12
ValerianRey
enabled auto-merge (squash)
October 7, 2026 16:12
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.
GradVacstored its weighting a second time inself._gradvac_weighting, althoughGramianWeightedAggregatoralready setsself.gramian_weighting(typed asGradVacWeighting), which every other aggregator uses. Since it's annn.Moduleattribute, the alias also registered the submodule under one more name, sostate_dict()held a third copy of_phi_t.Outputs are unchanged (same seed, including setters and
reset), and the GradVac tests pass.Note: a
GradVacstate_dictsaved before this change has the extra_gradvac_weighting._phi_tkey, soload_state_dict(strict=True)would reject it. Loading aGradVacstate_dictinto a freshGradVacalready fails on main, because_phi_tstarts asNone.🤖 Generated with Claude Code