From 2ac063347eb86c443968c28d053cad649d518c0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Val=C3=A9rian=20Rey?= Date: Tue, 14 Apr 2026 17:47:51 +0200 Subject: [PATCH 1/2] Improve aggregator contribution guidelines in CONTRIBUTING.md --- CONTRIBUTING.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cde0df1e..7e16e429 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -208,9 +208,15 @@ the context of Jacobian descent, it is used to reduce a Jacobian matrix into a v used to update the parameters. In TorchJD, an `Aggregator` subclass should be a faithful implementation of a mathematical aggregator. -> [!WARNING] -> Currently, we only accept aggregators that have the same interface as the `Aggregator` base class. -> We do not support stateful aggregators yet, so the proposed aggregators **must be immutable**. +> [!NOTE] +> We now also accept stateful aggregators, whose output depends both on the Jacobian and on some +> internal state (which can be affected for example by previous Jacobians). + +> [!NOTE] +> Some aggregators may depend on something else than the Jacobian. To implement them, please add +> setters so that any extra information can be given by the user to the aggregator before it is +> actually used. For example, if your aggregator needs to take the loss values, this can be given +> at every iteration through a `set_losses` setter. > [!NOTE] > Before working on the implementation of a new aggregator, please contact us via an issue or a From ba14b0e61657376645f90e4172c2ab824bf6b1f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Val=C3=A9rian=20Rey?= <31951177+ValerianRey@users.noreply.github.com> Date: Wed, 15 Apr 2026 10:52:35 +0200 Subject: [PATCH 2/2] Remove "now" Co-authored-by: Pierre Quinton --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7e16e429..3847963f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -209,7 +209,7 @@ used to update the parameters. In TorchJD, an `Aggregator` subclass should be a implementation of a mathematical aggregator. > [!NOTE] -> We now also accept stateful aggregators, whose output depends both on the Jacobian and on some +> We also accept stateful aggregators, whose output depends both on the Jacobian and on some > internal state (which can be affected for example by previous Jacobians). > [!NOTE]