-
Notifications
You must be signed in to change notification settings - Fork 6.7k
feat: TPU *Create / *get / *create_with_script / *delete Samples #12690
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
Conversation
|
Here is the summary of changes. You are about to add 4 region tags.
This comment is generated by snippet-bot.
|
m-strzelczyk
left a comment
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.
Looks good!
I forgot to tell you all, TPUs are a separate product from Compute (politics....). So please move the whole tpu folder, a level higher to the repository root.
You'll need to update CODEOWNERS file and .github/blunderbuss.yml file. Just copy the setting of compute for tpu.
I've moved the TPU folder to the root of the repository. I updated the |
tpu/create_tpu_with_script.py
Outdated
| # [START tpu_vm_create_startup_script] | ||
| # This startup script updates numpy to the latest version and logs the output to a file. | ||
| metadata = { | ||
| "startup-script": """#!/bin/bash | ||
| echo "Hello World" > /var/log/hello.log | ||
| sudo pip3 install --upgrade numpy >> /var/log/hello.log 2>&1 | ||
| """ | ||
| } | ||
| node = tpu_v2.Node() | ||
| # Adding metadata with startup script to the TPU node. | ||
| node.metadata = metadata | ||
| # Enabling external IPs for internet access from the TPU node. | ||
| node.network_config = tpu_v2.NetworkConfig(enable_external_ips=True) | ||
|
|
||
| # [END tpu_vm_create_startup_script] |
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.
Maybe make this region tag span the whole node creation code. The gcloud example in docs is a full gcloud command, so we should have a full creation script as well IMO.
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.
I changed it to provide users with a full example of creating TPU with the startup script 👍
…gleCloudPlatform#12690) * Added create /get / delete / create_startup_script TPU Samples with tests and NOX configuration * Update CODEOWNERS and blunderbuss.yml
Description
Created new Samples for TPU. Create, Get, Delete operations.
Also added Sample for creating TPU with Startup Script
Doc page -> here
tpu_vm_create/tpu/create_tpu.pytpu_vm_get/tpu/get_tpu.pytpu_vm_delete/tpu/delete_tpu.pytpu_vm_create_startup_script/tpu/create_tpu_with_script.pyChecklist
nox -s py-3.9(see Test Environment Setup)nox -s lint(see Test Environment Setup)