Conversation
|
The documentation is not available anymore as the PR was closed or merged. |
pacman100
left a comment
There was a problem hiding this comment.
Thank you for making it easier to configure TPU pods 🤗. Just a nit and a comment, LGTM!
| args.accelerate_version = f"accelerate=={args.accelerate_version}" | ||
|
|
||
| if not args.command_file and not args.command: | ||
| raise ValueError("You must specify either a command file or a command to run on the pod.") |
There was a problem hiding this comment.
We can allow for mix and match by appending commands from the args.command_file to the args.command? Would it be better than raising error?
There was a problem hiding this comment.
With only allowing one vs the other it keeps the API simplistic, as otherwise we then have to worry about when in the order should the command come from in the CLI vs the bash script and that can be confusing to users. However in this particular case the check is just to ensure that you've passed some command to run in :)
There was a problem hiding this comment.
We can keep this idea open though and if users want that we can enable it
Co-authored-by: Sourab Mangrulkar <13534540+pacman100@users.noreply.github.com>
sgugger
left a comment
There was a problem hiding this comment.
Nice work, thanks a lot for spearheading this!
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
Introduce a pod-config command to setup TPU pods
What does this add?
This PR introduces a new command
accelerate pod-configwhich will first ask the user for commands they wish to run across all TPU nodes in a GCP TPU cluster, before then running all of them in along with installingaccelerateif specifiedWho is it for?
Part of #501
Why is it needed?
When dealing with TPU pods, they need to have initial configurations across all of their processes with all the main data being available there and initial setups. This provides an easy tool to do so without having the user need to enter their own startup script, and can be run at any point in time.
What parts of the API does this impact?
User-facing:
Adds a new
accelerate pod-configcommand which can accept both a bash script of commands to run at once, or an unlimited amount of regular commands passed inInternal structure:
Configs now store both types of commands and users are prompted for these during
accelerate configBasic Usage Example(s):
With an old
accelerateconfig file:With a new one fully configured:
To install Accelerate in the new environment on all processes: