google-deepmind / optax

Optax is a gradient processing and optimization library for JAX.
https://optax.readthedocs.io
Apache License 2.0
1.57k stars 169 forks source link

Warn that in future arguments after the initial (prediction, ground_truth) positional arguments will become keyword-only in optax losses. #863

Closed copybara-service[bot] closed 4 months ago

copybara-service[bot] commented 4 months ago

Warn that in future arguments after the initial (prediction, ground_truth) positional arguments will become keyword-only in optax losses.

This is to prevent users from accidentally passing in the wrong order of arguments, and to make interfaces functionally more similar (e.g. after partialling loss-specific hyper-parameters).