Pathways-on-Cloud Utilities

0.1.7 · active · verified Wed Apr 15

Pathwaysutils is a Python package providing essential utilities and tools to streamline the deployment and execution of JAX workloads on the Pathways on Cloud architecture. It simplifies large-scale machine learning computations across multiple TPU slices by handling cloud-specific adaptations. Pathways is used internally at Google for models like Gemini, and this package brings similar benefits to Google Cloud customers. The current version is 0.1.7, and it is actively developed with releases tightly coupled to JAX versions.

Warnings

Install

Imports

Quickstart

The quickstart demonstrates the essential initialization step for using pathwaysutils. It configures JAX to leverage the Pathways on Cloud infrastructure, allowing JAX applications to orchestrate workloads across distributed TPU slices. Note that Pathways on Cloud is in Preview and requires prior access.

import pathwaysutils
import jax

# Pathways on Cloud is currently in Preview and requires access.
# Ensure your environment variables are correctly configured for Pathways on Cloud.
# Example: os.environ['JAX_PLATFORMS'] = 'proxy'

# Initialize pathwaysutils to configure the JAX backend for Pathways on Cloud.
# This also registers a custom ArrayHandler for checkpointing and disables JAX's compilation cache.
pathwaysutils.initialize()

# Verify JAX devices are accessible through the Pathways backend
print(f"JAX devices available via Pathways: {jax.devices()}")

# Further JAX workload execution would follow here.

view raw JSON →