Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update return type for optimizer.apply #850

Merged
merged 1 commit into from
Sep 7, 2023

Conversation

mattdangerw
Copy link
Member

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
Copy link

codecov bot commented Sep 7, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -6.67% ⚠️

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

Additional details and impacted files
@@            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 Coverage Δ
keras_core 69.27% <100.00%> (-6.65%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
keras_core/optimizers/base_optimizer.py 74.19% <100.00%> (ø)

... and 36 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Keeps a parallel API between optimizer.apply and
optimizer.stateless_apply. We can leave the iterations return type
on apply_gradients for compat with tf.keras.
@mattdangerw
Copy link
Member Author

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

Copy link
Contributor

@fchollet fchollet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks

@fchollet fchollet merged commit f102a96 into keras-team:main Sep 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants