together 2.0.0a15__py3-none-any.whl → 2.0.0a16__py3-none-any.whl
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.
- together/_base_client.py +134 -11
- together/_client.py +7 -0
- together/_models.py +16 -1
- together/_types.py +9 -0
- together/_version.py +1 -1
- together/constants.py +1 -1
- together/error.py +1 -2
- together/lib/_google_colab.py +39 -0
- together/lib/cli/__init__.py +73 -0
- together/lib/cli/api/beta/clusters/__init__.py +47 -0
- together/lib/cli/api/beta/{clusters.py → clusters/create.py} +5 -179
- together/lib/cli/api/beta/clusters/delete.py +35 -0
- together/lib/cli/api/beta/clusters/get_credentials.py +151 -0
- together/lib/cli/api/beta/clusters/list.py +24 -0
- together/lib/cli/api/beta/clusters/list_regions.py +37 -0
- together/lib/cli/api/beta/clusters/retrieve.py +31 -0
- together/lib/cli/api/beta/clusters/storage/__init__.py +19 -0
- together/lib/cli/api/beta/clusters/storage/create.py +49 -0
- together/lib/cli/api/beta/clusters/storage/delete.py +38 -0
- together/lib/cli/api/beta/clusters/storage/list.py +42 -0
- together/lib/cli/api/beta/clusters/storage/retrieve.py +34 -0
- together/lib/cli/api/beta/clusters/update.py +54 -0
- together/lib/cli/api/endpoints/__init__.py +56 -0
- together/lib/cli/api/endpoints/availability_zones.py +26 -0
- together/lib/cli/api/endpoints/create.py +159 -0
- together/lib/cli/api/endpoints/delete.py +15 -0
- together/lib/cli/api/endpoints/hardware.py +40 -0
- together/lib/cli/api/endpoints/list.py +66 -0
- together/lib/cli/api/endpoints/retrieve.py +23 -0
- together/lib/cli/api/endpoints/start.py +25 -0
- together/lib/cli/api/endpoints/stop.py +25 -0
- together/lib/cli/api/endpoints/update.py +77 -0
- together/lib/cli/api/evals/__init__.py +19 -0
- together/lib/cli/api/{evals.py → evals/create.py} +6 -129
- together/lib/cli/api/evals/list.py +58 -0
- together/lib/cli/api/evals/retrieve.py +21 -0
- together/lib/cli/api/evals/status.py +20 -0
- together/lib/cli/api/files/__init__.py +23 -0
- together/lib/cli/api/files/check.py +21 -0
- together/lib/cli/api/files/delete.py +20 -0
- together/lib/cli/api/files/list.py +34 -0
- together/lib/cli/api/files/retrieve.py +20 -0
- together/lib/cli/api/files/retrieve_content.py +25 -0
- together/lib/cli/api/files/upload.py +38 -0
- together/lib/cli/api/fine_tuning/__init__.py +27 -0
- together/lib/cli/api/fine_tuning/cancel.py +28 -0
- together/lib/cli/api/{fine_tuning.py → fine_tuning/create.py} +5 -257
- together/lib/cli/api/fine_tuning/delete.py +29 -0
- together/lib/cli/api/fine_tuning/download.py +94 -0
- together/lib/cli/api/fine_tuning/list.py +44 -0
- together/lib/cli/api/fine_tuning/list_checkpoints.py +42 -0
- together/lib/cli/api/fine_tuning/list_events.py +35 -0
- together/lib/cli/api/fine_tuning/retrieve.py +27 -0
- together/lib/cli/api/models/__init__.py +15 -0
- together/lib/cli/api/models/list.py +51 -0
- together/lib/cli/api/{models.py → models/upload.py} +4 -51
- together/resources/beta/clusters/clusters.py +36 -28
- together/resources/beta/clusters/storage.py +30 -21
- together/types/__init__.py +4 -3
- together/types/beta/__init__.py +0 -2
- together/types/beta/cluster_create_params.py +3 -3
- together/types/beta/clusters/__init__.py +0 -1
- together/types/beta/clusters/cluster_storage.py +4 -0
- together/types/chat_completions.py +1 -1
- together/types/endpoints.py +1 -1
- {together-2.0.0a15.dist-info → together-2.0.0a16.dist-info}/METADATA +4 -2
- {together-2.0.0a15.dist-info → together-2.0.0a16.dist-info}/RECORD +72 -36
- together-2.0.0a16.dist-info/entry_points.txt +2 -0
- together/lib/cli/api/__init__.py +0 -0
- together/lib/cli/api/beta/clusters_storage.py +0 -152
- together/lib/cli/api/endpoints.py +0 -467
- together/lib/cli/api/files.py +0 -133
- together/lib/cli/cli.py +0 -73
- together/types/beta/cluster_create_response.py +0 -9
- together/types/beta/cluster_update_response.py +0 -9
- together/types/beta/clusters/storage_create_response.py +0 -9
- together-2.0.0a15.dist-info/entry_points.txt +0 -2
- /together/lib/cli/api/{utils.py → _utils.py} +0 -0
- /together/lib/cli/api/beta/{beta.py → __init__.py} +0 -0
- {together-2.0.0a15.dist-info → together-2.0.0a16.dist-info}/WHEEL +0 -0
- {together-2.0.0a15.dist-info → together-2.0.0a16.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,63 +1,15 @@
|
|
|
1
1
|
import json as json_lib
|
|
2
|
-
from typing import
|
|
2
|
+
from typing import Literal, Optional
|
|
3
3
|
|
|
4
4
|
import click
|
|
5
|
-
from tabulate import tabulate
|
|
6
5
|
|
|
7
6
|
from together import Together, omit
|
|
8
|
-
from together._models import BaseModel
|
|
9
7
|
from together._response import APIResponse as APIResponse
|
|
8
|
+
from together.lib.cli.api._utils import handle_api_errors
|
|
10
9
|
from together.types.model_upload_response import ModelUploadResponse
|
|
11
10
|
|
|
12
11
|
|
|
13
|
-
@click.
|
|
14
|
-
@click.pass_context
|
|
15
|
-
def models(ctx: click.Context) -> None:
|
|
16
|
-
"""Models API commands"""
|
|
17
|
-
pass
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
@models.command()
|
|
21
|
-
@click.option(
|
|
22
|
-
"--type",
|
|
23
|
-
type=click.Choice(["dedicated"]),
|
|
24
|
-
help="Filter models by type (dedicated: models that can be deployed as dedicated endpoints)",
|
|
25
|
-
)
|
|
26
|
-
@click.option(
|
|
27
|
-
"--json",
|
|
28
|
-
is_flag=True,
|
|
29
|
-
help="Output in JSON format",
|
|
30
|
-
)
|
|
31
|
-
@click.pass_context
|
|
32
|
-
def list(ctx: click.Context, type: Optional[str], json: bool) -> None:
|
|
33
|
-
"""List models"""
|
|
34
|
-
client: Together = ctx.obj
|
|
35
|
-
|
|
36
|
-
models_list = client.models.list(dedicated=type == "dedicated" if type else omit)
|
|
37
|
-
|
|
38
|
-
display_list: List[Dict[str, Any]] = []
|
|
39
|
-
model: BaseModel
|
|
40
|
-
for model in models_list:
|
|
41
|
-
display_list.append(
|
|
42
|
-
{
|
|
43
|
-
"ID": model.id,
|
|
44
|
-
"Name": model.display_name,
|
|
45
|
-
"Organization": model.organization,
|
|
46
|
-
"Type": model.type,
|
|
47
|
-
"Context Length": model.context_length,
|
|
48
|
-
"License": model.license,
|
|
49
|
-
"Input per 1M token": model.pricing.input if model.pricing else None,
|
|
50
|
-
"Output per 1M token": model.pricing.output if model.pricing else None,
|
|
51
|
-
}
|
|
52
|
-
)
|
|
53
|
-
|
|
54
|
-
if json:
|
|
55
|
-
click.echo(json_lib.dumps(display_list, indent=2))
|
|
56
|
-
else:
|
|
57
|
-
click.echo(tabulate(display_list, headers="keys", tablefmt="plain"))
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
@models.command()
|
|
12
|
+
@click.command()
|
|
61
13
|
@click.option(
|
|
62
14
|
"--model-name",
|
|
63
15
|
required=True,
|
|
@@ -96,6 +48,7 @@ def list(ctx: click.Context, type: Optional[str], json: bool) -> None:
|
|
|
96
48
|
help="Output in JSON format",
|
|
97
49
|
)
|
|
98
50
|
@click.pass_context
|
|
51
|
+
@handle_api_errors("Models")
|
|
99
52
|
def upload(
|
|
100
53
|
ctx: click.Context,
|
|
101
54
|
model_name: str,
|
|
@@ -28,9 +28,7 @@ from ....types.beta import cluster_create_params, cluster_update_params
|
|
|
28
28
|
from ...._base_client import make_request_options
|
|
29
29
|
from ....types.beta.cluster import Cluster
|
|
30
30
|
from ....types.beta.cluster_list_response import ClusterListResponse
|
|
31
|
-
from ....types.beta.cluster_create_response import ClusterCreateResponse
|
|
32
31
|
from ....types.beta.cluster_delete_response import ClusterDeleteResponse
|
|
33
|
-
from ....types.beta.cluster_update_response import ClusterUpdateResponse
|
|
34
32
|
from ....types.beta.cluster_list_regions_response import ClusterListRegionsResponse
|
|
35
33
|
|
|
36
34
|
__all__ = ["ClustersResource", "AsyncClustersResource"]
|
|
@@ -66,11 +64,11 @@ class ClustersResource(SyncAPIResource):
|
|
|
66
64
|
billing_type: Literal["RESERVED", "ON_DEMAND"],
|
|
67
65
|
cluster_name: str,
|
|
68
66
|
driver_version: Literal["CUDA_12_5_555", "CUDA_12_6_560", "CUDA_12_6_565", "CUDA_12_8_570"],
|
|
69
|
-
duration_days: int,
|
|
70
67
|
gpu_type: Literal["H100_SXM", "H200_SXM", "RTX_6000_PCI", "L40_PCIE", "B200_SXM", "H100_SXM_INF"],
|
|
71
68
|
num_gpus: int,
|
|
72
69
|
region: Literal["us-central-8", "us-central-4"],
|
|
73
70
|
cluster_type: Literal["KUBERNETES", "SLURM"] | Omit = omit,
|
|
71
|
+
duration_days: int | Omit = omit,
|
|
74
72
|
shared_volume: cluster_create_params.SharedVolume | Omit = omit,
|
|
75
73
|
volume_id: str | Omit = omit,
|
|
76
74
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
@@ -79,17 +77,20 @@ class ClustersResource(SyncAPIResource):
|
|
|
79
77
|
extra_query: Query | None = None,
|
|
80
78
|
extra_body: Body | None = None,
|
|
81
79
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
82
|
-
) ->
|
|
83
|
-
"""
|
|
84
|
-
|
|
80
|
+
) -> Cluster:
|
|
81
|
+
"""Create an Instant Cluster on Together's high-performance GPU clusters.
|
|
82
|
+
|
|
83
|
+
With
|
|
84
|
+
features like on-demand scaling, long-lived resizable high-bandwidth shared
|
|
85
|
+
DC-local storage, Kubernetes and Slurm cluster flavors, a REST API, and
|
|
86
|
+
Terraform support, you can run workloads flexibly without complex infrastructure
|
|
87
|
+
management.
|
|
85
88
|
|
|
86
89
|
Args:
|
|
87
90
|
cluster_name: Name of the GPU cluster.
|
|
88
91
|
|
|
89
92
|
driver_version: NVIDIA driver version to use in the cluster.
|
|
90
93
|
|
|
91
|
-
duration_days: Duration in days to keep the cluster running.
|
|
92
|
-
|
|
93
94
|
gpu_type: Type of GPU to use in the cluster
|
|
94
95
|
|
|
95
96
|
num_gpus: Number of GPUs to allocate in the cluster. This must be multiple of 8. For
|
|
@@ -98,6 +99,8 @@ class ClustersResource(SyncAPIResource):
|
|
|
98
99
|
region: Region to create the GPU cluster in. Valid values are us-central-8 and
|
|
99
100
|
us-central-4.
|
|
100
101
|
|
|
102
|
+
duration_days: Duration in days to keep the cluster running.
|
|
103
|
+
|
|
101
104
|
extra_headers: Send extra headers
|
|
102
105
|
|
|
103
106
|
extra_query: Add additional query parameters to the request
|
|
@@ -113,11 +116,11 @@ class ClustersResource(SyncAPIResource):
|
|
|
113
116
|
"billing_type": billing_type,
|
|
114
117
|
"cluster_name": cluster_name,
|
|
115
118
|
"driver_version": driver_version,
|
|
116
|
-
"duration_days": duration_days,
|
|
117
119
|
"gpu_type": gpu_type,
|
|
118
120
|
"num_gpus": num_gpus,
|
|
119
121
|
"region": region,
|
|
120
122
|
"cluster_type": cluster_type,
|
|
123
|
+
"duration_days": duration_days,
|
|
121
124
|
"shared_volume": shared_volume,
|
|
122
125
|
"volume_id": volume_id,
|
|
123
126
|
},
|
|
@@ -126,7 +129,7 @@ class ClustersResource(SyncAPIResource):
|
|
|
126
129
|
options=make_request_options(
|
|
127
130
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
128
131
|
),
|
|
129
|
-
cast_to=
|
|
132
|
+
cast_to=Cluster,
|
|
130
133
|
)
|
|
131
134
|
|
|
132
135
|
def retrieve(
|
|
@@ -141,7 +144,7 @@ class ClustersResource(SyncAPIResource):
|
|
|
141
144
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
142
145
|
) -> Cluster:
|
|
143
146
|
"""
|
|
144
|
-
|
|
147
|
+
Retrieve information about a specific GPU cluster.
|
|
145
148
|
|
|
146
149
|
Args:
|
|
147
150
|
extra_headers: Send extra headers
|
|
@@ -174,9 +177,9 @@ class ClustersResource(SyncAPIResource):
|
|
|
174
177
|
extra_query: Query | None = None,
|
|
175
178
|
extra_body: Body | None = None,
|
|
176
179
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
177
|
-
) ->
|
|
180
|
+
) -> Cluster:
|
|
178
181
|
"""
|
|
179
|
-
Update
|
|
182
|
+
Update the configuration of an existing GPU cluster.
|
|
180
183
|
|
|
181
184
|
Args:
|
|
182
185
|
extra_headers: Send extra headers
|
|
@@ -201,7 +204,7 @@ class ClustersResource(SyncAPIResource):
|
|
|
201
204
|
options=make_request_options(
|
|
202
205
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
203
206
|
),
|
|
204
|
-
cast_to=
|
|
207
|
+
cast_to=Cluster,
|
|
205
208
|
)
|
|
206
209
|
|
|
207
210
|
def list(
|
|
@@ -235,7 +238,7 @@ class ClustersResource(SyncAPIResource):
|
|
|
235
238
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
236
239
|
) -> ClusterDeleteResponse:
|
|
237
240
|
"""
|
|
238
|
-
Delete GPU cluster by cluster ID
|
|
241
|
+
Delete a GPU cluster by cluster ID.
|
|
239
242
|
|
|
240
243
|
Args:
|
|
241
244
|
extra_headers: Send extra headers
|
|
@@ -306,11 +309,11 @@ class AsyncClustersResource(AsyncAPIResource):
|
|
|
306
309
|
billing_type: Literal["RESERVED", "ON_DEMAND"],
|
|
307
310
|
cluster_name: str,
|
|
308
311
|
driver_version: Literal["CUDA_12_5_555", "CUDA_12_6_560", "CUDA_12_6_565", "CUDA_12_8_570"],
|
|
309
|
-
duration_days: int,
|
|
310
312
|
gpu_type: Literal["H100_SXM", "H200_SXM", "RTX_6000_PCI", "L40_PCIE", "B200_SXM", "H100_SXM_INF"],
|
|
311
313
|
num_gpus: int,
|
|
312
314
|
region: Literal["us-central-8", "us-central-4"],
|
|
313
315
|
cluster_type: Literal["KUBERNETES", "SLURM"] | Omit = omit,
|
|
316
|
+
duration_days: int | Omit = omit,
|
|
314
317
|
shared_volume: cluster_create_params.SharedVolume | Omit = omit,
|
|
315
318
|
volume_id: str | Omit = omit,
|
|
316
319
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
@@ -319,17 +322,20 @@ class AsyncClustersResource(AsyncAPIResource):
|
|
|
319
322
|
extra_query: Query | None = None,
|
|
320
323
|
extra_body: Body | None = None,
|
|
321
324
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
322
|
-
) ->
|
|
323
|
-
"""
|
|
324
|
-
|
|
325
|
+
) -> Cluster:
|
|
326
|
+
"""Create an Instant Cluster on Together's high-performance GPU clusters.
|
|
327
|
+
|
|
328
|
+
With
|
|
329
|
+
features like on-demand scaling, long-lived resizable high-bandwidth shared
|
|
330
|
+
DC-local storage, Kubernetes and Slurm cluster flavors, a REST API, and
|
|
331
|
+
Terraform support, you can run workloads flexibly without complex infrastructure
|
|
332
|
+
management.
|
|
325
333
|
|
|
326
334
|
Args:
|
|
327
335
|
cluster_name: Name of the GPU cluster.
|
|
328
336
|
|
|
329
337
|
driver_version: NVIDIA driver version to use in the cluster.
|
|
330
338
|
|
|
331
|
-
duration_days: Duration in days to keep the cluster running.
|
|
332
|
-
|
|
333
339
|
gpu_type: Type of GPU to use in the cluster
|
|
334
340
|
|
|
335
341
|
num_gpus: Number of GPUs to allocate in the cluster. This must be multiple of 8. For
|
|
@@ -338,6 +344,8 @@ class AsyncClustersResource(AsyncAPIResource):
|
|
|
338
344
|
region: Region to create the GPU cluster in. Valid values are us-central-8 and
|
|
339
345
|
us-central-4.
|
|
340
346
|
|
|
347
|
+
duration_days: Duration in days to keep the cluster running.
|
|
348
|
+
|
|
341
349
|
extra_headers: Send extra headers
|
|
342
350
|
|
|
343
351
|
extra_query: Add additional query parameters to the request
|
|
@@ -353,11 +361,11 @@ class AsyncClustersResource(AsyncAPIResource):
|
|
|
353
361
|
"billing_type": billing_type,
|
|
354
362
|
"cluster_name": cluster_name,
|
|
355
363
|
"driver_version": driver_version,
|
|
356
|
-
"duration_days": duration_days,
|
|
357
364
|
"gpu_type": gpu_type,
|
|
358
365
|
"num_gpus": num_gpus,
|
|
359
366
|
"region": region,
|
|
360
367
|
"cluster_type": cluster_type,
|
|
368
|
+
"duration_days": duration_days,
|
|
361
369
|
"shared_volume": shared_volume,
|
|
362
370
|
"volume_id": volume_id,
|
|
363
371
|
},
|
|
@@ -366,7 +374,7 @@ class AsyncClustersResource(AsyncAPIResource):
|
|
|
366
374
|
options=make_request_options(
|
|
367
375
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
368
376
|
),
|
|
369
|
-
cast_to=
|
|
377
|
+
cast_to=Cluster,
|
|
370
378
|
)
|
|
371
379
|
|
|
372
380
|
async def retrieve(
|
|
@@ -381,7 +389,7 @@ class AsyncClustersResource(AsyncAPIResource):
|
|
|
381
389
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
382
390
|
) -> Cluster:
|
|
383
391
|
"""
|
|
384
|
-
|
|
392
|
+
Retrieve information about a specific GPU cluster.
|
|
385
393
|
|
|
386
394
|
Args:
|
|
387
395
|
extra_headers: Send extra headers
|
|
@@ -414,9 +422,9 @@ class AsyncClustersResource(AsyncAPIResource):
|
|
|
414
422
|
extra_query: Query | None = None,
|
|
415
423
|
extra_body: Body | None = None,
|
|
416
424
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
417
|
-
) ->
|
|
425
|
+
) -> Cluster:
|
|
418
426
|
"""
|
|
419
|
-
Update
|
|
427
|
+
Update the configuration of an existing GPU cluster.
|
|
420
428
|
|
|
421
429
|
Args:
|
|
422
430
|
extra_headers: Send extra headers
|
|
@@ -441,7 +449,7 @@ class AsyncClustersResource(AsyncAPIResource):
|
|
|
441
449
|
options=make_request_options(
|
|
442
450
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
443
451
|
),
|
|
444
|
-
cast_to=
|
|
452
|
+
cast_to=Cluster,
|
|
445
453
|
)
|
|
446
454
|
|
|
447
455
|
async def list(
|
|
@@ -475,7 +483,7 @@ class AsyncClustersResource(AsyncAPIResource):
|
|
|
475
483
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
476
484
|
) -> ClusterDeleteResponse:
|
|
477
485
|
"""
|
|
478
|
-
Delete GPU cluster by cluster ID
|
|
486
|
+
Delete a GPU cluster by cluster ID.
|
|
479
487
|
|
|
480
488
|
Args:
|
|
481
489
|
extra_headers: Send extra headers
|
|
@@ -18,7 +18,6 @@ from ...._base_client import make_request_options
|
|
|
18
18
|
from ....types.beta.clusters import storage_create_params, storage_update_params
|
|
19
19
|
from ....types.beta.clusters.cluster_storage import ClusterStorage
|
|
20
20
|
from ....types.beta.clusters.storage_list_response import StorageListResponse
|
|
21
|
-
from ....types.beta.clusters.storage_create_response import StorageCreateResponse
|
|
22
21
|
from ....types.beta.clusters.storage_delete_response import StorageDeleteResponse
|
|
23
22
|
|
|
24
23
|
__all__ = ["StorageResource", "AsyncStorageResource"]
|
|
@@ -56,13 +55,16 @@ class StorageResource(SyncAPIResource):
|
|
|
56
55
|
extra_query: Query | None = None,
|
|
57
56
|
extra_body: Body | None = None,
|
|
58
57
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
59
|
-
) ->
|
|
60
|
-
"""
|
|
58
|
+
) -> ClusterStorage:
|
|
59
|
+
"""
|
|
60
|
+
Instant Clusters supports long-lived, resizable in-DC shared storage with user
|
|
61
|
+
data persistence. You can dynamically create and attach volumes to your cluster
|
|
62
|
+
at cluster creation time, and resize as your data grows. All shared storage is
|
|
63
|
+
backed by multi-NIC bare metal paths, ensuring high-throughput and low-latency
|
|
64
|
+
performance for shared storage.
|
|
61
65
|
|
|
62
66
|
Args:
|
|
63
|
-
region: Region name.
|
|
64
|
-
|
|
65
|
-
Usable regions can be found from `client.clusters.list_regions()`
|
|
67
|
+
region: Region name. Usable regions can be found from `client.clusters.list_regions()`
|
|
66
68
|
|
|
67
69
|
size_tib: Volume size in whole tebibytes (TiB).
|
|
68
70
|
|
|
@@ -87,7 +89,7 @@ class StorageResource(SyncAPIResource):
|
|
|
87
89
|
options=make_request_options(
|
|
88
90
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
89
91
|
),
|
|
90
|
-
cast_to=
|
|
92
|
+
cast_to=ClusterStorage,
|
|
91
93
|
)
|
|
92
94
|
|
|
93
95
|
def retrieve(
|
|
@@ -102,7 +104,7 @@ class StorageResource(SyncAPIResource):
|
|
|
102
104
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
103
105
|
) -> ClusterStorage:
|
|
104
106
|
"""
|
|
105
|
-
|
|
107
|
+
Retrieve information about a specific shared volume.
|
|
106
108
|
|
|
107
109
|
Args:
|
|
108
110
|
extra_headers: Send extra headers
|
|
@@ -136,7 +138,7 @@ class StorageResource(SyncAPIResource):
|
|
|
136
138
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
137
139
|
) -> ClusterStorage:
|
|
138
140
|
"""
|
|
139
|
-
Update
|
|
141
|
+
Update the configuration of an existing shared volume.
|
|
140
142
|
|
|
141
143
|
Args:
|
|
142
144
|
extra_headers: Send extra headers
|
|
@@ -192,8 +194,10 @@ class StorageResource(SyncAPIResource):
|
|
|
192
194
|
extra_body: Body | None = None,
|
|
193
195
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
194
196
|
) -> StorageDeleteResponse:
|
|
195
|
-
"""
|
|
196
|
-
|
|
197
|
+
"""Delete a shared volume.
|
|
198
|
+
|
|
199
|
+
Note that if this volume is attached to a cluster,
|
|
200
|
+
deleting will fail.
|
|
197
201
|
|
|
198
202
|
Args:
|
|
199
203
|
extra_headers: Send extra headers
|
|
@@ -247,13 +251,16 @@ class AsyncStorageResource(AsyncAPIResource):
|
|
|
247
251
|
extra_query: Query | None = None,
|
|
248
252
|
extra_body: Body | None = None,
|
|
249
253
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
250
|
-
) ->
|
|
251
|
-
"""
|
|
254
|
+
) -> ClusterStorage:
|
|
255
|
+
"""
|
|
256
|
+
Instant Clusters supports long-lived, resizable in-DC shared storage with user
|
|
257
|
+
data persistence. You can dynamically create and attach volumes to your cluster
|
|
258
|
+
at cluster creation time, and resize as your data grows. All shared storage is
|
|
259
|
+
backed by multi-NIC bare metal paths, ensuring high-throughput and low-latency
|
|
260
|
+
performance for shared storage.
|
|
252
261
|
|
|
253
262
|
Args:
|
|
254
|
-
region: Region name.
|
|
255
|
-
|
|
256
|
-
Usable regions can be found from `client.clusters.list_regions()`
|
|
263
|
+
region: Region name. Usable regions can be found from `client.clusters.list_regions()`
|
|
257
264
|
|
|
258
265
|
size_tib: Volume size in whole tebibytes (TiB).
|
|
259
266
|
|
|
@@ -278,7 +285,7 @@ class AsyncStorageResource(AsyncAPIResource):
|
|
|
278
285
|
options=make_request_options(
|
|
279
286
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
280
287
|
),
|
|
281
|
-
cast_to=
|
|
288
|
+
cast_to=ClusterStorage,
|
|
282
289
|
)
|
|
283
290
|
|
|
284
291
|
async def retrieve(
|
|
@@ -293,7 +300,7 @@ class AsyncStorageResource(AsyncAPIResource):
|
|
|
293
300
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
294
301
|
) -> ClusterStorage:
|
|
295
302
|
"""
|
|
296
|
-
|
|
303
|
+
Retrieve information about a specific shared volume.
|
|
297
304
|
|
|
298
305
|
Args:
|
|
299
306
|
extra_headers: Send extra headers
|
|
@@ -327,7 +334,7 @@ class AsyncStorageResource(AsyncAPIResource):
|
|
|
327
334
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
328
335
|
) -> ClusterStorage:
|
|
329
336
|
"""
|
|
330
|
-
Update
|
|
337
|
+
Update the configuration of an existing shared volume.
|
|
331
338
|
|
|
332
339
|
Args:
|
|
333
340
|
extra_headers: Send extra headers
|
|
@@ -383,8 +390,10 @@ class AsyncStorageResource(AsyncAPIResource):
|
|
|
383
390
|
extra_body: Body | None = None,
|
|
384
391
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
385
392
|
) -> StorageDeleteResponse:
|
|
386
|
-
"""
|
|
387
|
-
|
|
393
|
+
"""Delete a shared volume.
|
|
394
|
+
|
|
395
|
+
Note that if this volume is attached to a cluster,
|
|
396
|
+
deleting will fail.
|
|
388
397
|
|
|
389
398
|
Args:
|
|
390
399
|
extra_headers: Send extra headers
|
together/types/__init__.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
from __future__ import annotations
|
|
3
|
+
from __future__ import annotations # noqa
|
|
4
4
|
|
|
5
5
|
from .batch_job import BatchJob as BatchJob
|
|
6
6
|
from .embedding import Embedding as Embedding
|
|
@@ -70,12 +70,13 @@ from .fine_tuning_list_checkpoints_response import (
|
|
|
70
70
|
)
|
|
71
71
|
|
|
72
72
|
# Manually added to minimize breaking changes from V1
|
|
73
|
-
from .chat.chat_completion import ChatCompletion
|
|
73
|
+
from .chat.chat_completion import ChatCompletion
|
|
74
74
|
from .chat.chat_completion_chunk import ChatCompletionChunk as ChatCompletionChunk
|
|
75
75
|
from .chat.chat_completion_usage import ChatCompletionUsage
|
|
76
|
+
|
|
76
77
|
UsageData = ChatCompletionUsage
|
|
77
78
|
ChatCompletionResponse = ChatCompletion
|
|
78
79
|
CompletionResponse = Completion
|
|
79
80
|
ListEndpoint = EndpointListResponse
|
|
80
81
|
ImageRequest = ImageGenerateParams
|
|
81
|
-
ImageResponse = ImageFile
|
|
82
|
+
ImageResponse = ImageFile
|
together/types/beta/__init__.py
CHANGED
|
@@ -6,7 +6,5 @@ from .cluster import Cluster as Cluster
|
|
|
6
6
|
from .cluster_create_params import ClusterCreateParams as ClusterCreateParams
|
|
7
7
|
from .cluster_list_response import ClusterListResponse as ClusterListResponse
|
|
8
8
|
from .cluster_update_params import ClusterUpdateParams as ClusterUpdateParams
|
|
9
|
-
from .cluster_create_response import ClusterCreateResponse as ClusterCreateResponse
|
|
10
9
|
from .cluster_delete_response import ClusterDeleteResponse as ClusterDeleteResponse
|
|
11
|
-
from .cluster_update_response import ClusterUpdateResponse as ClusterUpdateResponse
|
|
12
10
|
from .cluster_list_regions_response import ClusterListRegionsResponse as ClusterListRegionsResponse
|
|
@@ -16,9 +16,6 @@ class ClusterCreateParams(TypedDict, total=False):
|
|
|
16
16
|
driver_version: Required[Literal["CUDA_12_5_555", "CUDA_12_6_560", "CUDA_12_6_565", "CUDA_12_8_570"]]
|
|
17
17
|
"""NVIDIA driver version to use in the cluster."""
|
|
18
18
|
|
|
19
|
-
duration_days: Required[int]
|
|
20
|
-
"""Duration in days to keep the cluster running."""
|
|
21
|
-
|
|
22
19
|
gpu_type: Required[Literal["H100_SXM", "H200_SXM", "RTX_6000_PCI", "L40_PCIE", "B200_SXM", "H100_SXM_INF"]]
|
|
23
20
|
"""Type of GPU to use in the cluster"""
|
|
24
21
|
|
|
@@ -36,6 +33,9 @@ class ClusterCreateParams(TypedDict, total=False):
|
|
|
36
33
|
|
|
37
34
|
cluster_type: Literal["KUBERNETES", "SLURM"]
|
|
38
35
|
|
|
36
|
+
duration_days: int
|
|
37
|
+
"""Duration in days to keep the cluster running."""
|
|
38
|
+
|
|
39
39
|
shared_volume: SharedVolume
|
|
40
40
|
|
|
41
41
|
volume_id: str
|
|
@@ -6,5 +6,4 @@ from .cluster_storage import ClusterStorage as ClusterStorage
|
|
|
6
6
|
from .storage_create_params import StorageCreateParams as StorageCreateParams
|
|
7
7
|
from .storage_list_response import StorageListResponse as StorageListResponse
|
|
8
8
|
from .storage_update_params import StorageUpdateParams as StorageUpdateParams
|
|
9
|
-
from .storage_create_response import StorageCreateResponse as StorageCreateResponse
|
|
10
9
|
from .storage_delete_response import StorageDeleteResponse as StorageDeleteResponse
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
+
from typing_extensions import Literal
|
|
4
|
+
|
|
3
5
|
from ...._models import BaseModel
|
|
4
6
|
|
|
5
7
|
__all__ = ["ClusterStorage"]
|
|
@@ -8,6 +10,8 @@ __all__ = ["ClusterStorage"]
|
|
|
8
10
|
class ClusterStorage(BaseModel):
|
|
9
11
|
size_tib: int
|
|
10
12
|
|
|
13
|
+
status: Literal["available", "bound", "provisioning"]
|
|
14
|
+
|
|
11
15
|
volume_id: str
|
|
12
16
|
|
|
13
17
|
volume_name: str
|
together/types/endpoints.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: together
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.0a16
|
|
4
4
|
Summary: The official Python library for the together API
|
|
5
5
|
Project-URL: Homepage, https://github.com/togethercomputer/together-py
|
|
6
6
|
Project-URL: Repository, https://github.com/togethercomputer/together-py
|
|
@@ -33,12 +33,15 @@ Requires-Dist: rich>=13.7.1
|
|
|
33
33
|
Requires-Dist: sniffio
|
|
34
34
|
Requires-Dist: tabulate>=0.9.0
|
|
35
35
|
Requires-Dist: tqdm>=4.67.1
|
|
36
|
+
Requires-Dist: types-pyyaml>=6.0.12.20250915
|
|
36
37
|
Requires-Dist: types-tabulate>=0.9.0.20240106
|
|
37
38
|
Requires-Dist: types-tqdm>=4.67.0.20250516
|
|
38
39
|
Requires-Dist: typing-extensions<5,>=4.10
|
|
39
40
|
Provides-Extra: aiohttp
|
|
40
41
|
Requires-Dist: aiohttp; extra == 'aiohttp'
|
|
41
42
|
Requires-Dist: httpx-aiohttp>=0.1.9; extra == 'aiohttp'
|
|
43
|
+
Provides-Extra: cli
|
|
44
|
+
Requires-Dist: pyyaml; extra == 'cli'
|
|
42
45
|
Provides-Extra: pyarrow
|
|
43
46
|
Requires-Dist: pyarrow-stubs>=10.0.1.7; extra == 'pyarrow'
|
|
44
47
|
Requires-Dist: pyarrow>=16.1.0; extra == 'pyarrow'
|
|
@@ -236,7 +239,6 @@ cluster = client.beta.clusters.create(
|
|
|
236
239
|
billing_type="RESERVED",
|
|
237
240
|
cluster_name="cluster_name",
|
|
238
241
|
driver_version="CUDA_12_5_555",
|
|
239
|
-
duration_days=0,
|
|
240
242
|
gpu_type="H100_SXM",
|
|
241
243
|
num_gpus=0,
|
|
242
244
|
region="us-central-8",
|