modal 0.73.116__py3-none-any.whl → 0.73.128__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/__init__.py +2 -0
- modal/_functions.py +19 -8
- modal/_partial_function.py +54 -0
- 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/app.py +34 -5
- modal/app.pyi +3 -2
- modal/cli/app.py +15 -0
- modal/client.pyi +2 -2
- modal/cls.py +3 -13
- modal/cls.pyi +0 -2
- modal/functions.pyi +8 -7
- modal/parallel_map.py +393 -44
- modal/parallel_map.pyi +75 -0
- modal/partial_function.py +2 -0
- modal/partial_function.pyi +9 -0
- modal/retries.py +11 -9
- modal/sandbox.py +5 -1
- {modal-0.73.116.dist-info → modal-0.73.128.dist-info}/METADATA +1 -1
- {modal-0.73.116.dist-info → modal-0.73.128.dist-info}/RECORD +36 -35
- {modal-0.73.116.dist-info → modal-0.73.128.dist-info}/WHEEL +1 -1
- modal_proto/api.proto +15 -2
- modal_proto/api_grpc.py +16 -0
- modal_proto/api_pb2.py +284 -263
- modal_proto/api_pb2.pyi +49 -6
- 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.116.dist-info → modal-0.73.128.dist-info}/LICENSE +0 -0
- {modal-0.73.116.dist-info → modal-0.73.128.dist-info}/entry_points.txt +0 -0
- {modal-0.73.116.dist-info → modal-0.73.128.dist-info}/top_level.txt +0 -0
modal/partial_function.pyi
CHANGED
@@ -18,6 +18,8 @@ class PartialFunction(
|
|
18
18
|
force_build: bool
|
19
19
|
cluster_size: typing.Optional[int]
|
20
20
|
build_timeout: typing.Optional[int]
|
21
|
+
max_concurrent_inputs: typing.Optional[int]
|
22
|
+
target_concurrent_inputs: typing.Optional[int]
|
21
23
|
|
22
24
|
def __init__(
|
23
25
|
self,
|
@@ -31,6 +33,8 @@ class PartialFunction(
|
|
31
33
|
cluster_size: typing.Optional[int] = None,
|
32
34
|
force_build: bool = False,
|
33
35
|
build_timeout: typing.Optional[int] = None,
|
36
|
+
max_concurrent_inputs: typing.Optional[int] = None,
|
37
|
+
target_concurrent_inputs: typing.Optional[int] = None,
|
34
38
|
): ...
|
35
39
|
def _get_raw_f(self) -> collections.abc.Callable[modal._partial_function.P, modal._partial_function.ReturnType]: ...
|
36
40
|
def _is_web_endpoint(self) -> bool: ...
|
@@ -118,3 +122,8 @@ def exit(
|
|
118
122
|
def batched(
|
119
123
|
_warn_parentheses_missing=None, *, max_batch_size: int, wait_ms: int
|
120
124
|
) -> collections.abc.Callable[[collections.abc.Callable[..., typing.Any]], PartialFunction]: ...
|
125
|
+
def concurrent(
|
126
|
+
_warn_parentheses_missing=None, *, max_inputs: int, target_inputs: typing.Optional[int] = None
|
127
|
+
) -> collections.abc.Callable[
|
128
|
+
[typing.Union[collections.abc.Callable[..., typing.Any], PartialFunction]], PartialFunction
|
129
|
+
]: ...
|
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:
|
modal/sandbox.py
CHANGED
@@ -44,7 +44,11 @@ _default_image: _Image = _Image.debian_slim()
|
|
44
44
|
# The maximum number of bytes that can be passed to an exec on Linux.
|
45
45
|
# Though this is technically a 'server side' limit, it is unlikely to change.
|
46
46
|
# getconf ARG_MAX will show this value on a host.
|
47
|
-
|
47
|
+
#
|
48
|
+
# By probing in production, the limit is 131072 bytes (2**17).
|
49
|
+
# We need some bytes of overhead for the rest of the command line besides the args,
|
50
|
+
# e.g. 'runsc exec ...'. So we use 2**16 as the limit.
|
51
|
+
ARG_MAX_BYTES = 2**16
|
48
52
|
|
49
53
|
if TYPE_CHECKING:
|
50
54
|
import modal.app
|
@@ -1,32 +1,32 @@
|
|
1
|
-
modal/__init__.py,sha256=
|
1
|
+
modal/__init__.py,sha256=7wz1AT_bpWJJEzXsAo3QMb7i87y7UGXwfneb0bGDhRg,2502
|
2
2
|
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=L-8wuokczWuD3xRqZKT4NkgO4tqKV3Cze_9KITgHdmc,73441
|
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
|
10
10
|
modal/_output.py,sha256=Z0nngPh2mKHMQc4MQ92YjVPc3ewOLa3I4dFBlL9nvQY,25656
|
11
|
-
modal/_partial_function.py,sha256=
|
11
|
+
modal/_partial_function.py,sha256=Qr4smy6ndZUDwEHpe_T9KJZ-z8DpoH_Ipj9PqAIifx8,33044
|
12
12
|
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
|
20
20
|
modal/_watcher.py,sha256=K6LYnlmSGQB4tWWI9JADv-tvSvQ1j522FwT71B51CX8,3584
|
21
|
-
modal/app.py,sha256=
|
22
|
-
modal/app.pyi,sha256=
|
21
|
+
modal/app.py,sha256=NKH7Cw1M6eyyrMXFbhWfdo3uRd28-8kv0Pcw56kPiPU,47312
|
22
|
+
modal/app.pyi,sha256=pUEqciyGZ446sc_QoG8XcQ_oc6oU-U4dqjkxjhgOX98,26968
|
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=nZCWs5u7jbU0Bnr2FXjfkhvNtNbJ7gKRdbe6gH2tT3g,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,7 +41,7 @@ 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=PqApQjvICj11NIMEVCmaUIUyJUfEIuY_KkEzCZ4t6iI,14438
|
45
45
|
modal/gpu.py,sha256=Kbhs_u49FaC2Zi0TjCdrpstpRtT5eZgecynmQi5IZVE,6752
|
46
46
|
modal/image.py,sha256=6hDizLZvRIjRy2cMWGT06Kj1uqW_L5B9GR6x3AKr4v4,92341
|
47
47
|
modal/image.pyi,sha256=DQ4DLOCPr6_yV7z4LS0bTY0rOyvQP9-dQOrzaW7pPG8,25260
|
@@ -54,20 +54,20 @@ 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
|
59
|
-
modal/partial_function.py,sha256=
|
60
|
-
modal/partial_function.pyi,sha256=-
|
57
|
+
modal/parallel_map.py,sha256=AB4YH4ZBGmCOe-X_1kB3hm-kNoRnOxCMzpkTUim4tT8,33586
|
58
|
+
modal/parallel_map.pyi,sha256=-D_z-K1GOpQcMSUMVHRVLr2rgEA5CXlX6dU5P6msa58,5671
|
59
|
+
modal/partial_function.py,sha256=y0h-EvlPnfvZr7nlJLOFk7NB-K-ZO41XJnsGtQTesAI,1200
|
60
|
+
modal/partial_function.pyi,sha256=-xWrvFMhLT6ulx9B82u1g8kL69vt3nYAvp8pV0d__uw,5407
|
61
61
|
modal/proxy.py,sha256=NrOevrWxG3G7-zlyRzG6BcIvop7AWLeyahZxitbBaOk,1418
|
62
62
|
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
|
70
|
-
modal/sandbox.py,sha256=
|
70
|
+
modal/sandbox.py,sha256=effbnWXqLwxj5ix7fFHyq3n5FJHtuv2qzpdN7XLZ4ds,32619
|
71
71
|
modal/sandbox.pyi,sha256=cLmSwI1ab-2DgEuXNf6S1PiK63wfUR9dHtxlZtSOuX8,22719
|
72
72
|
modal/schedule.py,sha256=0ZFpKs1bOxeo5n3HZjoL7OE2ktsb-_oGtq-WJEPO4tY,2615
|
73
73
|
modal/scheduler_placement.py,sha256=BAREdOY5HzHpzSBqt6jDVR6YC_jYfHMVqOzkyqQfngU,1235
|
@@ -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=94F7C-OQg0Xj_By2XztAGkQD4zRus5o7gy26viQADFo,87786
|
158
|
+
modal_proto/api_grpc.py,sha256=SJOfs3Y1cOzzF_ZcDj-UNnOWz59sfU8a4JISp4Y_1Kw,109923
|
159
|
+
modal_proto/api_pb2.py,sha256=UzgHEmSdZwWJxsoho67clTWH8uXlpICe7p_jtaHPRrA,315544
|
160
|
+
modal_proto/api_pb2.pyi,sha256=WBRQRWufW08Nw8r9qlRZFiBgWsDMI5PN7gNXZKS7D08,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=UV2vFNSRCipcz3159A83mk2Cakl8UFhOaMaL-i9YTPY,150
|
175
|
+
modal-0.73.128.dist-info/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
|
176
|
+
modal-0.73.128.dist-info/METADATA,sha256=5Xr1wyl6HVCsIC2KYo1Kmb93AF0F0Fzfbza3EEGIHro,2453
|
177
|
+
modal-0.73.128.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
|
178
|
+
modal-0.73.128.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
|
179
|
+
modal-0.73.128.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
|
180
|
+
modal-0.73.128.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 {
|
@@ -1215,7 +1216,7 @@ message Function {
|
|
1215
1216
|
|
1216
1217
|
repeated VolumeMount volume_mounts = 33;
|
1217
1218
|
|
1218
|
-
uint32
|
1219
|
+
uint32 max_concurrent_inputs = 34;
|
1219
1220
|
|
1220
1221
|
repeated CustomDomainInfo custom_domain_info = 35;
|
1221
1222
|
|
@@ -1265,7 +1266,7 @@ message Function {
|
|
1265
1266
|
uint64 batch_linger_ms = 61; // Miliseconds to block before a response is needed
|
1266
1267
|
bool i6pn_enabled = 62;
|
1267
1268
|
bool _experimental_concurrent_cancellations = 63;
|
1268
|
-
uint32
|
1269
|
+
uint32 target_concurrent_inputs = 64;
|
1269
1270
|
|
1270
1271
|
// TODO(irfansharif): Remove, once https://github.com/modal-labs/modal/pull/15645 lands.
|
1271
1272
|
bool _experimental_task_templates_enabled = 65; // forces going through the new gpu-fallbacks integration path, even if no fallback options are specified
|
@@ -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',
|