anycloud-sdk 0.1.3rc1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,7 @@
1
+ .venv/
2
+ __pycache__/
3
+ *.pyc
4
+ *.egg-info/
5
+ dist/
6
+ build/
7
+ .pytest_cache/
@@ -0,0 +1,102 @@
1
+ Metadata-Version: 2.4
2
+ Name: anycloud-sdk
3
+ Version: 0.1.3rc1
4
+ Summary: Python SDK for anycloud — submit jobs, run workloads on any cloud
5
+ License-Expression: MIT
6
+ Requires-Python: >=3.10
7
+ Requires-Dist: httpx>=0.27
8
+ Requires-Dist: pydantic>=2.0
9
+ Provides-Extra: all
10
+ Requires-Dist: adlfs>=2024.0; extra == 'all'
11
+ Requires-Dist: gcsfs>=2024.0; extra == 'all'
12
+ Requires-Dist: s3fs>=2024.0; extra == 'all'
13
+ Provides-Extra: aws
14
+ Requires-Dist: s3fs>=2024.0; extra == 'aws'
15
+ Provides-Extra: azure
16
+ Requires-Dist: adlfs>=2024.0; extra == 'azure'
17
+ Provides-Extra: dev
18
+ Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
19
+ Requires-Dist: pytest>=8.0; extra == 'dev'
20
+ Requires-Dist: respx>=0.21; extra == 'dev'
21
+ Provides-Extra: gcp
22
+ Requires-Dist: gcsfs>=2024.0; extra == 'gcp'
23
+ Provides-Extra: mcp
24
+ Requires-Dist: mcp>=1.0; extra == 'mcp'
25
+ Description-Content-Type: text/markdown
26
+
27
+ # anycloud Python SDK
28
+
29
+ Submit jobs, run workloads on any cloud.
30
+
31
+ ## Install
32
+
33
+ ```bash
34
+ pip install anycloud-sdk
35
+ ```
36
+
37
+ For the latest pre-release version:
38
+
39
+ ```bash
40
+ pip install --pre anycloud-sdk
41
+ ```
42
+
43
+ ## Quick start
44
+
45
+ ```python
46
+ import anycloud
47
+
48
+ ac = anycloud.Client()
49
+
50
+ job = ac.submit("my-training:latest", gpu="h100:8", env={"LR": "0.01"})
51
+ job.wait()
52
+ print(job.logs())
53
+ ```
54
+
55
+ ## Chaining jobs
56
+
57
+ ```python
58
+ prep = ac.submit("prep:latest")
59
+ prep.wait()
60
+
61
+ train = ac.submit("train:latest", gpu="h100:8", env={"LR": "0.01"})
62
+ train.wait()
63
+
64
+ eval_job = ac.submit("eval:latest")
65
+ eval_job.wait()
66
+ ```
67
+
68
+ ## Fan-out / fan-in
69
+
70
+ ```python
71
+ from anycloud import JobGroup
72
+
73
+ split = ac.submit("split:latest")
74
+ split.wait()
75
+
76
+ shards = JobGroup([ac.submit("worker:latest", env={"LR": lr}) for lr in ["0.1", "0.01", "0.001"]])
77
+ shards.wait_all()
78
+
79
+ merge = ac.submit("merge:latest")
80
+ merge.wait()
81
+ ```
82
+
83
+ ## Buckets
84
+
85
+ Chain data between jobs using bucket handles. Output buckets are auto-created by the server; `upload()` auto-creates input buckets.
86
+
87
+ ```python
88
+ data = ac.bucket("training-data")
89
+ model = ac.bucket("model-output")
90
+
91
+ data.upload("~/datasets/imagenet") # auto-creates bucket
92
+
93
+ prep = ac.submit("prep:latest", input=data, output=model)
94
+ prep.wait()
95
+
96
+ train = ac.submit("train:latest", input=model, output=model, gpu="h100:8")
97
+ train.wait()
98
+
99
+ model.download("~/checkpoints/")
100
+ ```
101
+
102
+ Install with the cloud extra for your provider: `pip install anycloud-sdk[aws]` (or `[gcp]`, `[azure]`, `[all]`).
@@ -0,0 +1,76 @@
1
+ # anycloud Python SDK
2
+
3
+ Submit jobs, run workloads on any cloud.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ pip install anycloud-sdk
9
+ ```
10
+
11
+ For the latest pre-release version:
12
+
13
+ ```bash
14
+ pip install --pre anycloud-sdk
15
+ ```
16
+
17
+ ## Quick start
18
+
19
+ ```python
20
+ import anycloud
21
+
22
+ ac = anycloud.Client()
23
+
24
+ job = ac.submit("my-training:latest", gpu="h100:8", env={"LR": "0.01"})
25
+ job.wait()
26
+ print(job.logs())
27
+ ```
28
+
29
+ ## Chaining jobs
30
+
31
+ ```python
32
+ prep = ac.submit("prep:latest")
33
+ prep.wait()
34
+
35
+ train = ac.submit("train:latest", gpu="h100:8", env={"LR": "0.01"})
36
+ train.wait()
37
+
38
+ eval_job = ac.submit("eval:latest")
39
+ eval_job.wait()
40
+ ```
41
+
42
+ ## Fan-out / fan-in
43
+
44
+ ```python
45
+ from anycloud import JobGroup
46
+
47
+ split = ac.submit("split:latest")
48
+ split.wait()
49
+
50
+ shards = JobGroup([ac.submit("worker:latest", env={"LR": lr}) for lr in ["0.1", "0.01", "0.001"]])
51
+ shards.wait_all()
52
+
53
+ merge = ac.submit("merge:latest")
54
+ merge.wait()
55
+ ```
56
+
57
+ ## Buckets
58
+
59
+ Chain data between jobs using bucket handles. Output buckets are auto-created by the server; `upload()` auto-creates input buckets.
60
+
61
+ ```python
62
+ data = ac.bucket("training-data")
63
+ model = ac.bucket("model-output")
64
+
65
+ data.upload("~/datasets/imagenet") # auto-creates bucket
66
+
67
+ prep = ac.submit("prep:latest", input=data, output=model)
68
+ prep.wait()
69
+
70
+ train = ac.submit("train:latest", input=model, output=model, gpu="h100:8")
71
+ train.wait()
72
+
73
+ model.download("~/checkpoints/")
74
+ ```
75
+
76
+ Install with the cloud extra for your provider: `pip install anycloud-sdk[aws]` (or `[gcp]`, `[azure]`, `[all]`).
@@ -0,0 +1,56 @@
1
+ """anycloud Python SDK — submit jobs, run workloads on any cloud."""
2
+
3
+ from anycloud.client import Client
4
+ from anycloud.function import Function, function
5
+ from anycloud.image import Image
6
+ from anycloud.errors import (
7
+ AnyCloudError,
8
+ APIError,
9
+ ConflictError,
10
+ JobFailedError,
11
+ JobGroupError,
12
+ NotFoundError,
13
+ TimeoutError,
14
+ )
15
+ from anycloud.job import Job
16
+ from anycloud.job_group import JobGroup
17
+ from anycloud.storage import Bucket
18
+ from anycloud.types import (
19
+ AWSCredentials,
20
+ AzureCredentials,
21
+ CloudConfig,
22
+ CloudType,
23
+ Deployment,
24
+ DeploymentState,
25
+ DockerOptions,
26
+ GCPCredentials,
27
+ LambdaCredentials,
28
+ )
29
+
30
+ __all__ = [
31
+ "Client",
32
+ "function",
33
+ "Function",
34
+ "Image",
35
+ "Job",
36
+ "JobGroup",
37
+ "Bucket",
38
+ # Types
39
+ "CloudConfig",
40
+ "CloudType",
41
+ "Deployment",
42
+ "DeploymentState",
43
+ "DockerOptions",
44
+ "AWSCredentials",
45
+ "GCPCredentials",
46
+ "AzureCredentials",
47
+ "LambdaCredentials",
48
+ # Errors
49
+ "AnyCloudError",
50
+ "APIError",
51
+ "ConflictError",
52
+ "JobFailedError",
53
+ "JobGroupError",
54
+ "NotFoundError",
55
+ "TimeoutError",
56
+ ]
@@ -0,0 +1,6 @@
1
+ {
2
+ "AWS": { "vmType": "c5.xlarge", "region": "us-east-1" },
3
+ "GCP": { "vmType": "n2-standard-4", "region": "us-east4" },
4
+ "Azure": { "vmType": "Standard_D4s_v3", "region": "eastus" },
5
+ "Lambda": { "vmType": "cpu_4x_general", "region": "us-east-1" }
6
+ }