feat(aggregation): GradVac and enhanced interactive plotter#641
Open
rkhosrowshahi wants to merge 21 commits intoSimplexLab:mainfrom
Open
feat(aggregation): GradVac and enhanced interactive plotter#641rkhosrowshahi wants to merge 21 commits intoSimplexLab:mainfrom
rkhosrowshahi wants to merge 21 commits intoSimplexLab:mainfrom
Conversation
Implement Gradient Vaccine (ICLR 2021) as a stateful Jacobian aggregator. Support group_type 0 (whole model), 1 (all_layer via encoder), and 2 (all_matrix via shared_params), with DEFAULT_GRADVAC_EPS and configurable eps. Add Sphinx page and unit tests. Autogram is not supported; use torch.manual_seed for reproducible task shuffle order.
- Add GOVERNANCE.md documenting technical governance structure - Add CODEOWNERS file defining project maintainers - Add CODE_OF_CONDUCT.md referencing Linux Foundation CoC These files are required for PyTorch Ecosystem membership. --------- Co-authored-by: Valérian Rey <31951177+ValerianRey@users.noreply.github.com>
- Use group_type "whole_model" | "all_layer" | "all_matrix" instead of 0/1/2 - Remove DEFAULT_GRADVAC_EPS from the public API; keep default 1e-8; allow eps=0 - Validate beta via setter; tighten GradVac repr/str expectations - Fix all_layer leaf sizing via children() and parameters() instead of private fields - Trim redundant GradVac.rst prose; align docs with the new API - Tests: GradVac cases, value regression with torch.manual_seed for GradVac - Plotter: factory dict + fresh aggregator instances per update; legend from selected keys; MathJax labels and live angle/length readouts in the sidebar This commit includes GradVac implementation with Aggregator class.
…hting GradVac only needs gradient norms and dot products, which are fully determined by the Gramian. This makes GradVac compatible with the autogram path. - Remove grouping parameters (group_type, encoder, shared_params) from GradVac - Export GradVacWeighting publicly
Seed is already set to 0 because of the autoused fix_randomness fixture declared in conftest.py
Add a Grouping example page covering all four strategies from the GradVac paper (whole_model, enc_dec, all_layer, all_matrix), with a runnable code block for each. Update the GradVac docstring note to link to the new page instead of the previous placeholder text. Fix trailing whitespace in CHANGELOG.md.
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.
Summary
This PR adds GradVac (
GradVac/GradVacWeighting) and related docs, tests, and changelog updates, and restores the enhanced interactive plotter UI intests/plots/(aggregator factories, AlignedMTL scale modes, live angle/length readouts, MathJax labels).GradVac
docs/source/examples/grouping.rst)Interactive plotter
tests/plots/interactive_plotter.pyandtests/plots/_utils.py: factory-based aggregators, checklist selection, improved gradient controlsNote: If you prefer to land GradVac and plotting separately, this branch can be split after review.