-
Notifications
You must be signed in to change notification settings - Fork 2.9k
chore(tpu): Updating TPUv2 to TPUv5 #10038
New issue
Have a question about this project? Sig 10000 n 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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @m-strzelczyk, 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!
Summary of Changes
This pull request updates the TPU configurations in the Java samples to reflect the transition from TPUv2 to TPUv5. The changes primarily involve updating the zone, TPU type, and TPU software version in several sample files.
Highlights
- TPU Version Update: The samples are updated to use TPUv5 configurations instead of TPUv2.
- Configuration Changes: The zone is changed from
us-central1-f
tous-central1-a
, the TPU type is updated tov5litepod-4
, and the TPU software version is updated tov2-tpuv5-litepod
. - File Modifications: Multiple files are modified to reflect the new TPU configurations, including
CreateQueuedResource.java
,CreateQueuedResourceWithNetwork.java
,CreateQueuedResourceWithStartupScript.java
,CreateSpotQueuedResource.java
,CreateSpotTpuVm.java
,CreateTimeBoundQueuedResource.java
,CreateTpuVm.java
,CreateTpuVmWithStartupScript.java
,QueuedResourceIT.java
, andTpuVmIT.java
.
Changelog
Click here to see the changelog
- tpu/src/main/java/tpu/CreateQueuedResource.java
- Updated zone from
us-central1-f
tous-central1-a
(line 38). - Updated TPU type from
v2-8
tov5litepod-4
(line 44). - Updated TPU software version from
tpu-vm-tf-2.14.1
tov2-tpuv5-litepod
(line 47).
- Updated zone from
- tpu/src/main/java/tpu/CreateQueuedResourceWithNetwork.java
- Updated TPU software version from
tpu-vm-tf-2.14.1
tov2-tpuv5-litepod
(line 49).
- Updated TPU software version from
- tpu/src/main/java/tpu/CreateQueuedResourceWithStartupScript.java
- Updated TPU software version from
tpu-vm-tf-2.14.1
tov2-tpuv5-litepod
(line 47).
- Updated TPU software version from
- tpu/src/main/java/tpu/CreateSpotQueuedResource.java
- Updated zone from
us-central1-f
tous-central1-a
(line 37). - Updated TPU software version from
tpu-vm-tf-2.14.1
tov2-tpuv5-litepod
(line 46).
- Updated zone from
- tpu/src/main/java/tpu/CreateSpotTpuVm.java
- Updated zone from
us-central1-f
tous-central1-a
(line 36). - Updated TPU software version from
tpu-vm-tf-2.14.1
tov2-tpuv5-litepod
(line 45).
- Updated zone from
- tpu/src/main/java/tpu/CreateTimeBoundQueuedResource.java
- Updated runtime version from
tpu-vm-tf-2.14.1
tov2-tpuv5-litepod
(line 47).
- Updated runtime version from
- tpu/src/main/java/tpu/CreateTpuVm.java
- Updated TPU software version from
tpu-vm-tf-2.14.1
tov2-tpuv5-litepod
(line 49).
- Updated TPU software version from
- tpu/src/main/java/tpu/CreateTpuVmWithStartupScript.java
- Updated zone from
us-central1-f
tous-central1-a
(line 37). - Updated TPU software version from
tpu-vm-tf-2.14.1
tov2-tpuv5-litepod
(line 46).
- Updated zone from
- tpu/src/main/java/tpu/DeleteForceQueuedResource.java
- Added a string literal at the beginning of the file (line 1).
- tpu/src/main/java/tpu/DeleteQueuedResource.java
- Added a string literal at the beginning of the file (line 1).
- tpu/src/main/java/tpu/GetQueuedResource.java
- Added a string literal at the beginning of the file (line 1).
- tpu/src/main/java/tpu/ListTpuVms.java
- Added a string literal at the beginning of the file (line 1).
- tpu/src/main/java/tpu/StartTpuVm.java
- Added a string literal at the beginning of the file (line 1).
- tpu/src/main/java/tpu/StopTpuVm.java
- Added a string literal at the beginning of the file (line 1).
- tpu/src/test/java/tpu/QueuedResourceIT.java
- Updated TPU software version from
tpu-vm-tf-2.14.1
tov2-tpuv5-litepod
(line 57).
- Updated TPU software version from
- tpu/src/test/java/tpu/TpuVmIT.java
- Updated TPU software version from
tpu-vm-tf-2.14.1
tov2-tpuv5-litepod
(line 59).
- Updated TPU software version from
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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command>
or @gemini-code-assist <command>
. Below is a summary of the supported commands.
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 issue 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 is currently in preview and 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 to provide feedback.
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.
Did you know?
The first TPU was internally used by Google for more than a year before being revealed in 2016.
Footnotes
-
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. ↩
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to 10000 others. Learn more.
Code Review
The pull request aims to update the TPU version from v2 to v5. However, there are inconsistencies and potential errors in the code changes that need to be addressed before merging.
Summary of Findings
- Incorrect Zone Update: The zone updates in multiple files appear to be incorrect. The original zone was
us-central1-f
, and it was changed tous-central1-a
. Please verify if this change is correct and consistent with the intended behavior. - Unexpected Code Insertion: Multiple files have the string
"v5litepod-4";"v5litepod-4";/*
inserted at the beginning. This seems like an error and should be removed. - Inconsistent TPU Type Update: The
tpuType
variable is not consistently updated across all files. Some files still usev2-8
, while others have been updated tov5litepod-4
. Ensure consistency based on the intended TPU version.
Merge Readiness
Due to the critical issues identified, such as the unexpected code insertion and potential incorrect zone updates, this pull request is not ready for merging. These issues must be addressed to ensure the code functions as intended. I am unable to approve this pull request, and recommend that others review and approve this code before merging.
@@ -1,4 +1,4 @@ | |||
/* | |||
"v5litepod-4";"v5litepod-4";/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -1,4 +1,4 @@ | |||
/* | |||
us-central1-a/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -1,4 +1,4 @@ | |||
/* | |||
"v5litepod-4";"v5litepod-4";/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -1,4 +1,4 @@ | |||
/* | |||
"v5litepod-4";"v5litepod-4";/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -1,4 +1,4 @@ | |||
/* | |||
"v5litepod-4";"v5litepod-4";/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -34,7 +34,7 @@ public static void main(String[] args) | |||
// The zone in which to create the TPU. | |||
// For more information about supported TPU types for specific zones, | |||
// see https://cloud.google.com/tpu/docs/regions-zones | |||
String zone = "us-central1-f"; | |||
String zone = "us-central1-a"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -43,7 +43,7 @@ public static void main(String[] args) | |||
String tpuType = "v2-8"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -44,7 +44,7 @@ public static void main(String[] args) | |||
String tpuType = "v2-8"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -46,7 +46,7 @@ public static void main(String[] args) | |||
String tpuType = "v2-8"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// The name for your TPU. | ||
String nodeName = "YOUR_NODE_ID"; | ||
// The accelerator type that specifies the version and size of the Cloud TPU you want to create. | ||
// For more information about supported accelerator types for each TPU version, | ||
// see https://cloud.google.com/tpu/docs/system-architecture-tpu-vm#versions. | ||
String tpuType = "v2-8"; | ||
String tpuType ="v5litepod-4"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description
Fixes b/400926465
Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.
Checklist
pom.xml
parent set to latestshared-configuration
mvn clean verify
requiredmvn -P lint checkstyle:check
requiredmvn -P lint clean compile pmd:cpd-check spotbugs:check
advisory only