feat(aggregation): Add CRMOGMWeighting#669
Conversation
|
Thanks a lot for the PR! I'm gonna review soon! In the meantime, you can try to get the CI the pass |
|
Hello, Happy to say, all checks have been passed! Glad to have got my first PR as well. Looking forward to feedback |
|
All the things addressed:
Still open:
|
|
Hello I updated the code with the changes that were requested with these two commits, its just that 2nd commit has the similified version and the raise on shape change in CRMOGMWeighting._ensure_state |
This comment was marked as resolved.
This comment was marked as resolved.
- Introduces a new public `torchjd.linalg` package exposing `Matrix` and `PSDMatrix` (the rest of `_linalg` stays protected) - Makes `MatrixWeighting` and `GramianWeighting` protected. These classes are still used to specify the docstring of the `__call__` methods of the aggregators, but the user only sees those aggregators as `Weighting[Matrix]` and `Weighting[PSDMatrix]`, respectively. The `MatrixWeighting` and `GramianWeighting` classes really just bring updated docstrings, that's all. - Makes the public type of the gramian_weighting of GramianWeightedAggregator be Weighting[PSDMatrix] instead of GramianWeighting, so that #669 can work. Similar with weighting of WeightedAggregator being Weighting[Matrix]. - Expands docstrings on `Matrix` and `PSDMatrix` with Jacobian and Gramian examples; adds Sphinx documentation under a new **linalg** section in the API Reference
|
/opencode:Plan Please review this with a lot of precision. |
This comment was marked as resolved.
This comment was marked as resolved.
Replace the hardcoded uniform λ₀ = 1/m with an optional `initial_weights` parameter. When `None` (default), λ₀ is set to λ̂₁ on the first forward call so the first smoothed output always equals the wrapped weighting's output regardless of α. Users who want uniform initialisation can still pass the tensor explicitly. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
|
Ready to merge IMO @KhusPatel4450 @PierreQuinton To summarize, I:
|
Tests: