modal 0.73.115__py3-none-any.whl → 0.73.126__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.
- modal/_functions.py +15 -6
- modal/_runtime/container_io_manager.py +13 -9
- modal/_runtime/container_io_manager.pyi +7 -4
- modal/_serialization.py +92 -44
- modal/_utils/async_utils.py +71 -6
- modal/_utils/function_utils.py +33 -13
- modal/_utils/jwt_utils.py +38 -0
- modal/cli/app.py +15 -0
- modal/client.pyi +2 -2
- modal/cls.py +3 -13
- modal/cls.pyi +0 -2
- modal/functions.pyi +6 -6
- modal/image.py +2 -0
- modal/parallel_map.py +393 -44
- modal/parallel_map.pyi +75 -0
- modal/retries.py +11 -9
- {modal-0.73.115.dist-info → modal-0.73.126.dist-info}/METADATA +1 -1
- {modal-0.73.115.dist-info → modal-0.73.126.dist-info}/RECORD +30 -29
- {modal-0.73.115.dist-info → modal-0.73.126.dist-info}/WHEEL +1 -1
- modal_proto/api.proto +13 -0
- modal_proto/api_grpc.py +16 -0
- modal_proto/api_pb2.py +284 -263
- modal_proto/api_pb2.pyi +43 -0
- modal_proto/api_pb2_grpc.py +33 -0
- modal_proto/api_pb2_grpc.pyi +10 -0
- modal_proto/modal_api_grpc.py +1 -0
- modal_version/_version_generated.py +1 -1
- {modal-0.73.115.dist-info → modal-0.73.126.dist-info}/LICENSE +0 -0
- {modal-0.73.115.dist-info → modal-0.73.126.dist-info}/entry_points.txt +0 -0
- {modal-0.73.115.dist-info → modal-0.73.126.dist-info}/top_level.txt +0 -0
modal/parallel_map.pyi
CHANGED
@@ -1,8 +1,13 @@
|
|
1
|
+
import asyncio
|
2
|
+
import asyncio.events
|
1
3
|
import collections.abc
|
4
|
+
import enum
|
2
5
|
import modal._functions
|
3
6
|
import modal._utils.async_utils
|
4
7
|
import modal.client
|
5
8
|
import modal.functions
|
9
|
+
import modal.retries
|
10
|
+
import modal_proto.api_pb2
|
6
11
|
import typing
|
7
12
|
import typing_extensions
|
8
13
|
|
@@ -48,6 +53,7 @@ def _map_invocation(
|
|
48
53
|
order_outputs: bool,
|
49
54
|
return_exceptions: bool,
|
50
55
|
count_update_callback: typing.Optional[collections.abc.Callable[[int, int], None]],
|
56
|
+
function_call_invocation_type: int,
|
51
57
|
): ...
|
52
58
|
def _map_sync(
|
53
59
|
self, *input_iterators, kwargs={}, order_outputs: bool = True, return_exceptions: bool = False
|
@@ -77,3 +83,72 @@ def _starmap_sync(
|
|
77
83
|
order_outputs: bool = True,
|
78
84
|
return_exceptions: bool = False,
|
79
85
|
) -> modal._utils.async_utils.AsyncOrSyncIterable: ...
|
86
|
+
|
87
|
+
class _MapItemState(enum.Enum):
|
88
|
+
# The input is being sent the server with a PutInputs request, but the response has not been received yet.
|
89
|
+
SENDING = 1
|
90
|
+
# A call to either PutInputs or FunctionRetry has completed, and we are waiting to receive the output.
|
91
|
+
WAITING_FOR_OUTPUT = 2
|
92
|
+
# The input is on the retry queue, and waiting for its delay to expire.
|
93
|
+
WAITING_TO_RETRY = 3
|
94
|
+
# The input is being sent to the server with a FunctionRetry request, but the response has not been received yet.
|
95
|
+
RETRYING = 4
|
96
|
+
# The output has been received and was either successful, or failed with no more retries remaining.
|
97
|
+
COMPLETE = 5
|
98
|
+
|
99
|
+
class _OutputType(enum.Enum):
|
100
|
+
SUCCESSFUL_COMPLETION = 1
|
101
|
+
FAILED_COMPLETION = 2
|
102
|
+
RETRYING = 3
|
103
|
+
ALREADY_COMPLETE_DUPLICATE = 4
|
104
|
+
STALE_RETRY_DUPLICATE = 5
|
105
|
+
NO_CONTEXT_DUPLICATE = 6
|
106
|
+
|
107
|
+
class _MapItemContext:
|
108
|
+
state: _MapItemState
|
109
|
+
input: modal_proto.api_pb2.FunctionInput
|
110
|
+
retry_manager: modal.retries.RetryManager
|
111
|
+
sync_client_retries_enabled: bool
|
112
|
+
input_id: asyncio.Future
|
113
|
+
input_jwt: asyncio.Future
|
114
|
+
previous_input_jwt: typing.Optional[str]
|
115
|
+
_event_loop: asyncio.events.AbstractEventLoop
|
116
|
+
|
117
|
+
def __init__(
|
118
|
+
self,
|
119
|
+
input: modal_proto.api_pb2.FunctionInput,
|
120
|
+
retry_manager: modal.retries.RetryManager,
|
121
|
+
sync_client_retries_enabled: bool,
|
122
|
+
): ...
|
123
|
+
def handle_put_inputs_response(self, item: modal_proto.api_pb2.FunctionPutInputsResponseItem): ...
|
124
|
+
async def handle_get_outputs_response(
|
125
|
+
self,
|
126
|
+
item: modal_proto.api_pb2.FunctionGetOutputsItem,
|
127
|
+
now_seconds: int,
|
128
|
+
function_call_invocation_type: int,
|
129
|
+
retry_queue: modal._utils.async_utils.TimestampPriorityQueue,
|
130
|
+
) -> _OutputType: ...
|
131
|
+
async def prepare_item_for_retry(self) -> modal_proto.api_pb2.FunctionRetryInputsItem: ...
|
132
|
+
def handle_retry_response(self, input_jwt: str): ...
|
133
|
+
|
134
|
+
class _MapItemsManager:
|
135
|
+
def __init__(
|
136
|
+
self,
|
137
|
+
retry_policy: modal_proto.api_pb2.FunctionRetryPolicy,
|
138
|
+
function_call_invocation_type: int,
|
139
|
+
retry_queue: modal._utils.async_utils.TimestampPriorityQueue,
|
140
|
+
sync_client_retries_enabled: bool,
|
141
|
+
): ...
|
142
|
+
async def add_items(self, items: list[modal_proto.api_pb2.FunctionPutInputsItem]): ...
|
143
|
+
async def prepare_items_for_retry(
|
144
|
+
self, retriable_idxs: list[int]
|
145
|
+
) -> list[modal_proto.api_pb2.FunctionRetryInputsItem]: ...
|
146
|
+
def get_input_jwts_waiting_for_output(self) -> list[str]: ...
|
147
|
+
def _remove_item(self, item_idx: int): ...
|
148
|
+
def get_item_context(self, item_idx: int) -> _MapItemContext: ...
|
149
|
+
def handle_put_inputs_response(self, items: list[modal_proto.api_pb2.FunctionPutInputsResponseItem]): ...
|
150
|
+
def handle_retry_response(self, input_jwts: list[str]): ...
|
151
|
+
async def handle_get_outputs_response(
|
152
|
+
self, item: modal_proto.api_pb2.FunctionGetOutputsItem, now_seconds: int
|
153
|
+
) -> _OutputType: ...
|
154
|
+
def __len__(self): ...
|
modal/retries.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Copyright Modal Labs 2022
|
2
|
-
import asyncio
|
3
2
|
from datetime import timedelta
|
3
|
+
from typing import Union
|
4
4
|
|
5
5
|
from modal_proto import api_pb2
|
6
6
|
|
@@ -116,17 +116,19 @@ class RetryManager:
|
|
116
116
|
|
117
117
|
def __init__(self, retry_policy: api_pb2.FunctionRetryPolicy):
|
118
118
|
self.retry_policy = retry_policy
|
119
|
-
self.
|
119
|
+
self.retry_count = 0
|
120
120
|
|
121
|
-
|
121
|
+
def get_delay_ms(self) -> Union[float, None]:
|
122
122
|
"""
|
123
|
-
|
123
|
+
Returns the delay in milliseconds before the next retry, or None
|
124
|
+
if the maximum number of retries has been reached.
|
124
125
|
"""
|
125
|
-
self.
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
126
|
+
self.retry_count += 1
|
127
|
+
|
128
|
+
if self.retry_count > self.retry_policy.retries:
|
129
|
+
return None
|
130
|
+
|
131
|
+
return self._retry_delay_ms(self.retry_count, self.retry_policy)
|
130
132
|
|
131
133
|
@staticmethod
|
132
134
|
def _retry_delay_ms(attempt_count: int, retry_policy: api_pb2.FunctionRetryPolicy) -> float:
|
@@ -3,7 +3,7 @@ modal/__main__.py,sha256=CgIjP8m1xJjjd4AXc-delmR6LdBCZclw2A_V38CFIio,2870
|
|
3
3
|
modal/_clustered_functions.py,sha256=kTf-9YBXY88NutC1akI-gCbvf01RhMPCw-zoOI_YIUE,2700
|
4
4
|
modal/_clustered_functions.pyi,sha256=vllkegc99A0jrUOWa8mdlSbdp6uz36TsHhGxysAOpaQ,771
|
5
5
|
modal/_container_entrypoint.py,sha256=arhkIoF8nQNfa4iwYGSoqN3QMDg5M38QNAODXC8TlKc,29301
|
6
|
-
modal/_functions.py,sha256=
|
6
|
+
modal/_functions.py,sha256=csh7ZeCfUSTcJv_dWjq0D94Eq5ivb31D-xJYD5LBrbg,73316
|
7
7
|
modal/_ipython.py,sha256=TW1fkVOmZL3YYqdS2YlM1hqpf654Yf8ZyybHdBnlhSw,301
|
8
8
|
modal/_location.py,sha256=joiX-0ZeutEUDTrrqLF1GHXCdVLF-rHzstocbMcd_-k,366
|
9
9
|
modal/_object.py,sha256=JBIECWdfpRKCaCxVWZbC3Q1kF5Whk_EKvY9f4Y6AFyg,11446
|
@@ -13,7 +13,7 @@ modal/_proxy_tunnel.py,sha256=gnKyCfmVB7x2d1A6c-JDysNIP3kEFxmXzhcXhPrzPn0,1906
|
|
13
13
|
modal/_pty.py,sha256=JZfPDDpzqICZqtyPI_oMJf_9w-p_lLNuzHhwhodUXio,1329
|
14
14
|
modal/_resolver.py,sha256=RtoXoYzSllPlFu0D1vel_FWiEmDO7RyToiC2bxeN8ZY,6917
|
15
15
|
modal/_resources.py,sha256=5qmcirXUI8dSH926nwkUaeX9H25mqYu9mXD_KuT79-o,1733
|
16
|
-
modal/_serialization.py,sha256=
|
16
|
+
modal/_serialization.py,sha256=DUM-RljUSoKYezLWlckn8GH46A3IWkx9QIUukWYhCxU,22021
|
17
17
|
modal/_traceback.py,sha256=IZQzB3fVlUfMHOSyKUgw0H6qv4yHnpyq-XVCNZKfUdA,5023
|
18
18
|
modal/_tunnel.py,sha256=zTBxBiuH1O22tS1OliAJdIsSmaZS8PlnifS_6S5z-mk,6320
|
19
19
|
modal/_tunnel.pyi,sha256=JmmDYAy9F1FpgJ_hWx0xkom2nTOFQjn4mTPYlU3PFo4,1245
|
@@ -22,11 +22,11 @@ modal/app.py,sha256=ojhuLZuNZAQ1OsbDH0k6G4pm1W7bOIvZfXbaKlvQ-Ao,45622
|
|
22
22
|
modal/app.pyi,sha256=tZFbcsu20SuvfB2puxCyuXLFNJ9bQulzag55rVpgZmc,26827
|
23
23
|
modal/call_graph.py,sha256=1g2DGcMIJvRy-xKicuf63IVE98gJSnQsr8R_NVMptNc,2581
|
24
24
|
modal/client.py,sha256=j9D3hNis1lfhnz9lVFGgJgowbH3PaGUzNKgHPWYG778,15372
|
25
|
-
modal/client.pyi,sha256=
|
25
|
+
modal/client.pyi,sha256=o7WUb0ztNmkP28C1tECtWjPivzD6vnBCwGL8fE0jb1k,7661
|
26
26
|
modal/cloud_bucket_mount.py,sha256=YOe9nnvSr4ZbeCn587d7_VhE9IioZYRvF9VYQTQux08,5914
|
27
27
|
modal/cloud_bucket_mount.pyi,sha256=30T3K1a89l6wzmEJ_J9iWv9SknoGqaZDx59Xs-ZQcmk,1607
|
28
|
-
modal/cls.py,sha256=
|
29
|
-
modal/cls.pyi,sha256=
|
28
|
+
modal/cls.py,sha256=PWXqCcBVOuYnp0Q5GY-bEldVyv_AnelApMyPiESYwrU,31410
|
29
|
+
modal/cls.pyi,sha256=ZJUwtRaQBGlM6tphvnv49FHBVDSgttMdD_LnYyRSKJM,10302
|
30
30
|
modal/config.py,sha256=Zx7YsllgIJzMRKeIkaGSLLtMFV4kTUvGxpptnmqlP1U,11623
|
31
31
|
modal/container_process.py,sha256=WTqLn01dJPVkPpwR_0w_JH96ceN5mV4TGtiu1ZR2RRA,6108
|
32
32
|
modal/container_process.pyi,sha256=Hf0J5JyDdCCXBJSKx6gvkPOo0XrztCm78xzxamtzUjQ,2828
|
@@ -41,9 +41,9 @@ modal/file_io.py,sha256=lcMs_E9Xfm0YX1t9U2wNIBPnqHRxmImqjLW1GHqVmyg,20945
|
|
41
41
|
modal/file_io.pyi,sha256=NTRft1tbPSWf9TlWVeZmTlgB5AZ_Zhu2srWIrWr7brk,9445
|
42
42
|
modal/file_pattern_matcher.py,sha256=trosX-Bp7dOubudN1bLLhRAoidWy1TcoaR4Pv8CedWw,6497
|
43
43
|
modal/functions.py,sha256=kcNHvqeGBxPI7Cgd57NIBBghkfbeFJzXO44WW0jSmao,325
|
44
|
-
modal/functions.pyi,sha256=
|
44
|
+
modal/functions.pyi,sha256=ujc6eIYyNmMn__4dpxEy85-vZmAniZv56D2A4uBgs6U,14377
|
45
45
|
modal/gpu.py,sha256=Kbhs_u49FaC2Zi0TjCdrpstpRtT5eZgecynmQi5IZVE,6752
|
46
|
-
modal/image.py,sha256=
|
46
|
+
modal/image.py,sha256=6hDizLZvRIjRy2cMWGT06Kj1uqW_L5B9GR6x3AKr4v4,92341
|
47
47
|
modal/image.pyi,sha256=DQ4DLOCPr6_yV7z4LS0bTY0rOyvQP9-dQOrzaW7pPG8,25260
|
48
48
|
modal/io_streams.py,sha256=h5O2LmbRoT9l777z3TQhCAm-JF1r7avZ2ykXlejztDs,15163
|
49
49
|
modal/io_streams.pyi,sha256=bJ7ZLmSmJ0nKoa6r4FJpbqvzdUVa0lEe0Fa-MMpMezU,5071
|
@@ -54,8 +54,8 @@ modal/network_file_system.pyi,sha256=4N3eqMbTSlqmS8VV_aJK-uvrgJC8xnf_YtW5FHfRfc8
|
|
54
54
|
modal/object.py,sha256=bTeskuY8JFrESjU4_UL_nTwYlBQdOLmVaOX3X6EMxsg,164
|
55
55
|
modal/object.pyi,sha256=kyJkRQcVv3ct7zSAxvvXcuhBVeH914v80uSlqeS7cA4,5632
|
56
56
|
modal/output.py,sha256=q4T9uHduunj4NwY-YSwkHGgjZlCXMuJbfQ5UFaAGRAc,1968
|
57
|
-
modal/parallel_map.py,sha256=
|
58
|
-
modal/parallel_map.pyi,sha256
|
57
|
+
modal/parallel_map.py,sha256=AB4YH4ZBGmCOe-X_1kB3hm-kNoRnOxCMzpkTUim4tT8,33586
|
58
|
+
modal/parallel_map.pyi,sha256=-D_z-K1GOpQcMSUMVHRVLr2rgEA5CXlX6dU5P6msa58,5671
|
59
59
|
modal/partial_function.py,sha256=uu8zvIV0Big0jiTlC4-VPL16dOScNB5jhfPeqxvvCrI,1117
|
60
60
|
modal/partial_function.pyi,sha256=-MAK61qJRi6Wjym-Measz5_9moJurYrJfdi7uSQZa5M,4936
|
61
61
|
modal/proxy.py,sha256=NrOevrWxG3G7-zlyRzG6BcIvop7AWLeyahZxitbBaOk,1418
|
@@ -63,7 +63,7 @@ modal/proxy.pyi,sha256=1OEKIVUyC-xb7fHMzngakQso0nTsK60TVhXtlcMj6Wk,390
|
|
63
63
|
modal/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
64
64
|
modal/queue.py,sha256=OIYmve1a4GTP54Vj2CcLatLPIAWToU7hWBNeu7IJiBY,18985
|
65
65
|
modal/queue.pyi,sha256=sgvELCK4bJXMZIZw7gllooGFZNipGjI3BT4rmUuyD9M,10282
|
66
|
-
modal/retries.py,sha256=
|
66
|
+
modal/retries.py,sha256=IvNLDM0f_GLUDD5VgEDoN09C88yoxSrCquinAuxT1Sc,5205
|
67
67
|
modal/runner.py,sha256=2VoA5jR9JwgPlmaGFWWOsSCGivS9Pv4-e-YFP9l92iE,25073
|
68
68
|
modal/runner.pyi,sha256=HW2pvC_PLwg1Es_EkrfQgMZsktIr9zzVEtmjOVFG6Dw,5351
|
69
69
|
modal/running_app.py,sha256=v61mapYNV1-O-Uaho5EfJlryMLvIT9We0amUOSvSGx8,1188
|
@@ -84,8 +84,8 @@ modal/volume.py,sha256=JAWeDvoAG95tMBv-fYIERyHsJPS_X_xGpxRRmYtb6j0,30096
|
|
84
84
|
modal/volume.pyi,sha256=kTsXarphjZILXci84LQy7EyC84eXUs5-7D62IM5q3eE,12491
|
85
85
|
modal/_runtime/__init__.py,sha256=MIEP8jhXUeGq_eCjYFcqN5b1bxBM4fdk0VESpjWR0fc,28
|
86
86
|
modal/_runtime/asgi.py,sha256=vmbrREjdCnxAeUyoUd1vtv7PfcR86IR0R2Jp1J6rEok,22435
|
87
|
-
modal/_runtime/container_io_manager.py,sha256=
|
88
|
-
modal/_runtime/container_io_manager.pyi,sha256=
|
87
|
+
modal/_runtime/container_io_manager.py,sha256=EPprznbVbA9hEinJj6RqwizTyC0hGoBvZ25ptZhMMt0,43876
|
88
|
+
modal/_runtime/container_io_manager.pyi,sha256=H3HOnJR3fw1EOQG66izBWVFvyYDS4J2Ohr8oD349WRo,16803
|
89
89
|
modal/_runtime/execution_context.py,sha256=E6ofm6j1POXGPxS841X3V7JU6NheVb8OkQc7JpLq4Kg,2712
|
90
90
|
modal/_runtime/execution_context.pyi,sha256=wQZwMNADExkeNdB9yKX0PPojovxlFHbap3441wAsiMY,634
|
91
91
|
modal/_runtime/gpu_memory_snapshot.py,sha256=tA3m1d1cwnmHpvpCeN_WijDd6n8byn7LWlpicbIxiOI,3144
|
@@ -93,17 +93,18 @@ modal/_runtime/telemetry.py,sha256=T1RoAGyjBDr1swiM6pPsGRSITm7LI5FDK18oNXxY08U,5
|
|
93
93
|
modal/_runtime/user_code_imports.py,sha256=OTxf5BIwMOaHFplIxxyEAOsR-xM2f5kSiSOa9Ne2le0,14814
|
94
94
|
modal/_utils/__init__.py,sha256=waLjl5c6IPDhSsdWAm9Bji4e2PVxamYABKAze6CHVXY,28
|
95
95
|
modal/_utils/app_utils.py,sha256=88BT4TPLWfYAQwKTHcyzNQRHg8n9B-QE2UyJs96iV-0,108
|
96
|
-
modal/_utils/async_utils.py,sha256=
|
96
|
+
modal/_utils/async_utils.py,sha256=b2TJyKY1Hq7df7M-fo3qlFM95mGdo3dCuqRPPcV5hsE,27445
|
97
97
|
modal/_utils/blob_utils.py,sha256=RB1G6T7eC1Poe-O45qYLaxwCr2jkM-Q6Nexk1J3wk_w,14505
|
98
98
|
modal/_utils/bytes_io_segment_payload.py,sha256=uunxVJS4PE1LojF_UpURMzVK9GuvmYWRqQo_bxEj5TU,3385
|
99
99
|
modal/_utils/deprecation.py,sha256=EXP1beU4pmEqEzWMLw6E3kUfNfpmNA_VOp6i0EHi93g,4856
|
100
100
|
modal/_utils/docker_utils.py,sha256=h1uETghR40mp_y3fSWuZAfbIASH1HMzuphJHghAL6DU,3722
|
101
|
-
modal/_utils/function_utils.py,sha256=
|
101
|
+
modal/_utils/function_utils.py,sha256=oWpeCvDQgsbjz3jUZPJ5LVgZO63OqY1ut3BNh8HJ-JM,27732
|
102
102
|
modal/_utils/git_utils.py,sha256=qtUU6JAttF55ZxYq51y55OR58B0tDPZsZWK5dJe6W5g,3182
|
103
103
|
modal/_utils/grpc_testing.py,sha256=H1zHqthv19eGPJz2HKXDyWXWGSqO4BRsxah3L5Xaa8A,8619
|
104
104
|
modal/_utils/grpc_utils.py,sha256=wmMydVKN9YbugTwUXuOuzxbpzYvxkTDaFRxlBtIDE_0,8526
|
105
105
|
modal/_utils/hash_utils.py,sha256=zg3J6OGxTFGSFri1qQ12giDz90lWk8bzaxCTUCRtiX4,3034
|
106
106
|
modal/_utils/http_utils.py,sha256=yeTFsXYr0rYMEhB7vBP7audG9Uc7OLhzKBANFDZWVt0,2451
|
107
|
+
modal/_utils/jwt_utils.py,sha256=fxH9plyrbAemTbjSsQtzIdDXE9QXxvMC4DiUZ16G0aA,1360
|
107
108
|
modal/_utils/logger.py,sha256=ePzdudrtx9jJCjuO6-bcL_kwUJfi4AwloUmIiNtqkY0,1330
|
108
109
|
modal/_utils/mount_utils.py,sha256=gGCgIlWwYiJbUtgFY2GJcWYismYvazbMAeUOgf7NhFQ,3205
|
109
110
|
modal/_utils/name_utils.py,sha256=TW1iyJedvDNPEJ5UVp93u8xuD5J2gQL_CUt1mgov_aI,1939
|
@@ -118,7 +119,7 @@ modal/_vendor/tblib.py,sha256=g1O7QUDd3sDoLd8YPFltkXkih7r_fyZOjgmGuligv3s,9722
|
|
118
119
|
modal/cli/__init__.py,sha256=waLjl5c6IPDhSsdWAm9Bji4e2PVxamYABKAze6CHVXY,28
|
119
120
|
modal/cli/_download.py,sha256=t6BXZwjTd9MgznDvbsV8rp0FZWggdzC-lUAGZU4xx1g,3984
|
120
121
|
modal/cli/_traceback.py,sha256=QlLa_iw3fAOA-mqCqjS8qAxvNT48J3YY3errtVVc2cw,7316
|
121
|
-
modal/cli/app.py,sha256=
|
122
|
+
modal/cli/app.py,sha256=87LWg3bTQQIHFOqs8iiJYD_X03omXBZ6lFYR0rMJV-I,8433
|
122
123
|
modal/cli/config.py,sha256=QvFsqO4eUOtI7d_pQAOAyfq_ZitjhPtav3C6GIDQcZM,1680
|
123
124
|
modal/cli/container.py,sha256=FYwEgjf93j4NMorAjGbSV98i1wpebqdAeNU1wfrFp1k,3668
|
124
125
|
modal/cli/dict.py,sha256=8Wq3w-UDaywk8EVNdj-ECCNV9TYHqh4kzhUqhhulatM,4593
|
@@ -153,13 +154,13 @@ modal_docs/mdmd/__init__.py,sha256=svYKtV8HDwDCN86zbdWqyq5T8sMdGDj0PVlzc2tIxDM,2
|
|
153
154
|
modal_docs/mdmd/mdmd.py,sha256=Irx49MCCTlBOP4FBdLR--JrpA3-WhsVeriq0LGgsRic,6232
|
154
155
|
modal_docs/mdmd/signatures.py,sha256=XJaZrK7Mdepk5fdX51A8uENiLFNil85Ud0d4MH8H5f0,3218
|
155
156
|
modal_proto/__init__.py,sha256=MIEP8jhXUeGq_eCjYFcqN5b1bxBM4fdk0VESpjWR0fc,28
|
156
|
-
modal_proto/api.proto,sha256=
|
157
|
-
modal_proto/api_grpc.py,sha256=
|
158
|
-
modal_proto/api_pb2.py,sha256=
|
159
|
-
modal_proto/api_pb2.pyi,sha256=
|
160
|
-
modal_proto/api_pb2_grpc.py,sha256=
|
161
|
-
modal_proto/api_pb2_grpc.pyi,sha256=
|
162
|
-
modal_proto/modal_api_grpc.py,sha256=
|
157
|
+
modal_proto/api.proto,sha256=6xhnFkmsqP8cThFDUNcAPQgYmAaukqjMVjRKAdmapVA,87786
|
158
|
+
modal_proto/api_grpc.py,sha256=SJOfs3Y1cOzzF_ZcDj-UNnOWz59sfU8a4JISp4Y_1Kw,109923
|
159
|
+
modal_proto/api_pb2.py,sha256=rbdtVZY39LuPezotOMsOUbMqvoPIhZblevLqDy0r2dA,315544
|
160
|
+
modal_proto/api_pb2.pyi,sha256=sIbeFpkte0acPdDUQ26Nz6at9VWTzkeHuMBwk_CuzKM,426646
|
161
|
+
modal_proto/api_pb2_grpc.py,sha256=0XeCIL2B6UGLBh1MEGPFPz1k8qLWNyp-yj_cJrK3NE8,237541
|
162
|
+
modal_proto/api_pb2_grpc.pyi,sha256=BsnRBinG0KC9Cp70UkdxuzgZA9KLCTl7T5ze0RK-Mmk,55323
|
163
|
+
modal_proto/modal_api_grpc.py,sha256=i9HTreJ5FpBvtz9NwuTC52fZTWZO_M_DWdIYT2lOjs8,14666
|
163
164
|
modal_proto/modal_options_grpc.py,sha256=qJ1cuwA54oRqrdTyPTbvfhFZYd9HhJKK5UCwt523r3Y,120
|
164
165
|
modal_proto/options.proto,sha256=a-siq4swVbZPfaFRXAipRZzGP2bq8OsdUvjlyzAeodQ,488
|
165
166
|
modal_proto/options_grpc.py,sha256=M18X3d-8F_cNYSVM3I25dUTO5rZ0rd-vCCfynfh13Nc,125
|
@@ -170,10 +171,10 @@ modal_proto/options_pb2_grpc.pyi,sha256=CImmhxHsYnF09iENPoe8S4J-n93jtgUYD2JPAc0y
|
|
170
171
|
modal_proto/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
171
172
|
modal_version/__init__.py,sha256=wiJQ53c-OMs0Xf1UeXOxQ7FwlV1VzIjnX6o-pRYZ_Pk,470
|
172
173
|
modal_version/__main__.py,sha256=2FO0yYQQwDTh6udt1h-cBnGd1c4ZyHnHSI4BksxzVac,105
|
173
|
-
modal_version/_version_generated.py,sha256=
|
174
|
-
modal-0.73.
|
175
|
-
modal-0.73.
|
176
|
-
modal-0.73.
|
177
|
-
modal-0.73.
|
178
|
-
modal-0.73.
|
179
|
-
modal-0.73.
|
174
|
+
modal_version/_version_generated.py,sha256=N3-ozfWU5EauDyfN9CQOyvG2WmMHD3l38ewrSfddkME,150
|
175
|
+
modal-0.73.126.dist-info/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
|
176
|
+
modal-0.73.126.dist-info/METADATA,sha256=NniJfmCWzeCudS3OWlLTeZopwkFQgMC4fp-20kPk0_Q,2453
|
177
|
+
modal-0.73.126.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
|
178
|
+
modal-0.73.126.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
|
179
|
+
modal-0.73.126.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
|
180
|
+
modal-0.73.126.dist-info/RECORD,,
|
modal_proto/api.proto
CHANGED
@@ -172,6 +172,7 @@ enum ParameterType {
|
|
172
172
|
PARAM_TYPE_INT = 2;
|
173
173
|
PARAM_TYPE_PICKLE = 3;
|
174
174
|
PARAM_TYPE_BYTES = 4;
|
175
|
+
PARAM_TYPE_UNKNOWN = 5; // used in schemas to signify unrecognized or un-annotated types
|
175
176
|
}
|
176
177
|
|
177
178
|
enum ProgressType {
|
@@ -2327,6 +2328,17 @@ message SandboxGetLogsRequest {
|
|
2327
2328
|
string last_entry_id = 4;
|
2328
2329
|
}
|
2329
2330
|
|
2331
|
+
message SandboxGetResourceUsageRequest {
|
2332
|
+
string sandbox_id = 1;
|
2333
|
+
}
|
2334
|
+
|
2335
|
+
message SandboxGetResourceUsageResponse {
|
2336
|
+
uint64 cpu_core_nanosecs = 1;
|
2337
|
+
uint64 mem_gib_nanosecs = 2;
|
2338
|
+
uint64 gpu_nanosecs = 3;
|
2339
|
+
optional string gpu_type = 4;
|
2340
|
+
}
|
2341
|
+
|
2330
2342
|
message SandboxGetTaskIdRequest {
|
2331
2343
|
string sandbox_id = 1;
|
2332
2344
|
optional float timeout = 2; // Legacy clients do not provide a timeout. New clients must always provide a timeout.
|
@@ -3041,6 +3053,7 @@ service ModalClient {
|
|
3041
3053
|
// Sandboxes
|
3042
3054
|
rpc SandboxCreate(SandboxCreateRequest) returns (SandboxCreateResponse);
|
3043
3055
|
rpc SandboxGetLogs(SandboxGetLogsRequest) returns (stream TaskLogsBatch);
|
3056
|
+
rpc SandboxGetResourceUsage(SandboxGetResourceUsageRequest) returns (SandboxGetResourceUsageResponse);
|
3044
3057
|
rpc SandboxGetTaskId(SandboxGetTaskIdRequest) returns (SandboxGetTaskIdResponse); // needed for modal container exec
|
3045
3058
|
rpc SandboxGetTunnels(SandboxGetTunnelsRequest) returns (SandboxGetTunnelsResponse);
|
3046
3059
|
rpc SandboxList(SandboxListRequest) returns (SandboxListResponse);
|
modal_proto/api_grpc.py
CHANGED
@@ -406,6 +406,10 @@ class ModalClientBase(abc.ABC):
|
|
406
406
|
async def SandboxGetLogs(self, stream: 'grpclib.server.Stream[modal_proto.api_pb2.SandboxGetLogsRequest, modal_proto.api_pb2.TaskLogsBatch]') -> None:
|
407
407
|
pass
|
408
408
|
|
409
|
+
@abc.abstractmethod
|
410
|
+
async def SandboxGetResourceUsage(self, stream: 'grpclib.server.Stream[modal_proto.api_pb2.SandboxGetResourceUsageRequest, modal_proto.api_pb2.SandboxGetResourceUsageResponse]') -> None:
|
411
|
+
pass
|
412
|
+
|
409
413
|
@abc.abstractmethod
|
410
414
|
async def SandboxGetTaskId(self, stream: 'grpclib.server.Stream[modal_proto.api_pb2.SandboxGetTaskIdRequest, modal_proto.api_pb2.SandboxGetTaskIdResponse]') -> None:
|
411
415
|
pass
|
@@ -1170,6 +1174,12 @@ class ModalClientBase(abc.ABC):
|
|
1170
1174
|
modal_proto.api_pb2.SandboxGetLogsRequest,
|
1171
1175
|
modal_proto.api_pb2.TaskLogsBatch,
|
1172
1176
|
),
|
1177
|
+
'/modal.client.ModalClient/SandboxGetResourceUsage': grpclib.const.Handler(
|
1178
|
+
self.SandboxGetResourceUsage,
|
1179
|
+
grpclib.const.Cardinality.UNARY_UNARY,
|
1180
|
+
modal_proto.api_pb2.SandboxGetResourceUsageRequest,
|
1181
|
+
modal_proto.api_pb2.SandboxGetResourceUsageResponse,
|
1182
|
+
),
|
1173
1183
|
'/modal.client.ModalClient/SandboxGetTaskId': grpclib.const.Handler(
|
1174
1184
|
self.SandboxGetTaskId,
|
1175
1185
|
grpclib.const.Cardinality.UNARY_UNARY,
|
@@ -2028,6 +2038,12 @@ class ModalClientStub:
|
|
2028
2038
|
modal_proto.api_pb2.SandboxGetLogsRequest,
|
2029
2039
|
modal_proto.api_pb2.TaskLogsBatch,
|
2030
2040
|
)
|
2041
|
+
self.SandboxGetResourceUsage = grpclib.client.UnaryUnaryMethod(
|
2042
|
+
channel,
|
2043
|
+
'/modal.client.ModalClient/SandboxGetResourceUsage',
|
2044
|
+
modal_proto.api_pb2.SandboxGetResourceUsageRequest,
|
2045
|
+
modal_proto.api_pb2.SandboxGetResourceUsageResponse,
|
2046
|
+
)
|
2031
2047
|
self.SandboxGetTaskId = grpclib.client.UnaryUnaryMethod(
|
2032
2048
|
channel,
|
2033
2049
|
'/modal.client.ModalClient/SandboxGetTaskId',
|