Skip to content

Commit bf7470d

Browse files
docs: Improve Aggregator contribution guidelines (#642)
--------- Co-authored-by: Pierre Quinton <pierre.quinton@epfl.ch>
1 parent e66be88 commit bf7470d

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

CONTRIBUTING.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,9 +208,15 @@ the context of Jacobian descent, it is used to reduce a Jacobian matrix into a v
208208
used to update the parameters. In TorchJD, an `Aggregator` subclass should be a faithful
209209
implementation of a mathematical aggregator.
210210
211-
> [!WARNING]
212-
> Currently, we only accept aggregators that have the same interface as the `Aggregator` base class.
213-
> We do not support stateful aggregators yet, so the proposed aggregators **must be immutable**.
211+
> [!NOTE]
212+
> We also accept stateful aggregators, whose output depends both on the Jacobian and on some
213+
> internal state (which can be affected for example by previous Jacobians).
214+
215+
> [!NOTE]
216+
> Some aggregators may depend on something else than the Jacobian. To implement them, please add
217+
> setters so that any extra information can be given by the user to the aggregator before it is
218+
> actually used. For example, if your aggregator needs to take the loss values, this can be given
219+
> at every iteration through a `set_losses` setter.
214220
215221
> [!NOTE]
216222
> Before working on the implementation of a new aggregator, please contact us via an issue or a

0 commit comments

Comments
 (0)