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

Fix autocast scope again #849

Merged
merged 1 commit into from
Sep 8, 2023

Conversation

mattdangerw
Copy link
Member

Sometimes in preprocessing layers our dtype is not a floating point dtype. In these cases we should never autocast, it would error immediately.

@codecov
Copy link

codecov bot commented Sep 7, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.01% 🎉

Comparison is base (ab45558) 75.99% compared to head (d017df7) 76.01%.
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #849      +/-   ##
==========================================
+ Coverage   75.99%   76.01%   +0.01%     
==========================================
  Files         328      328              
  Lines       31099    31105       +6     
  Branches     6051     6053       +2     
==========================================
+ Hits        23635    23644       +9     
+ Misses       5866     5864       -2     
+ Partials     1598     1597       -1     
Flag Coverage Δ
keras_core 75.92% <100.00%> (+0.01%) ⬆️

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

Files Changed Coverage Δ
keras_core/layers/layer.py 87.05% <100.00%> (+0.04%) ⬆️

... and 3 files with indirect coverage changes

☔ View full report in Codecov by Sentry.

📢 Have feedback on the report? Share it here.

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.

Thanks for the PR! Please add a test and a code comment.

Sometimes in preprocessing layers our dtype is not a floating point
dtype. In these cases we should never autocast, it would error
immediately.
@mattdangerw
Copy link
Member Author

Done!

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 efc205c into keras-team:main Sep 8, 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