together 2.0.0a17__py3-none-any.whl → 2.0.0a19__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 +5 -2
- together/_client.py +1 -77
- together/_compat.py +3 -3
- together/_utils/_json.py +35 -0
- together/_version.py +1 -1
- together/lib/cli/api/beta/__init__.py +2 -0
- together/lib/cli/api/beta/jig/__init__.py +52 -0
- together/lib/cli/api/beta/jig/_config.py +170 -0
- together/lib/cli/api/beta/jig/jig.py +664 -0
- together/lib/cli/api/beta/jig/secrets.py +138 -0
- together/lib/cli/api/beta/jig/volumes.py +509 -0
- together/lib/cli/api/endpoints/create.py +7 -3
- together/lib/cli/api/endpoints/hardware.py +38 -7
- together/lib/cli/api/models/upload.py +5 -1
- together/resources/__init__.py +0 -28
- together/resources/beta/__init__.py +14 -0
- together/resources/beta/beta.py +32 -0
- together/resources/beta/clusters/clusters.py +12 -12
- together/resources/beta/clusters/storage.py +10 -10
- together/resources/beta/jig/__init__.py +61 -0
- together/resources/beta/jig/jig.py +1004 -0
- together/resources/beta/jig/queue.py +482 -0
- together/resources/beta/jig/secrets.py +548 -0
- together/resources/beta/jig/volumes.py +514 -0
- together/resources/chat/completions.py +10 -0
- together/resources/endpoints.py +103 -1
- together/resources/models/__init__.py +33 -0
- together/resources/{models.py → models/models.py} +41 -9
- together/resources/models/uploads.py +163 -0
- together/types/__init__.py +2 -4
- together/types/beta/__init__.py +6 -0
- together/types/beta/deployment.py +261 -0
- together/types/beta/deployment_logs.py +11 -0
- together/types/beta/jig/__init__.py +20 -0
- together/types/beta/jig/queue_cancel_params.py +13 -0
- together/types/beta/jig/queue_cancel_response.py +11 -0
- together/types/beta/jig/queue_metrics_params.py +12 -0
- together/types/beta/jig/queue_metrics_response.py +8 -0
- together/types/beta/jig/queue_retrieve_params.py +15 -0
- together/types/beta/jig/queue_retrieve_response.py +35 -0
- together/types/beta/jig/queue_submit_params.py +19 -0
- together/types/beta/jig/queue_submit_response.py +25 -0
- together/types/beta/jig/secret.py +33 -0
- together/types/beta/jig/secret_create_params.py +34 -0
- together/types/beta/jig/secret_list_response.py +16 -0
- together/types/beta/jig/secret_update_params.py +34 -0
- together/types/beta/jig/volume.py +47 -0
- together/types/beta/jig/volume_create_params.py +34 -0
- together/types/beta/jig/volume_list_response.py +16 -0
- together/types/beta/jig/volume_update_params.py +34 -0
- together/types/beta/jig_deploy_params.py +150 -0
- together/types/beta/jig_list_response.py +16 -0
- together/types/beta/jig_retrieve_logs_params.py +12 -0
- together/types/beta/jig_update_params.py +141 -0
- together/types/chat/completion_create_params.py +11 -0
- together/types/{hardware_list_params.py → endpoint_list_hardware_params.py} +2 -2
- together/types/{hardware_list_response.py → endpoint_list_hardware_response.py} +2 -2
- together/types/models/__init__.py +5 -0
- together/types/{job_retrieve_response.py → models/upload_status_response.py} +3 -3
- {together-2.0.0a17.dist-info → together-2.0.0a19.dist-info}/METADATA +15 -14
- {together-2.0.0a17.dist-info → together-2.0.0a19.dist-info}/RECORD +64 -30
- together/resources/hardware.py +0 -181
- together/resources/jobs.py +0 -214
- together/types/job_list_response.py +0 -47
- {together-2.0.0a17.dist-info → together-2.0.0a19.dist-info}/WHEEL +0 -0
- {together-2.0.0a17.dist-info → together-2.0.0a19.dist-info}/entry_points.txt +0 -0
- {together-2.0.0a17.dist-info → together-2.0.0a19.dist-info}/licenses/LICENSE +0 -0
together/resources/endpoints.py
CHANGED
|
@@ -7,7 +7,12 @@ from typing_extensions import Literal
|
|
|
7
7
|
|
|
8
8
|
import httpx
|
|
9
9
|
|
|
10
|
-
from ..types import
|
|
10
|
+
from ..types import (
|
|
11
|
+
endpoint_list_params,
|
|
12
|
+
endpoint_create_params,
|
|
13
|
+
endpoint_update_params,
|
|
14
|
+
endpoint_list_hardware_params,
|
|
15
|
+
)
|
|
11
16
|
from .._types import Body, Omit, Query, Headers, NoneType, NotGiven, omit, not_given
|
|
12
17
|
from .._utils import maybe_transform, async_maybe_transform
|
|
13
18
|
from .._compat import cached_property
|
|
@@ -23,6 +28,7 @@ from ..types.autoscaling_param import AutoscalingParam
|
|
|
23
28
|
from ..types.dedicated_endpoint import DedicatedEndpoint
|
|
24
29
|
from ..types.endpoint_list_response import EndpointListResponse
|
|
25
30
|
from ..types.endpoint_list_avzones_response import EndpointListAvzonesResponse
|
|
31
|
+
from ..types.endpoint_list_hardware_response import EndpointListHardwareResponse
|
|
26
32
|
|
|
27
33
|
__all__ = ["EndpointsResource", "AsyncEndpointsResource"]
|
|
28
34
|
|
|
@@ -320,6 +326,47 @@ class EndpointsResource(SyncAPIResource):
|
|
|
320
326
|
cast_to=EndpointListAvzonesResponse,
|
|
321
327
|
)
|
|
322
328
|
|
|
329
|
+
def list_hardware(
|
|
330
|
+
self,
|
|
331
|
+
*,
|
|
332
|
+
model: str | Omit = omit,
|
|
333
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
334
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
335
|
+
extra_headers: Headers | None = None,
|
|
336
|
+
extra_query: Query | None = None,
|
|
337
|
+
extra_body: Body | None = None,
|
|
338
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
339
|
+
) -> EndpointListHardwareResponse:
|
|
340
|
+
"""Returns a list of available hardware configurations for deploying models.
|
|
341
|
+
|
|
342
|
+
When a
|
|
343
|
+
model parameter is provided, it returns only hardware configurations compatible
|
|
344
|
+
with that model, including their current availability status.
|
|
345
|
+
|
|
346
|
+
Args:
|
|
347
|
+
model: Filter hardware configurations by model compatibility. When provided, the
|
|
348
|
+
response includes availability status for each compatible configuration.
|
|
349
|
+
|
|
350
|
+
extra_headers: Send extra headers
|
|
351
|
+
|
|
352
|
+
extra_query: Add additional query parameters to the request
|
|
353
|
+
|
|
354
|
+
extra_body: Add additional JSON properties to the request
|
|
355
|
+
|
|
356
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
357
|
+
"""
|
|
358
|
+
return self._get(
|
|
359
|
+
"/hardware",
|
|
360
|
+
options=make_request_options(
|
|
361
|
+
extra_headers=extra_headers,
|
|
362
|
+
extra_query=extra_query,
|
|
363
|
+
extra_body=extra_body,
|
|
364
|
+
timeout=timeout,
|
|
365
|
+
query=maybe_transform({"model": model}, endpoint_list_hardware_params.EndpointListHardwareParams),
|
|
366
|
+
),
|
|
367
|
+
cast_to=EndpointListHardwareResponse,
|
|
368
|
+
)
|
|
369
|
+
|
|
323
370
|
|
|
324
371
|
class AsyncEndpointsResource(AsyncAPIResource):
|
|
325
372
|
@cached_property
|
|
@@ -614,6 +661,49 @@ class AsyncEndpointsResource(AsyncAPIResource):
|
|
|
614
661
|
cast_to=EndpointListAvzonesResponse,
|
|
615
662
|
)
|
|
616
663
|
|
|
664
|
+
async def list_hardware(
|
|
665
|
+
self,
|
|
666
|
+
*,
|
|
667
|
+
model: str | Omit = omit,
|
|
668
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
669
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
670
|
+
extra_headers: Headers | None = None,
|
|
671
|
+
extra_query: Query | None = None,
|
|
672
|
+
extra_body: Body | None = None,
|
|
673
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
674
|
+
) -> EndpointListHardwareResponse:
|
|
675
|
+
"""Returns a list of available hardware configurations for deploying models.
|
|
676
|
+
|
|
677
|
+
When a
|
|
678
|
+
model parameter is provided, it returns only hardware configurations compatible
|
|
679
|
+
with that model, including their current availability status.
|
|
680
|
+
|
|
681
|
+
Args:
|
|
682
|
+
model: Filter hardware configurations by model compatibility. When provided, the
|
|
683
|
+
response includes availability status for each compatible configuration.
|
|
684
|
+
|
|
685
|
+
extra_headers: Send extra headers
|
|
686
|
+
|
|
687
|
+
extra_query: Add additional query parameters to the request
|
|
688
|
+
|
|
689
|
+
extra_body: Add additional JSON properties to the request
|
|
690
|
+
|
|
691
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
692
|
+
"""
|
|
693
|
+
return await self._get(
|
|
694
|
+
"/hardware",
|
|
695
|
+
options=make_request_options(
|
|
696
|
+
extra_headers=extra_headers,
|
|
697
|
+
extra_query=extra_query,
|
|
698
|
+
extra_body=extra_body,
|
|
699
|
+
timeout=timeout,
|
|
700
|
+
query=await async_maybe_transform(
|
|
701
|
+
{"model": model}, endpoint_list_hardware_params.EndpointListHardwareParams
|
|
702
|
+
),
|
|
703
|
+
),
|
|
704
|
+
cast_to=EndpointListHardwareResponse,
|
|
705
|
+
)
|
|
706
|
+
|
|
617
707
|
|
|
618
708
|
class EndpointsResourceWithRawResponse:
|
|
619
709
|
def __init__(self, endpoints: EndpointsResource) -> None:
|
|
@@ -637,6 +727,9 @@ class EndpointsResourceWithRawResponse:
|
|
|
637
727
|
self.list_avzones = to_raw_response_wrapper(
|
|
638
728
|
endpoints.list_avzones,
|
|
639
729
|
)
|
|
730
|
+
self.list_hardware = to_raw_response_wrapper(
|
|
731
|
+
endpoints.list_hardware,
|
|
732
|
+
)
|
|
640
733
|
|
|
641
734
|
|
|
642
735
|
class AsyncEndpointsResourceWithRawResponse:
|
|
@@ -661,6 +754,9 @@ class AsyncEndpointsResourceWithRawResponse:
|
|
|
661
754
|
self.list_avzones = async_to_raw_response_wrapper(
|
|
662
755
|
endpoints.list_avzones,
|
|
663
756
|
)
|
|
757
|
+
self.list_hardware = async_to_raw_response_wrapper(
|
|
758
|
+
endpoints.list_hardware,
|
|
759
|
+
)
|
|
664
760
|
|
|
665
761
|
|
|
666
762
|
class EndpointsResourceWithStreamingResponse:
|
|
@@ -685,6 +781,9 @@ class EndpointsResourceWithStreamingResponse:
|
|
|
685
781
|
self.list_avzones = to_streamed_response_wrapper(
|
|
686
782
|
endpoints.list_avzones,
|
|
687
783
|
)
|
|
784
|
+
self.list_hardware = to_streamed_response_wrapper(
|
|
785
|
+
endpoints.list_hardware,
|
|
786
|
+
)
|
|
688
787
|
|
|
689
788
|
|
|
690
789
|
class AsyncEndpointsResourceWithStreamingResponse:
|
|
@@ -709,3 +808,6 @@ class AsyncEndpointsResourceWithStreamingResponse:
|
|
|
709
808
|
self.list_avzones = async_to_streamed_response_wrapper(
|
|
710
809
|
endpoints.list_avzones,
|
|
711
810
|
)
|
|
811
|
+
self.list_hardware = async_to_streamed_response_wrapper(
|
|
812
|
+
endpoints.list_hardware,
|
|
813
|
+
)
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from .models import (
|
|
4
|
+
ModelsResource,
|
|
5
|
+
AsyncModelsResource,
|
|
6
|
+
ModelsResourceWithRawResponse,
|
|
7
|
+
AsyncModelsResourceWithRawResponse,
|
|
8
|
+
ModelsResourceWithStreamingResponse,
|
|
9
|
+
AsyncModelsResourceWithStreamingResponse,
|
|
10
|
+
)
|
|
11
|
+
from .uploads import (
|
|
12
|
+
UploadsResource,
|
|
13
|
+
AsyncUploadsResource,
|
|
14
|
+
UploadsResourceWithRawResponse,
|
|
15
|
+
AsyncUploadsResourceWithRawResponse,
|
|
16
|
+
UploadsResourceWithStreamingResponse,
|
|
17
|
+
AsyncUploadsResourceWithStreamingResponse,
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
__all__ = [
|
|
21
|
+
"UploadsResource",
|
|
22
|
+
"AsyncUploadsResource",
|
|
23
|
+
"UploadsResourceWithRawResponse",
|
|
24
|
+
"AsyncUploadsResourceWithRawResponse",
|
|
25
|
+
"UploadsResourceWithStreamingResponse",
|
|
26
|
+
"AsyncUploadsResourceWithStreamingResponse",
|
|
27
|
+
"ModelsResource",
|
|
28
|
+
"AsyncModelsResource",
|
|
29
|
+
"ModelsResourceWithRawResponse",
|
|
30
|
+
"AsyncModelsResourceWithRawResponse",
|
|
31
|
+
"ModelsResourceWithStreamingResponse",
|
|
32
|
+
"AsyncModelsResourceWithStreamingResponse",
|
|
33
|
+
]
|
|
@@ -6,25 +6,37 @@ from typing_extensions import Literal
|
|
|
6
6
|
|
|
7
7
|
import httpx
|
|
8
8
|
|
|
9
|
-
from
|
|
10
|
-
from
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
from ...types import model_list_params, model_upload_params
|
|
10
|
+
from .uploads import (
|
|
11
|
+
UploadsResource,
|
|
12
|
+
AsyncUploadsResource,
|
|
13
|
+
UploadsResourceWithRawResponse,
|
|
14
|
+
AsyncUploadsResourceWithRawResponse,
|
|
15
|
+
UploadsResourceWithStreamingResponse,
|
|
16
|
+
AsyncUploadsResourceWithStreamingResponse,
|
|
17
|
+
)
|
|
18
|
+
from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
|
|
19
|
+
from ..._utils import maybe_transform, async_maybe_transform
|
|
20
|
+
from ..._compat import cached_property
|
|
21
|
+
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
22
|
+
from ..._response import (
|
|
15
23
|
to_raw_response_wrapper,
|
|
16
24
|
to_streamed_response_wrapper,
|
|
17
25
|
async_to_raw_response_wrapper,
|
|
18
26
|
async_to_streamed_response_wrapper,
|
|
19
27
|
)
|
|
20
|
-
from
|
|
21
|
-
from
|
|
22
|
-
from
|
|
28
|
+
from ..._base_client import make_request_options
|
|
29
|
+
from ...types.model_list_response import ModelListResponse
|
|
30
|
+
from ...types.model_upload_response import ModelUploadResponse
|
|
23
31
|
|
|
24
32
|
__all__ = ["ModelsResource", "AsyncModelsResource"]
|
|
25
33
|
|
|
26
34
|
|
|
27
35
|
class ModelsResource(SyncAPIResource):
|
|
36
|
+
@cached_property
|
|
37
|
+
def uploads(self) -> UploadsResource:
|
|
38
|
+
return UploadsResource(self._client)
|
|
39
|
+
|
|
28
40
|
@cached_property
|
|
29
41
|
def with_raw_response(self) -> ModelsResourceWithRawResponse:
|
|
30
42
|
"""
|
|
@@ -148,6 +160,10 @@ class ModelsResource(SyncAPIResource):
|
|
|
148
160
|
|
|
149
161
|
|
|
150
162
|
class AsyncModelsResource(AsyncAPIResource):
|
|
163
|
+
@cached_property
|
|
164
|
+
def uploads(self) -> AsyncUploadsResource:
|
|
165
|
+
return AsyncUploadsResource(self._client)
|
|
166
|
+
|
|
151
167
|
@cached_property
|
|
152
168
|
def with_raw_response(self) -> AsyncModelsResourceWithRawResponse:
|
|
153
169
|
"""
|
|
@@ -281,6 +297,10 @@ class ModelsResourceWithRawResponse:
|
|
|
281
297
|
models.upload,
|
|
282
298
|
)
|
|
283
299
|
|
|
300
|
+
@cached_property
|
|
301
|
+
def uploads(self) -> UploadsResourceWithRawResponse:
|
|
302
|
+
return UploadsResourceWithRawResponse(self._models.uploads)
|
|
303
|
+
|
|
284
304
|
|
|
285
305
|
class AsyncModelsResourceWithRawResponse:
|
|
286
306
|
def __init__(self, models: AsyncModelsResource) -> None:
|
|
@@ -293,6 +313,10 @@ class AsyncModelsResourceWithRawResponse:
|
|
|
293
313
|
models.upload,
|
|
294
314
|
)
|
|
295
315
|
|
|
316
|
+
@cached_property
|
|
317
|
+
def uploads(self) -> AsyncUploadsResourceWithRawResponse:
|
|
318
|
+
return AsyncUploadsResourceWithRawResponse(self._models.uploads)
|
|
319
|
+
|
|
296
320
|
|
|
297
321
|
class ModelsResourceWithStreamingResponse:
|
|
298
322
|
def __init__(self, models: ModelsResource) -> None:
|
|
@@ -305,6 +329,10 @@ class ModelsResourceWithStreamingResponse:
|
|
|
305
329
|
models.upload,
|
|
306
330
|
)
|
|
307
331
|
|
|
332
|
+
@cached_property
|
|
333
|
+
def uploads(self) -> UploadsResourceWithStreamingResponse:
|
|
334
|
+
return UploadsResourceWithStreamingResponse(self._models.uploads)
|
|
335
|
+
|
|
308
336
|
|
|
309
337
|
class AsyncModelsResourceWithStreamingResponse:
|
|
310
338
|
def __init__(self, models: AsyncModelsResource) -> None:
|
|
@@ -316,3 +344,7 @@ class AsyncModelsResourceWithStreamingResponse:
|
|
|
316
344
|
self.upload = async_to_streamed_response_wrapper(
|
|
317
345
|
models.upload,
|
|
318
346
|
)
|
|
347
|
+
|
|
348
|
+
@cached_property
|
|
349
|
+
def uploads(self) -> AsyncUploadsResourceWithStreamingResponse:
|
|
350
|
+
return AsyncUploadsResourceWithStreamingResponse(self._models.uploads)
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import httpx
|
|
6
|
+
|
|
7
|
+
from ..._types import Body, Query, Headers, NotGiven, not_given
|
|
8
|
+
from ..._compat import cached_property
|
|
9
|
+
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
10
|
+
from ..._response import (
|
|
11
|
+
to_raw_response_wrapper,
|
|
12
|
+
to_streamed_response_wrapper,
|
|
13
|
+
async_to_raw_response_wrapper,
|
|
14
|
+
async_to_streamed_response_wrapper,
|
|
15
|
+
)
|
|
16
|
+
from ..._base_client import make_request_options
|
|
17
|
+
from ...types.models.upload_status_response import UploadStatusResponse
|
|
18
|
+
|
|
19
|
+
__all__ = ["UploadsResource", "AsyncUploadsResource"]
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class UploadsResource(SyncAPIResource):
|
|
23
|
+
@cached_property
|
|
24
|
+
def with_raw_response(self) -> UploadsResourceWithRawResponse:
|
|
25
|
+
"""
|
|
26
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
27
|
+
the raw response object instead of the parsed content.
|
|
28
|
+
|
|
29
|
+
For more information, see https://www.github.com/togethercomputer/together-py#accessing-raw-response-data-eg-headers
|
|
30
|
+
"""
|
|
31
|
+
return UploadsResourceWithRawResponse(self)
|
|
32
|
+
|
|
33
|
+
@cached_property
|
|
34
|
+
def with_streaming_response(self) -> UploadsResourceWithStreamingResponse:
|
|
35
|
+
"""
|
|
36
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
37
|
+
|
|
38
|
+
For more information, see https://www.github.com/togethercomputer/together-py#with_streaming_response
|
|
39
|
+
"""
|
|
40
|
+
return UploadsResourceWithStreamingResponse(self)
|
|
41
|
+
|
|
42
|
+
def status(
|
|
43
|
+
self,
|
|
44
|
+
job_id: str,
|
|
45
|
+
*,
|
|
46
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
47
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
48
|
+
extra_headers: Headers | None = None,
|
|
49
|
+
extra_query: Query | None = None,
|
|
50
|
+
extra_body: Body | None = None,
|
|
51
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
52
|
+
) -> UploadStatusResponse:
|
|
53
|
+
"""
|
|
54
|
+
Get the status of a specific job
|
|
55
|
+
|
|
56
|
+
Args:
|
|
57
|
+
extra_headers: Send extra headers
|
|
58
|
+
|
|
59
|
+
extra_query: Add additional query parameters to the request
|
|
60
|
+
|
|
61
|
+
extra_body: Add additional JSON properties to the request
|
|
62
|
+
|
|
63
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
64
|
+
"""
|
|
65
|
+
if not job_id:
|
|
66
|
+
raise ValueError(f"Expected a non-empty value for `job_id` but received {job_id!r}")
|
|
67
|
+
return self._get(
|
|
68
|
+
f"/jobs/{job_id}",
|
|
69
|
+
options=make_request_options(
|
|
70
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
71
|
+
),
|
|
72
|
+
cast_to=UploadStatusResponse,
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
class AsyncUploadsResource(AsyncAPIResource):
|
|
77
|
+
@cached_property
|
|
78
|
+
def with_raw_response(self) -> AsyncUploadsResourceWithRawResponse:
|
|
79
|
+
"""
|
|
80
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
81
|
+
the raw response object instead of the parsed content.
|
|
82
|
+
|
|
83
|
+
For more information, see https://www.github.com/togethercomputer/together-py#accessing-raw-response-data-eg-headers
|
|
84
|
+
"""
|
|
85
|
+
return AsyncUploadsResourceWithRawResponse(self)
|
|
86
|
+
|
|
87
|
+
@cached_property
|
|
88
|
+
def with_streaming_response(self) -> AsyncUploadsResourceWithStreamingResponse:
|
|
89
|
+
"""
|
|
90
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
91
|
+
|
|
92
|
+
For more information, see https://www.github.com/togethercomputer/together-py#with_streaming_response
|
|
93
|
+
"""
|
|
94
|
+
return AsyncUploadsResourceWithStreamingResponse(self)
|
|
95
|
+
|
|
96
|
+
async def status(
|
|
97
|
+
self,
|
|
98
|
+
job_id: str,
|
|
99
|
+
*,
|
|
100
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
101
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
102
|
+
extra_headers: Headers | None = None,
|
|
103
|
+
extra_query: Query | None = None,
|
|
104
|
+
extra_body: Body | None = None,
|
|
105
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
106
|
+
) -> UploadStatusResponse:
|
|
107
|
+
"""
|
|
108
|
+
Get the status of a specific job
|
|
109
|
+
|
|
110
|
+
Args:
|
|
111
|
+
extra_headers: Send extra headers
|
|
112
|
+
|
|
113
|
+
extra_query: Add additional query parameters to the request
|
|
114
|
+
|
|
115
|
+
extra_body: Add additional JSON properties to the request
|
|
116
|
+
|
|
117
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
118
|
+
"""
|
|
119
|
+
if not job_id:
|
|
120
|
+
raise ValueError(f"Expected a non-empty value for `job_id` but received {job_id!r}")
|
|
121
|
+
return await self._get(
|
|
122
|
+
f"/jobs/{job_id}",
|
|
123
|
+
options=make_request_options(
|
|
124
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
125
|
+
),
|
|
126
|
+
cast_to=UploadStatusResponse,
|
|
127
|
+
)
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
class UploadsResourceWithRawResponse:
|
|
131
|
+
def __init__(self, uploads: UploadsResource) -> None:
|
|
132
|
+
self._uploads = uploads
|
|
133
|
+
|
|
134
|
+
self.status = to_raw_response_wrapper(
|
|
135
|
+
uploads.status,
|
|
136
|
+
)
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
class AsyncUploadsResourceWithRawResponse:
|
|
140
|
+
def __init__(self, uploads: AsyncUploadsResource) -> None:
|
|
141
|
+
self._uploads = uploads
|
|
142
|
+
|
|
143
|
+
self.status = async_to_raw_response_wrapper(
|
|
144
|
+
uploads.status,
|
|
145
|
+
)
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
class UploadsResourceWithStreamingResponse:
|
|
149
|
+
def __init__(self, uploads: UploadsResource) -> None:
|
|
150
|
+
self._uploads = uploads
|
|
151
|
+
|
|
152
|
+
self.status = to_streamed_response_wrapper(
|
|
153
|
+
uploads.status,
|
|
154
|
+
)
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
class AsyncUploadsResourceWithStreamingResponse:
|
|
158
|
+
def __init__(self, uploads: AsyncUploadsResource) -> None:
|
|
159
|
+
self._uploads = uploads
|
|
160
|
+
|
|
161
|
+
self.status = async_to_streamed_response_wrapper(
|
|
162
|
+
uploads.status,
|
|
163
|
+
)
|
together/types/__init__.py
CHANGED
|
@@ -25,7 +25,6 @@ from .eval_list_params import EvalListParams as EvalListParams
|
|
|
25
25
|
from .execute_response import ExecuteResponse as ExecuteResponse
|
|
26
26
|
from .autoscaling_param import AutoscalingParam as AutoscalingParam
|
|
27
27
|
from .finetune_response import FinetuneResponse as FinetuneResponse
|
|
28
|
-
from .job_list_response import JobListResponse as JobListResponse
|
|
29
28
|
from .model_list_params import ModelListParams as ModelListParams
|
|
30
29
|
from .tool_choice_param import ToolChoiceParam as ToolChoiceParam
|
|
31
30
|
from .dedicated_endpoint import DedicatedEndpoint as DedicatedEndpoint
|
|
@@ -41,16 +40,13 @@ from .endpoint_list_params import EndpointListParams as EndpointListParams
|
|
|
41
40
|
from .eval_create_response import EvalCreateResponse as EvalCreateResponse
|
|
42
41
|
from .eval_status_response import EvalStatusResponse as EvalStatusResponse
|
|
43
42
|
from .file_delete_response import FileDeleteResponse as FileDeleteResponse
|
|
44
|
-
from .hardware_list_params import HardwareListParams as HardwareListParams
|
|
45
43
|
from .rerank_create_params import RerankCreateParams as RerankCreateParams
|
|
46
44
|
from .batch_create_response import BatchCreateResponse as BatchCreateResponse
|
|
47
45
|
from .image_generate_params import ImageGenerateParams as ImageGenerateParams
|
|
48
|
-
from .job_retrieve_response import JobRetrieveResponse as JobRetrieveResponse
|
|
49
46
|
from .model_upload_response import ModelUploadResponse as ModelUploadResponse
|
|
50
47
|
from .endpoint_create_params import EndpointCreateParams as EndpointCreateParams
|
|
51
48
|
from .endpoint_list_response import EndpointListResponse as EndpointListResponse
|
|
52
49
|
from .endpoint_update_params import EndpointUpdateParams as EndpointUpdateParams
|
|
53
|
-
from .hardware_list_response import HardwareListResponse as HardwareListResponse
|
|
54
50
|
from .rerank_create_response import RerankCreateResponse as RerankCreateResponse
|
|
55
51
|
from .embedding_create_params import EmbeddingCreateParams as EmbeddingCreateParams
|
|
56
52
|
from .completion_create_params import CompletionCreateParams as CompletionCreateParams
|
|
@@ -60,8 +56,10 @@ from .fine_tuning_list_response import FineTuningListResponse as FineTuningListR
|
|
|
60
56
|
from .fine_tuning_content_params import FineTuningContentParams as FineTuningContentParams
|
|
61
57
|
from .fine_tuning_cancel_response import FineTuningCancelResponse as FineTuningCancelResponse
|
|
62
58
|
from .fine_tuning_delete_response import FineTuningDeleteResponse as FineTuningDeleteResponse
|
|
59
|
+
from .endpoint_list_hardware_params import EndpointListHardwareParams as EndpointListHardwareParams
|
|
63
60
|
from .endpoint_list_avzones_response import EndpointListAvzonesResponse as EndpointListAvzonesResponse
|
|
64
61
|
from .code_interpreter_execute_params import CodeInterpreterExecuteParams as CodeInterpreterExecuteParams
|
|
62
|
+
from .endpoint_list_hardware_response import EndpointListHardwareResponse as EndpointListHardwareResponse
|
|
65
63
|
from .fine_tuning_list_events_response import FineTuningListEventsResponse as FineTuningListEventsResponse
|
|
66
64
|
from .fine_tuning_estimate_price_params import FineTuningEstimatePriceParams as FineTuningEstimatePriceParams
|
|
67
65
|
from .fine_tuning_estimate_price_response import FineTuningEstimatePriceResponse as FineTuningEstimatePriceResponse
|
together/types/beta/__init__.py
CHANGED
|
@@ -3,8 +3,14 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
from .cluster import Cluster as Cluster
|
|
6
|
+
from .deployment import Deployment as Deployment
|
|
7
|
+
from .deployment_logs import DeploymentLogs as DeploymentLogs
|
|
8
|
+
from .jig_deploy_params import JigDeployParams as JigDeployParams
|
|
9
|
+
from .jig_list_response import JigListResponse as JigListResponse
|
|
10
|
+
from .jig_update_params import JigUpdateParams as JigUpdateParams
|
|
6
11
|
from .cluster_create_params import ClusterCreateParams as ClusterCreateParams
|
|
7
12
|
from .cluster_list_response import ClusterListResponse as ClusterListResponse
|
|
8
13
|
from .cluster_update_params import ClusterUpdateParams as ClusterUpdateParams
|
|
9
14
|
from .cluster_delete_response import ClusterDeleteResponse as ClusterDeleteResponse
|
|
15
|
+
from .jig_retrieve_logs_params import JigRetrieveLogsParams as JigRetrieveLogsParams
|
|
10
16
|
from .cluster_list_regions_response import ClusterListRegionsResponse as ClusterListRegionsResponse
|