Skip to content

Conversation

@hertschuh
Copy link
Collaborator

Replaces #21744

@gemini-code-assist
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 updating the PyTorch dependency across various configuration files to version 2.9.0. The primary objective is to bring the project's GPU-accelerated environments up to the latest stable Torch release, while also ensuring that the corresponding CPU-only testing configurations are aligned. This update aims to incorporate the newest features, performance improvements, and bug fixes available in PyTorch 2.9.0.

Highlights

  • Torch Version Update: The core PyTorch dependency has been upgraded from version 2.8.0 to 2.9.0 for CUDA-enabled environments.
  • CPU-only Torch Alignment: The CPU-only Torch versions used for testing in requirements-jax-cuda.txt and requirements-tensorflow-cuda.txt have been updated from 2.8.0 to 2.9.0+cpu.
  • Compatibility Maintained: The update ensures continued compatibility with torch-xla in the CUDA environment.
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 Torch version to 2.9.0 across different requirement files. The updates for CPU-only Torch installations in requirements-jax-cuda.txt and requirements-tensorflow-cuda.txt appear correct. However, I have a significant concern regarding the update in requirements-torch-cuda.txt. I've left a comment detailing a likely version incompatibility between torch==2.9.0 and torch-xla==2.8.1, which could break the build for the Torch+XLA on CUDA environment. This should be addressed before merging.

Comment on lines +8 to 9
torch==2.9.0
torch-xla==2.8.1;sys_platform != 'darwin'
Copy link
Contributor

Choose a reason for hiding this comment

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

critical

This change introduces a potential version incompatibility. torch-xla versions are tightly coupled with torch versions, and torch-xla==2.8.1 is designed for torch==2.8.x. Using it with torch==2.9.0 is likely to cause build or runtime errors.

The comment on line 6 (# - torch is pinned to a version that is compatible with torch-xla.) reinforces this concern.

Since a torch-xla version compatible with torch==2.9.0 does not appear to be publicly available yet, this torch version bump might be premature for the CUDA environment with XLA. It would be best to either update torch-xla to a compatible version if one is available, or revert the torch update in this file until a compatible torch-xla is released.

@codecov-commenter
Copy link

codecov-commenter commented Oct 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.63%. Comparing base (e2be4de) to head (138731a).
⚠️ Report is 52 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #21756   +/-   ##
=======================================
  Coverage   82.63%   82.63%           
=======================================
  Files         572      572           
  Lines       58555    58555           
  Branches     9153     9153           
=======================================
  Hits        48385    48385           
  Misses       7843     7843           
  Partials     2327     2327           
Flag Coverage Δ
keras 82.43% <ø> (ø)
keras-jax 63.19% <ø> (ø)
keras-numpy 57.57% <ø> (ø)
keras-openvino 34.38% <ø> (ø)
keras-tensorflow 63.96% <ø> (ø)
keras-torch 63.50% <ø> (ø)

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.

@google-ml-butler google-ml-butler bot added kokoro:force-run ready to pull Ready to be merged into the codebase labels Oct 17, 2025
@fchollet fchollet merged commit a6345cd into keras-team:master Oct 17, 2025
12 checks passed
@google-ml-butler google-ml-butler bot removed awaiting review ready to pull Ready to be merged into the codebase kokoro:force-run labels Oct 17, 2025
@hertschuh hertschuh deleted the torch_version branch October 18, 2025 04:16
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