-
Notifications
You must be signed in to change notification settings - Fork 2k
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
feat: tpu_queued_resources_create/delete_force/delete/get/list #3904
base: main
Are you sure you want to change the base?
Conversation
b42ccd0
to
0daddad
Compare
0daddad
to
21186ec
Compare
Here is the summary of changes. You are about to add 5 region tags.
This comment is generated by snippet-bot.
|
e4bd32f
to
8c8311e
Compare
bf9a4ae
to
bf5bab3
Compare
a1b33bf
to
6b9e446
Compare
1d7253d
to
39771e6
Compare
tpu/test/queuedResource.test.js
Outdated
const tpuClient = new TpuClient(); | ||
const projectId = await tpuClient.getProjectId(); | ||
|
||
// Give a time to start process of creating TPU Node |
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.
creating can take even 5min, that's why I put 1min timeouts between calls
309f877
to
44661fc
Compare
60b5741
to
d8f364b
Compare
Due to high costs of TPU Nodes, it was decided to use mocks in the tests. |
071d90f
to
3458b9a
Compare
dbaecb6
to
5875a3c
Compare
5875a3c
to
ce8761b
Compare
// The name of the network you want the node to connect to. The network should be assigned to your project. | ||
const networkName = 'compute-tpu-network'; | ||
|
||
// The region of the network, that you want the node to connect to. |
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.
Networks aren't assigned to regions. Subnetworks are. Does this value actually indicates the region the VM will be created in? (that would also indicate what subnetwork can be used)
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.
as far as I remember, we are able to create VM in different region than subnetwork region.
// The zone in which to create the node. | ||
// For more information about supported TPU types for specific zones, | ||
// see https://cloud.google.com/tpu/docs/regions-zones | ||
const zone = 'europe-west4-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.
We can deduct the region from the zone, so we don't have to explicitly define the region
const above.
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.
For the samples that are created can the region that is shown be the same across languages? I noticed that the Node.js versions seem to go with europe and the ones in Java are central. https://github.com/GoogleCloudPlatform/java-docs-samples/blob/fd43b65a0c1fc21d0fdbfac0f7ec3c5e89873b80/tpu/src/main/java/tpu/CreateQueuedResource.java#L39 as an example.
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.
@m-strzelczyk, @iennae- requested changes implemented
ce8761b
to
33abf35
Compare
33abf35
to
1a65640
Compare
Hi @iennae, could you please take a look once again on this PR? cc: @rsamborski |
Description
Fixes #
Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.
Checklist
npm test
(see Testing)npm run lint
(see Style)GoogleCloudPlatform/nodejs-docs-samples
. Not a fork.