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

Patch tf2onnx to ensure compatibility with numpy>=2.0.0 #20725

Merged
merged 3 commits into from
Jan 5, 2025

Conversation

james77777778
Copy link
Contributor

@james77777778 james77777778 commented Jan 5, 2025

This PR adds hacks to tf2onnx to ensure Keras remains compatible with numpy>=2.0.0.

Additionally, the export logic has been simplified, removing the need for a temporary SavedModel.

@codecov-commenter
Copy link

codecov-commenter commented Jan 5, 2025

Codecov Report

Attention: Patch coverage is 42.98246% with 65 lines in your changes missing coverage. Please review.

Project coverage is 81.83%. Comparing base (94977dd) to head (7de1d2b).

Files with missing lines Patch % Lines
keras/src/export/tf2onnx_lib.py 32.29% 59 Missing and 6 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #20725      +/-   ##
==========================================
- Coverage   81.93%   81.83%   -0.10%     
==========================================
  Files         551      552       +1     
  Lines       51264    51363      +99     
  Branches     7924     7944      +20     
==========================================
+ Hits        42003    42034      +31     
- Misses       7315     7375      +60     
- Partials     1946     1954       +8     
Flag Coverage Δ
keras 81.65% <41.22%> (-0.10%) ⬇️
keras-jax 63.95% <40.35%> (-0.07%) ⬇️
keras-numpy 58.81% <11.40%> (-0.11%) ⬇️
keras-openvino 29.84% <11.40%> (-0.05%) ⬇️
keras-tensorflow 64.62% <40.35%> (-0.07%) ⬇️
keras-torch 63.94% <11.40%> (-0.11%) ⬇️

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

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

Copy link
Collaborator

@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, thank you!

@google-ml-butler google-ml-butler bot added kokoro:force-run ready to pull Ready to be merged into the codebase labels Jan 5, 2025
@fchollet fchollet merged commit 881d8da into keras-team:master Jan 5, 2025
8 checks passed
@google-ml-butler google-ml-butler bot removed ready to pull Ready to be merged into the codebase kokoro:force-run labels Jan 5, 2025
@james77777778 james77777778 deleted the improve-export-onnx branch January 5, 2025 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants