Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: tpu_queued_resources_startup_script/create_network/time_bound#3907

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
gryczj wants to merge11 commits intomain
base:main
Choose a base branch
Loading
fromtpu_queued_resources_startup_script

Conversation

@gryczj
Copy link
Contributor

@gryczjgryczj commentedOct 23, 2024
edited
Loading

Description

Fixes #

Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.

Checklist

  • I have followed guidelines fromCONTRIBUTING.MD andSamples Style Guide
  • Tests pass:npm test (seeTesting)
  • Lint pass:npm run lint (seeStyle)
  • These samples need a newAPI enabled in testing projects to pass (let us know which ones)
  • These samples need a new/updatedenv vars in testing projects set to pass (let us know which ones)
  • This pull request is from a branch created directly off ofGoogleCloudPlatform/nodejs-docs-samples. Not a fork.
  • This sample adds a new sample directory, and I updated theCODEOWNERS file with the codeowners for this sample
  • This sample adds a new sample directory, and I createdGitHub Actions workflow for this sample
  • This sample adds a newProduct API, and I updated theBlunderbuss issue/PR auto-assigner with the codeowners for this sample
  • Pleasemerge this PR for me once it is approved

@gryczjgryczj added kokoro:force-runAdd this label to force Kokoro to re-run the tests. kokoro:runAdd this label to force Kokoro to re-run the tests. labelsOct 23, 2024
@gryczjgryczj requested review froma team ascode ownersOctober 23, 2024 11:57
@snippet-bot
Copy link

snippet-botbot commentedOct 23, 2024
edited
Loading

Here is the summary of changes.

You are about to add 3 region tags.

This comment is generated bysnippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, addsnippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@product-auto-labelproduct-auto-labelbot added samplesIssues that are directly related to samples. api: workflowsIssues related to the Workflows API. labelsOct 23, 2024
@gryczjgryczj added the api: tpuIssues related to the Cloud TPU API. labelOct 23, 2024
@gryczjgryczjforce-pushed thetpu_queued_resources_startup_script branch 2 times, most recently from3276b2a to3ef4622CompareOctober 23, 2024 18:12
@gryczjgryczj changed the titlefeat: tpu_queued_resources_startup_scriptfeat: tpu_queued_resources_startup_script/create_networkOct 24, 2024
@gryczjgryczjforce-pushed thetpu_queued_resources_startup_script branch from83378d8 tocb97989CompareOctober 25, 2024 09:57
@gryczjgryczj changed the titlefeat: tpu_queued_resources_startup_script/create_networkfeat: tpu_queued_resources_startup_script/create_network/time_boundOct 25, 2024
@gryczjgryczjforce-pushed thetpu_queued_resources_startup_script branch 2 times, most recently frome6c1d2c to964cafbCompareOctober 30, 2024 11:48
@gryczjgryczjforce-pushed thetpu_queued_resources_startup_script branch from964cafb toa66c4ebCompareNovember 12, 2024 17:05
@gryczj
Copy link
ContributorAuthor

Due to high costs of TPU Nodes, it was decided to use mocks in the tests.

@gryczjgryczjforce-pushed thetpu_queued_resources_startup_script branch froma66c4eb to9a724f9CompareNovember 20, 2024 12:30
@iennae
Copy link
Contributor

@gemini review

Copy link
Contributor

Choose a reason for hiding this comment

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

This pull request adds support for TPU queued resources and includes creating a network, startup script, and time-bound resource. The implementation looks good, and the tests are comprehensive. Here are a few suggestions:

  • Consider adding more details to the PR description about the specific functionalities added and how they address the linked issue. This will help reviewers understand the context better.
  • Ensure all TODO comments are addressed before merging.
  • Update the README files to reflect the new functionalities added by this PR.

id-token: 'write'
if: github.event_name == 'schedule' && always() # always() submits logs even if tests fail
uses: ./.github/workflows/flakybot.yaml
needs: [test] No newline at end of file

Choose a reason for hiding this comment

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

unknown

Consider adding a newline at the end of the file for consistency.

Suggested change
needs:[test]
needs:[test]

Comment on lines +28 to +29
// TODO(developer): Uncomment below line before running the sample.
// tpuClient = new TpuClient();

Choose a reason for hiding this comment

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

medium

Consider instantiating thetpuClient here since you're suggesting to import the class above. This makes the example runnable.

Suggested change
//TODO(developer): Uncomment below line before running the sample.
// tpuClient = new TpuClient();
//Instantiate a tpuClient
consttpuClient=newTpuClient();

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

It is commented, becuase mocked tpuClient is used for testing and I pass mock to this function. If user wants to use real TPUClient, they will need to uncomment this line

Choose a reason for hiding this comment

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

Understood. For clarity, perhaps a comment indicating that thetpuClient instantiation is for non-testing scenarios would be beneficial. This would help users understand the purpose of the commented-out code more easily.

Suggested change
//TODO(developer): Uncomment below line before running the sample.
// tpuClient = new TpuClient();
//Instantiate a tpuClient (uncomment for non-testing scenarios)
//consttpuClient = new TpuClient();

Comment on lines +22 to +23
// TODO(developer): Uncomment below line before running the sample.
// const {TpuClient} = require('@google-cloud/tpu').v2alpha1;

Choose a reason for hiding this comment

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

medium

SinceTpuClient is already imported in the tests, consider importing it here as well instead of relying on the parameter. This makes the code more self-contained and easier to understand.

Suggested change
// TODO(developer): Uncomment below line before running the sample.
//const {TpuClient} = require('@google-cloud/tpu').v2alpha1;
const{TpuClient}=require('@google-cloud/tpu').v2alpha1;
const{Node, NetworkConfig, QueuedResource}=require('@google-cloud/tpu').protos.google.cloud.tpu.v2alpha1;

Comment on lines +31 to +33
/**
* TODO(developer): Update/uncomment these variables before running the sample.
*/

Choose a reason for hiding this comment

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

medium

Update the TODO with instructions on how to set up the required environment variables or configuration.

Suggested change
/**
*TODO(developer):Update/uncommentthesevariablesbeforerunningthesample.
*/
/**
*TODO(developer):Beforerunningthesample,
*1.Setthe`GOOGLE_APPLICATION_CREDENTIALS`environmentvariabletothepathofyourserviceaccountkeyfile.
*2.Createanetworknamed'compute-tpu-network'inthe'europe-west4'region.
*3.Createasubnetworkwiththesamenameasthenetworkinthe'europe-west4'region.
*/

@@ -0,0 +1,3 @@
---
env:
mocha: true No newline at end of file

Choose a reason for hiding this comment

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

unknown

Consider adding a newline at the end of the file for consistency.

Suggested change
mocha: true
mocha: true

@gryczjgryczjforce-pushed thetpu_queued_resources_startup_script branch fromd06385d to23feb0fCompareNovember 26, 2024 09:08
@gryczjgryczj assignediennae and unassignediennaeNov 28, 2024
@gryczjgryczj requested a review fromiennaeNovember 28, 2024 09:08
@gryczjgryczjforce-pushed thetpu_queued_resources_startup_script branch 3 times, most recently from1a62542 to7362b9dCompareDecember 3, 2024 08:27
@gryczjgryczj requested a review froma team as acode ownerDecember 3, 2024 08:27
const networkName = 'compute-tpu-network';

// The region of the network, that you want the node to connect to.
const region = 'europe-west4';
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as in another PR, this value can be just taken from the zone value. No need to explicitly define.

gryczj reacted with thumbs up emoji
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

@gryczjgryczjforce-pushed thetpu_queued_resources_startup_script branch from7362b9d to9f48401CompareDecember 3, 2024 16:53
@gryczjgryczjforce-pushed thetpu_queued_resources_startup_script branch from9f48401 toa9ee1f7CompareDecember 4, 2024 13:57
@BigBlackWolfBigBlackWolf self-requested a reviewDecember 5, 2024 11:54
@BigBlackWolf
Copy link

Hi@iennae, could you please take a look once again on this PR?

cc:@rsamborski

@m-strzelczyk
Copy link
Contributor

The users that are currently failing CLA had CLA signed at the time they were committing the changes. Please force-merge the PR.

@glasnt
Copy link
Contributor

@glasnt
Copy link
Contributor

@m-strzelczyk Can you please re-review? Your previous review appears to not be valid any more.

@glasntglasnt added the waiting-for-responseWaiting for the author's response. labelAug 25, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@iennaeiennaeAwaiting requested review from iennae

@m-strzelczykm-strzelczykAwaiting requested review from m-strzelczyk

@BigBlackWolfBigBlackWolfAwaiting requested review from BigBlackWolf

1 more reviewer

@code-review-assist-experimentalcode-review-assist-experimental[bot]code-review-assist-experimental[bot] left review comments

Reviewers whose approvals may not affect merge requirements

At least 1 approving review is required to merge this pull request.

Assignees

@m-strzelczykm-strzelczyk

Labels

api: tpuIssues related to the Cloud TPU API.api: workflowsIssues related to the Workflows API.kokoro:force-runAdd this label to force Kokoro to re-run the tests.kokoro:runAdd this label to force Kokoro to re-run the tests.samplesIssues that are directly related to samples.waiting-for-responseWaiting for the author's response.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@gryczj@iennae@BigBlackWolf@m-strzelczyk@glasnt

[8]ページ先頭

©2009-2025 Movatter.jp