Python SDK for Yarn — sovereign GPU compute for Australian researchers
Project description
Yarn SDK
Python SDK for Yarn -- sovereign GPU compute for Australian researchers.
Install
pip install yarn-sdk
Quick Start
import yarn
client = yarn.Client(
api_key="yarn_...", # from Account Portal -> API Keys
base_url="https://api.yarn.prosodylabs.com.au",
)
# Submit a training job (single file)
job = client.jobs.submit(
"my-experiment",
script="train.py",
gpu_count=1,
pip_packages=["torch", "wandb"],
)
# Submit a multi-file project
job = client.jobs.submit(
"kairos-phase1",
directory="./my_project/", # bundles all .py, .yaml, .json, etc.
pip_packages=["torch", "wandb"],
)
# Wait for results
result = client.jobs.wait(job["job_id"])
# Stream logs
for line in client.jobs.stream_logs(job["job_id"]):
print(line)
Interactive Sessions
with client.sessions.session("my-session", gpu_count=1) as session:
print(session.ray_address) # Connect Ray client
print(session.dashboard_url)
Features
- Jobs: Submit training code, poll status, stream logs, retrieve results
- Sessions: Interactive GPU sessions with Ray
- Notebooks: JupyterLab workloads
- Storage: Upload/download datasets and checkpoints
- Billing: Check credit balance, view usage
- Secrets: Manage API keys and tokens for training jobs
- Chat: SSE streaming inference
Authentication
Get an API key from the Account Portal at account.yarn.prosodylabs.com.au -> API Keys.
client = yarn.Client(api_key="yarn_...")
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
yarn_sdk-0.1.0.tar.gz
(9.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
yarn_sdk-0.1.0-py3-none-any.whl
(13.8 kB
view details)
File details
Details for the file yarn_sdk-0.1.0.tar.gz.
File metadata
- Download URL: yarn_sdk-0.1.0.tar.gz
- Upload date:
- Size: 9.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a8ba7efb34a07379f012f28627146233fc116b4742f8c985ef686e46252431d6
|
|
| MD5 |
fc68ff9eb3d644c361a874bb190a7bdf
|
|
| BLAKE2b-256 |
56da9b45df29f5e6eb78a86f9230cf1d5c087726b66ee7a468adc4c289309a7b
|
File details
Details for the file yarn_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: yarn_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 13.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9eddf341f23bbfda9b321d0965c0847470a06d93b62fc85db49764376f2996fe
|
|
| MD5 |
1a46a77f200ed50c65cb809beaa46d69
|
|
| BLAKE2b-256 |
95aa9bd7c4063a51fc86dac7bd5bd94d6dbcfa29e3b9f49141f3e13dc2ef53bb
|