Skip to content

Conversation

hertschuh
Copy link
Collaborator

@hertschuh hertschuh commented Oct 10, 2025

Replacement for #21704

Also:

  • Disabled an ONNX export test for Torch that was already disabled on GPU with both JAX and Tensorflow.
  • Moved install for tf_keras from requirements.txt to action.yml using the --no-deps option because tf_keras depends on tensorflow, which installs the non-CPU version of TensorFlow and causes issues with CPU tests.

Copy link
Contributor

Summary of Changes

Hello @hertschuh, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on synchronizing and upgrading the versions of key deep learning framework dependencies, specifically Torch and TensorFlow, across various environment configurations. The primary goal is to ensure the project benefits from the latest features, performance improvements, and bug fixes provided by these updated library versions, thereby enhancing overall stability and compatibility.

Highlights

  • Torch Version Update: The Torch dependency has been updated across all relevant requirement files from version 2.6.0 to 2.8.0.
  • TensorFlow Version Update: The TensorFlow dependency, including both CPU-only and CUDA-enabled versions, has been updated from 2.18.1 to 2.20.0 in the respective requirement files.
  • Torch-XLA Update: The torch-xla dependency has been updated from 2.6.0 to 2.8.1 in files where it is specified.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the versions of TensorFlow and PyTorch across various requirement files. The changes are mostly straightforward version bumps. I've identified one potential issue in requirements.txt where the PyTorch dependency for macOS seems to have been accidentally removed. My review includes a suggestion to fix this.

@codecov-commenter
Copy link

codecov-commenter commented Oct 10, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.62%. Comparing base (14144cb) to head (778112f).

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #21732      +/-   ##
==========================================
+ Coverage   77.98%   82.62%   +4.64%     
==========================================
  Files         572      572              
  Lines       58499    58499              
  Branches     9143     9143              
==========================================
+ Hits        45621    48336    +2715     
+ Misses      10657     7838    -2819     
- Partials     2221     2325     +104     
Flag Coverage Δ
keras 82.43% <ø> (+4.60%) ⬆️
keras-jax 63.21% <ø> (?)
keras-numpy 57.58% <ø> (ø)
keras-openvino 34.35% <ø> (ø)
keras-tensorflow 63.97% <ø> (ø)
keras-torch 63.51% <ø> (ø)

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@hertschuh hertschuh force-pushed the req_version branch 3 times, most recently from ddff6e5 to 3bbf56f Compare October 10, 2025 20:33
@hertschuh hertschuh force-pushed the req_version branch 6 times, most recently from e0b1683 to 4a55e58 Compare October 11, 2025 18:06
@hertschuh hertschuh marked this pull request as draft October 11, 2025 18:08
@hertschuh hertschuh force-pushed the req_version branch 11 times, most recently from 6a4b251 to e257167 Compare October 11, 2025 22:37
@hertschuh hertschuh force-pushed the req_version branch 7 times, most recently from 0904c7e to 80abe02 Compare October 13, 2025 21:23
@hertschuh hertschuh marked this pull request as ready for review October 14, 2025 20:17
@hertschuh hertschuh changed the title Update Torch version everywhere and TF version on GPU. Update Torch and Tensorflow versions in cuda requirements files. Oct 14, 2025
@hertschuh hertschuh requested a review from abheesht17 October 14, 2025 20:20
Copy link
Collaborator

@abheesht17 abheesht17 left a comment

Choose a reason for hiding this comment

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

Thanks, one comment

@pytest.mark.skipif(
testing.tensorflow_uses_gpu(), reason="Leads to core dumps on CI"
testing.jax_uses_gpu()
or testing.tensorflow_uses_gpu
Copy link
Collaborator

Choose a reason for hiding this comment

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

testing.tensorflow_uses_gpu --> testing.tensorflow_uses_gpu()?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oh, good catch. Fixed.

Replacement for keras-team#21704

Also:
- Disabled an ONNX export test for Torch that was already disabled on GPU with both JAX and Tensorflow.
- Moved install for `tf_keras` from `requirements.txt` to `action.yml` using the `--no-deps` option because `tf_keras` depends on `tensorflow`, which installs the non-CPU version of TensorFlow and causes issues with CPU tests.
Copy link
Collaborator

@abheesht17 abheesht17 left a comment

Choose a reason for hiding this comment

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

Thanks!

@google-ml-butler google-ml-butler bot added kokoro:force-run ready to pull Ready to be merged into the codebase labels Oct 15, 2025
@hertschuh hertschuh merged commit ccbc9d4 into keras-team:master Oct 15, 2025
11 checks passed
@google-ml-butler google-ml-butler bot removed awaiting review ready to pull Ready to be merged into the codebase labels Oct 15, 2025
@hertschuh hertschuh deleted the req_version branch October 15, 2025 05: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.

5 participants