keras-team / keras-core

A multi-backend implementation of the Keras API, with support for TensorFlow, JAX, and PyTorch.
Apache License 2.0
1.27k stars 115 forks source link

Update return type for optimizer.apply #850

Closed mattdangerw closed 1 year ago

mattdangerw commented 1 year ago

Style nit, remove return type from optimizer.apply, so it is 1-1 with the signature for optimizer.stateless_apply. We can leave the iterations return type on apply_gradients for compat with tf.keras. It seems mostly for compat, and has no stateless version.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and project coverage change: -6.67% :warning:

Comparison is base (ab45558) 75.99% compared to head (110a256) 69.33%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #850 +/- ## ========================================== - Coverage 75.99% 69.33% -6.67% ========================================== Files 328 328 Lines 31099 31099 Branches 6051 6051 ========================================== - Hits 23635 21561 -2074 - Misses 5866 8033 +2167 + Partials 1598 1505 -93 ``` | [Flag](https://app.codecov.io/gh/keras-team/keras-core/pull/850/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=keras-team) | Coverage Δ | | |---|---|---| | [keras_core](https://app.codecov.io/gh/keras-team/keras-core/pull/850/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=keras-team) | `69.27% <100.00%> (-6.65%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=keras-team#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files Changed](https://app.codecov.io/gh/keras-team/keras-core/pull/850?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=keras-team) | Coverage Δ | | |---|---|---| | [keras\_core/optimizers/base\_optimizer.py](https://app.codecov.io/gh/keras-team/keras-core/pull/850?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=keras-team#diff-a2VyYXNfY29yZS9vcHRpbWl6ZXJzL2Jhc2Vfb3B0aW1pemVyLnB5) | `74.19% <100.00%> (ø)` | | ... and [36 files with indirect coverage changes](https://app.codecov.io/gh/keras-team/keras-core/pull/850/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=keras-team)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

mattdangerw commented 1 year ago

The torch failure here looks unrelated. Could it be a flake?