-
Notifications
You must be signed in to change notification settings - Fork 9
Add README for shared_pathways_service #129
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
Merged
Merged
Changes from 2 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
7848aef
Add README for shared_pathways_service
guptaaka 5cf1186
Add that connect block deploys a proxy pod
guptaaka b669b65
fix comment
guptaaka c3da4af
Resolving commments in shared_pathways_service/README.md
guptaaka ac233ca
Fix instructions in Readme
guptaaka bc0c8b5
Open hyperlink in a new tab
guptaaka File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
54 changes: 54 additions & 0 deletions
54
pathwaysutils/experimental/shared_pathways_service/README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| # Shared Pathways Service | ||
|
|
||
| Shared pathways service is a multi-tenant Pathways cluster with dedicated TPU | ||
| resources. This eliminates the need for complex cloud setup, allowing you to | ||
| get started from a familiar local environment (like a laptop or cloud VM) with | ||
| minimal overhead: Just wrap your Python entrypoint in a | ||
guptaaka marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| `with isc_pathways.connect():` block!. | ||
|
|
||
| ## Requirements | ||
|
|
||
| Make sure that your cluster is running the Resource Manager and Worker pods. | ||
guptaaka marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| If not, you can use [pw-service-example.yaml](yamls/pw-service-example.yaml). | ||
| Make sure to modify the following values to deploy these pods: | ||
|
|
||
| - A unique Jobset name for the cluster's Pathways pods | ||
| - GCS bucket path | ||
| - TPU type and topology | ||
| - Number of slices | ||
|
|
||
| These fields are highlighted in the YAML file with trailing comments for easier | ||
| understanding. | ||
|
|
||
| ## Instructions | ||
|
|
||
| 1. Clone `pathwaysutils`. | ||
|
|
||
| `git clone https://github.com/AI-Hypercomputer/pathways-utils.git` | ||
|
|
||
| 2. Import `isc_pathways.py` and move your workload under | ||
guptaaka marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| `with isc_pathways.connect()` statement. Refer to | ||
| [run_connect_example.py](run_connect_example.py) for reference. Example code: | ||
|
|
||
| ``` | ||
| from pathwaysutils.experimental.shared_pathways_service import isc_pathways | ||
|
|
||
| with isc_pathways.connect( | ||
| "my-cluster", | ||
| "my-project", | ||
| "region", | ||
| "gs://user-bucket", | ||
| "pathways-cluster-pathways-head-0-0.pathways-cluster:29001", | ||
| {"tpuv6e:2x2": 2}, | ||
| ) as tm: | ||
| import jax.numpy as jnp | ||
| import pathwaysutils | ||
| import pprint | ||
|
|
||
| pathwaysutils.initialize() | ||
| orig_matrix = jnp.zeros(5) | ||
| ... | ||
| ``` | ||
|
|
||
| The connect block will deploy a proxy pod to your GKE cluster and connect your local runtime environment to the proxy | ||
guptaaka marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| pod via port-forwarding. | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.