You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pathwaysutils/sidecar/README.md
+68-15Lines changed: 68 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -104,6 +104,8 @@ out = create_and_save_plot(dummy_device_array)
104
104
105
105
For more advanced usage (such as data loading), check out [MaxText's RemoteIterator class](https://github.com/AI-Hypercomputer/maxtext/blob/391a5a788d85cae8942334b042fdabdbd549af51/MaxText/multihost_dataloading.py#L175).
106
106
107
+
See Installation and Usage for instructions on how to use MaxText out of the box with this feature.
108
+
107
109
### Verification
108
110
109
111
To verify files were created, SSH into one of the TPU workers using the following command and check that the file was created.
@@ -120,15 +122,20 @@ Follow these steps to set up, build, and deploy your application with the Coloca
120
122
121
123
**Prerequisites**
122
124
123
-
Ensure [Docker](https://docs.docker.com/engine/install/) is installed on your system along with [gcloud](https://cloud.google.com/sdk/docs/install). Ensure you are authenticated into gcloud.
125
+
Ensure [Docker](https://docs.docker.com/engine/install/) is installed on your system along with [gcloud](https://cloud.google.com/sdk/docs/install). Ensure you are authenticated into gcloud and Docker is configured for your region. For Google Artifact Registry, you typically run a command like this (replace `REGION` with the region of your repository, e.g., `us-east5`):
docker tag ${LOCAL_IMAGE_NAME}${EXPORTED_IMAGE_LOCATION}
175
+
docker push ${EXPORTED_IMAGE_LOCATION}
176
+
177
+
# Delete the local image as it's no longer needed.
178
+
docker image rm ${LOCAL_IMAGE_NAME}
158
179
```
159
180
160
181
**4. Update Deployment Configuration**
161
182
183
+
***Simple Example***
184
+
162
185
Modify your Kubernetes deployment YAML file to use your colocated python sidecar image. This assumes you are using the [pathways-job](https://github.com/google/pathways-job) api.
163
186
164
-
For example.
187
+
For example, if using 2 v4-16 TPUs, use the following yaml. This example is modified from [pathways-job](https://github.com/google/pathways-job/blob/main/config/samples/colocated_python_example_pathwaysjob.yaml).
For a full sample Yaml, please refer to [pathways-job](https://github.com/google/pathways-job/blob/main/config/samples/colocated_python_example_pathwaysjob.yaml).
177
-
178
-
**5. (Optional) Turn on Data Loading Optimization in MaxText**
231
+
***MaxText Reference Example***
179
232
180
233
If using MaxText, to turn on the data loading optimization that uses Colocated Python feature.
181
234
182
235
```python
183
-
colocated_python_data_input=True
236
+
colocated_python_data_input=True
184
237
```
185
238
186
-
**6. Deploy the Application**
239
+
**5. Deploy the Application**
187
240
188
241
Apply the updated deployment configuration to your Kubernetes cluster:
189
242
@@ -197,5 +250,5 @@ This will create the necessary pods with your application, pathways head, and th
197
250
198
251
**User Dependency Conflicts**
199
252
200
-
Colocated Python relies on specific internal dependencies, including JAX. Refer to the provided `server_requirements.txt` for the complete list of required dependencies. Using a different dependency version than the one provided in `server_requirements.txt` will cause the remote Python image build to fail.
253
+
Colocated Python relies on specific internal dependencies, including JAX. Refer to the provided `server_requirements.txt` for the complete list of required dependencies. Using a different dependency version than the one provided in `server_requirements.txt` will cause the Colocated Python image build to fail.
0 commit comments