Python SDK for anycloud — submit jobs, run workloads on any cloud
Project description
anycloud Python SDK
Submit jobs, run workloads on any cloud.
Install
pip install anycloud-sdk
For the latest pre-release version:
pip install --pre anycloud-sdk
Quick start
import anycloud
ac = anycloud.Client()
job = ac.submit("my-training:latest", gpu="h100:8", env={"LR": "0.01"})
job.wait()
print(job.logs())
Chaining jobs
prep = ac.submit("prep:latest")
prep.wait()
train = ac.submit("train:latest", gpu="h100:8", env={"LR": "0.01"})
train.wait()
eval_job = ac.submit("eval:latest")
eval_job.wait()
Fan-out / fan-in
from anycloud import Submission
split = ac.submit("split:latest")
split.wait()
shards = ac.submit_many([
Submission(image="worker:latest", env={"LR": lr})
for lr in ["0.1", "0.01", "0.001"]
])
shards.wait()
merge = ac.submit("merge:latest")
merge.wait()
Decorator (run a Python function remotely)
Skip the image-build loop — decorate a function, and AnyCloud clones your repo on the remote VM:
@anycloud.function(image="ghcr.io/acme/trainer:latest", gpu="h100:8")
def train(lr: float):
...
jobs = train.map([0.1, 0.01, 0.001]) # fan out across args
jobs.wait()
Requires your code in a git repo (committed + pushed) and git installed in the image. See reference.
Buckets
Chain data between jobs using bucket handles. Output buckets are auto-created by the server; upload() auto-creates input buckets.
data = ac.bucket("training-data")
model = ac.bucket("model-output")
data.upload("~/datasets/imagenet") # auto-creates bucket
prep = ac.submit("prep:latest", input=data, output=model)
prep.wait()
train = ac.submit("train:latest", input=model, output=model, gpu="h100:8")
train.wait()
model.download("~/checkpoints/")
Install with the cloud extra for your provider: pip install anycloud-sdk[aws] (or [gcp], [azure], [all]).
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
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
File details
Details for the file anycloud_sdk-0.1.10.tar.gz.
File metadata
- Download URL: anycloud_sdk-0.1.10.tar.gz
- Upload date:
- Size: 41.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b6c98aea8571d0aabace36e324a274028e5bce2a718831487c5dcf1f18ea410
|
|
| MD5 |
711ff37cb5701ada9fcda8dc3610363a
|
|
| BLAKE2b-256 |
01939b1ad46e86b7f3771d35dd09418cc51c78118f9bbf83243badd076b4e869
|
Provenance
The following attestation bundles were made for anycloud_sdk-0.1.10.tar.gz:
Publisher:
promote.yml on anycloud-sh/anycloud
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
anycloud_sdk-0.1.10.tar.gz -
Subject digest:
5b6c98aea8571d0aabace36e324a274028e5bce2a718831487c5dcf1f18ea410 - Sigstore transparency entry: 1392791445
- Sigstore integration time:
-
Permalink:
anycloud-sh/anycloud@99957bcd56cb83a2c4db569bc6b2502784fc6afe -
Branch / Tag:
refs/heads/main - Owner: https://github.com/anycloud-sh
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
promote.yml@99957bcd56cb83a2c4db569bc6b2502784fc6afe -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file anycloud_sdk-0.1.10-py3-none-any.whl.
File metadata
- Download URL: anycloud_sdk-0.1.10-py3-none-any.whl
- Upload date:
- Size: 33.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f63975ffd7752feb2f2bc831b2c53f2b794592ecb80c31c884a92093b5dc4984
|
|
| MD5 |
9bb15b42da6fb33ae074aacfcb14418d
|
|
| BLAKE2b-256 |
bf0fb2a293514f387ca38254b81c18df55ad48f86f51262e040a0d7d38d1e832
|
Provenance
The following attestation bundles were made for anycloud_sdk-0.1.10-py3-none-any.whl:
Publisher:
promote.yml on anycloud-sh/anycloud
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
anycloud_sdk-0.1.10-py3-none-any.whl -
Subject digest:
f63975ffd7752feb2f2bc831b2c53f2b794592ecb80c31c884a92093b5dc4984 - Sigstore transparency entry: 1392791459
- Sigstore integration time:
-
Permalink:
anycloud-sh/anycloud@99957bcd56cb83a2c4db569bc6b2502784fc6afe -
Branch / Tag:
refs/heads/main - Owner: https://github.com/anycloud-sh
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
promote.yml@99957bcd56cb83a2c4db569bc6b2502784fc6afe -
Trigger Event:
workflow_dispatch
-
Statement type: