modal 0.73.34__py3-none-any.whl → 0.73.35__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 +8 -0
- modal/client.pyi +2 -2
- modal/functions.pyi +6 -6
- {modal-0.73.34.dist-info → modal-0.73.35.dist-info}/METADATA +1 -1
- {modal-0.73.34.dist-info → modal-0.73.35.dist-info}/RECORD +13 -13
- modal_proto/api.proto +7 -4
- modal_proto/api_pb2.py +542 -542
- modal_proto/api_pb2.pyi +11 -2
- modal_version/_version_generated.py +1 -1
- {modal-0.73.34.dist-info → modal-0.73.35.dist-info}/LICENSE +0 -0
- {modal-0.73.34.dist-info → modal-0.73.35.dist-info}/WHEEL +0 -0
- {modal-0.73.34.dist-info → modal-0.73.35.dist-info}/entry_points.txt +0 -0
- {modal-0.73.34.dist-info → modal-0.73.35.dist-info}/top_level.txt +0 -0
modal/_functions.py
CHANGED
@@ -619,6 +619,13 @@ class _Function(typing.Generic[P, ReturnType, OriginalReturnType], _Object, type
|
|
619
619
|
f"strictly less than its `{keep_warm=}` parameter."
|
620
620
|
)
|
621
621
|
|
622
|
+
autoscaler_settings = api_pb2.AutoscalerSettings(
|
623
|
+
max_containers=concurrency_limit,
|
624
|
+
min_containers=keep_warm,
|
625
|
+
buffer_containers=_experimental_buffer_containers,
|
626
|
+
scaledown_window=container_idle_timeout,
|
627
|
+
)
|
628
|
+
|
622
629
|
if _experimental_custom_scaling_factor is not None and (
|
623
630
|
_experimental_custom_scaling_factor < 0 or _experimental_custom_scaling_factor > 1
|
624
631
|
):
|
@@ -802,6 +809,7 @@ class _Function(typing.Generic[P, ReturnType, OriginalReturnType], _Object, type
|
|
802
809
|
class_serialized=class_serialized or b"",
|
803
810
|
function_type=function_type,
|
804
811
|
webhook_config=webhook_config,
|
812
|
+
autoscaler_settings=autoscaler_settings,
|
805
813
|
method_definitions=method_definitions,
|
806
814
|
method_definitions_set=True,
|
807
815
|
shared_volume_mounts=network_file_system_mount_protos(
|
modal/client.pyi
CHANGED
@@ -27,7 +27,7 @@ class _Client:
|
|
27
27
|
_snapshotted: bool
|
28
28
|
|
29
29
|
def __init__(
|
30
|
-
self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.73.
|
30
|
+
self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.73.35"
|
31
31
|
): ...
|
32
32
|
def is_closed(self) -> bool: ...
|
33
33
|
@property
|
@@ -85,7 +85,7 @@ class Client:
|
|
85
85
|
_snapshotted: bool
|
86
86
|
|
87
87
|
def __init__(
|
88
|
-
self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.73.
|
88
|
+
self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.73.35"
|
89
89
|
): ...
|
90
90
|
def is_closed(self) -> bool: ...
|
91
91
|
@property
|
modal/functions.pyi
CHANGED
@@ -198,11 +198,11 @@ class Function(
|
|
198
198
|
|
199
199
|
_call_generator_nowait: ___call_generator_nowait_spec[typing_extensions.Self]
|
200
200
|
|
201
|
-
class __remote_spec(typing_extensions.Protocol[
|
201
|
+
class __remote_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
|
202
202
|
def __call__(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER: ...
|
203
203
|
async def aio(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER: ...
|
204
204
|
|
205
|
-
remote: __remote_spec[modal._functions.
|
205
|
+
remote: __remote_spec[modal._functions.P, modal._functions.ReturnType, typing_extensions.Self]
|
206
206
|
|
207
207
|
class __remote_gen_spec(typing_extensions.Protocol[SUPERSELF]):
|
208
208
|
def __call__(self, *args, **kwargs) -> typing.Generator[typing.Any, None, None]: ...
|
@@ -217,19 +217,19 @@ class Function(
|
|
217
217
|
self, *args: modal._functions.P.args, **kwargs: modal._functions.P.kwargs
|
218
218
|
) -> modal._functions.OriginalReturnType: ...
|
219
219
|
|
220
|
-
class ___experimental_spawn_spec(typing_extensions.Protocol[
|
220
|
+
class ___experimental_spawn_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
|
221
221
|
def __call__(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
|
222
222
|
async def aio(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
|
223
223
|
|
224
224
|
_experimental_spawn: ___experimental_spawn_spec[
|
225
|
-
modal._functions.
|
225
|
+
modal._functions.P, modal._functions.ReturnType, typing_extensions.Self
|
226
226
|
]
|
227
227
|
|
228
|
-
class __spawn_spec(typing_extensions.Protocol[
|
228
|
+
class __spawn_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
|
229
229
|
def __call__(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
|
230
230
|
async def aio(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
|
231
231
|
|
232
|
-
spawn: __spawn_spec[modal._functions.
|
232
|
+
spawn: __spawn_spec[modal._functions.P, modal._functions.ReturnType, typing_extensions.Self]
|
233
233
|
|
234
234
|
def get_raw_f(self) -> collections.abc.Callable[..., typing.Any]: ...
|
235
235
|
|
@@ -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=YtfJ852XUDtAWBD-yVs99zy933-VBEKQyIngEj36Qcw,29286
|
6
|
-
modal/_functions.py,sha256=
|
6
|
+
modal/_functions.py,sha256=Jf1ImQxyNQKHw6ylEUxyTcYwKWWcH5CoilpfZ_tm72g,71510
|
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=ItQcsMNkz9Y3kdTsvfNarbW-paJ2qabDyQ7njaqY0XI,11359
|
@@ -22,7 +22,7 @@ modal/app.py,sha256=rCOPD51gVyow8muyaqMuV65qfTnAZKf_w1OCZdSF_6o,44636
|
|
22
22
|
modal/app.pyi,sha256=0MMCgskIL4r3eq8oBcfm2lLyeao2gXjS3iXaIfmaJ-o,25959
|
23
23
|
modal/call_graph.py,sha256=1g2DGcMIJvRy-xKicuf63IVE98gJSnQsr8R_NVMptNc,2581
|
24
24
|
modal/client.py,sha256=8SQawr7P1PNUCq1UmJMUQXG2jIo4Nmdcs311XqrNLRE,15276
|
25
|
-
modal/client.pyi,sha256=
|
25
|
+
modal/client.pyi,sha256=zGuFnRO-zNyaRSP8S64WcfhirY9_306lnDr7xCpb_fA,7593
|
26
26
|
modal/cloud_bucket_mount.py,sha256=YOe9nnvSr4ZbeCn587d7_VhE9IioZYRvF9VYQTQux08,5914
|
27
27
|
modal/cloud_bucket_mount.pyi,sha256=30T3K1a89l6wzmEJ_J9iWv9SknoGqaZDx59Xs-ZQcmk,1607
|
28
28
|
modal/cls.py,sha256=5Er9L9tGpLGIrbiHOI7c9266gPG6nhxoJ_BX8op96nU,31096
|
@@ -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=R8aCATbAInu3ujJjWh4kASdTmref8Ysnj3X4Bu77ID0,14255
|
45
45
|
modal/gpu.py,sha256=Kbhs_u49FaC2Zi0TjCdrpstpRtT5eZgecynmQi5IZVE,6752
|
46
46
|
modal/image.py,sha256=KYc6bg-m9A6wiLF38dWcFBMrEATyR2KOF0sp-6O9uC0,91508
|
47
47
|
modal/image.pyi,sha256=kMkIDHcyyhA7BC2Vrx0RfrLEsqK8Ng2-IqUKL-CJexI,26250
|
@@ -155,10 +155,10 @@ modal_global_objects/mounts/__init__.py,sha256=MIEP8jhXUeGq_eCjYFcqN5b1bxBM4fdk0
|
|
155
155
|
modal_global_objects/mounts/modal_client_package.py,sha256=W0E_yShsRojPzWm6LtIQqNVolapdnrZkm2hVEQuZK_4,767
|
156
156
|
modal_global_objects/mounts/python_standalone.py,sha256=EsC-hdPtiAPOwgW9emHN6muNUkrJwR8dYxroVArxHxM,1841
|
157
157
|
modal_proto/__init__.py,sha256=MIEP8jhXUeGq_eCjYFcqN5b1bxBM4fdk0VESpjWR0fc,28
|
158
|
-
modal_proto/api.proto,sha256
|
158
|
+
modal_proto/api.proto,sha256=VfozLNIfiwjLeydRVqELpF8giGhmvCOIh63ICyZtuV8,86834
|
159
159
|
modal_proto/api_grpc.py,sha256=FYGqDegM_w_qxdtlxum8k31mDibKoMvmNxv_p9cKdKs,109056
|
160
|
-
modal_proto/api_pb2.py,sha256=
|
161
|
-
modal_proto/api_pb2.pyi,sha256=
|
160
|
+
modal_proto/api_pb2.py,sha256=IPpA4du84rbeP1flUQDlpuxfZD5U-c8NLdSCKhVHyNU,312354
|
161
|
+
modal_proto/api_pb2.pyi,sha256=HD8mwmTsXY36NPlwMRgEGcmQeFawr0_GFlEimr34K8M,420831
|
162
162
|
modal_proto/api_pb2_grpc.py,sha256=DNp0Et5i_Ey4dKx_1o1LRtYhyWYyT0NzTcAY4EcHn-c,235765
|
163
163
|
modal_proto/api_pb2_grpc.pyi,sha256=RI6tWC3L8EIN4-izFSEGPPJl5Ta0lXPNuHUJaWAr35s,54892
|
164
164
|
modal_proto/modal_api_grpc.py,sha256=UG8WJU81afrWPwItWB4Ag64E9EpyREMpBbAVGVEYJiM,14550
|
@@ -172,10 +172,10 @@ modal_proto/options_pb2_grpc.pyi,sha256=CImmhxHsYnF09iENPoe8S4J-n93jtgUYD2JPAc0y
|
|
172
172
|
modal_proto/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
173
173
|
modal_version/__init__.py,sha256=wiJQ53c-OMs0Xf1UeXOxQ7FwlV1VzIjnX6o-pRYZ_Pk,470
|
174
174
|
modal_version/__main__.py,sha256=2FO0yYQQwDTh6udt1h-cBnGd1c4ZyHnHSI4BksxzVac,105
|
175
|
-
modal_version/_version_generated.py,sha256=
|
176
|
-
modal-0.73.
|
177
|
-
modal-0.73.
|
178
|
-
modal-0.73.
|
179
|
-
modal-0.73.
|
180
|
-
modal-0.73.
|
181
|
-
modal-0.73.
|
175
|
+
modal_version/_version_generated.py,sha256=wAGaC7NwMRQUUUvT57QmxY3RdcCTvm9pAbVhlIpwHhY,149
|
176
|
+
modal-0.73.35.dist-info/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
|
177
|
+
modal-0.73.35.dist-info/METADATA,sha256=AH-Y6QZZcLPeRkCngemat7i9PoEQXsJpmetQ8W1uzZQ,2330
|
178
|
+
modal-0.73.35.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
|
179
|
+
modal-0.73.35.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
|
180
|
+
modal-0.73.35.dist-info/top_level.txt,sha256=1nvYbOSIKcmU50fNrpnQnrrOpj269ei3LzgB6j9xGqg,64
|
181
|
+
modal-0.73.35.dist-info/RECORD,,
|
modal_proto/api.proto
CHANGED
@@ -1174,7 +1174,7 @@ message Function {
|
|
1174
1174
|
|
1175
1175
|
FunctionRetryPolicy retry_policy = 18;
|
1176
1176
|
|
1177
|
-
uint32 concurrency_limit = 19;
|
1177
|
+
uint32 concurrency_limit = 19; // To be replaced by autoscaler_settings.max_containers
|
1178
1178
|
|
1179
1179
|
reserved 20; // old fields
|
1180
1180
|
|
@@ -1183,11 +1183,11 @@ message Function {
|
|
1183
1183
|
PTYInfo pty_info = 22;
|
1184
1184
|
bytes class_serialized = 23;
|
1185
1185
|
|
1186
|
-
uint32 task_idle_timeout_secs = 25;
|
1186
|
+
uint32 task_idle_timeout_secs = 25; // To be replaced by autoscaler_settings.scaledown_period
|
1187
1187
|
|
1188
1188
|
optional CloudProvider cloud_provider = 26; // Deprecated at some point
|
1189
1189
|
|
1190
|
-
uint32 warm_pool_size = 27;
|
1190
|
+
uint32 warm_pool_size = 27; // To be replaced by autoscaler_settings.min_containers
|
1191
1191
|
|
1192
1192
|
string web_url = 28;
|
1193
1193
|
WebUrlInfo web_url_info = 29;
|
@@ -1262,7 +1262,7 @@ message Function {
|
|
1262
1262
|
// If set, the function will be run in an untrusted environment.
|
1263
1263
|
bool untrusted = 68;
|
1264
1264
|
|
1265
|
-
uint32 _experimental_buffer_containers = 69;
|
1265
|
+
uint32 _experimental_buffer_containers = 69; // To be replaced by autoscaler_settings.buffer_containers
|
1266
1266
|
|
1267
1267
|
// _experimental_proxy_ip -> ProxyInfo
|
1268
1268
|
// TODO: deprecate.
|
@@ -1283,6 +1283,9 @@ message Function {
|
|
1283
1283
|
string cloud_provider_str = 77; // Supersedes cloud_provider
|
1284
1284
|
|
1285
1285
|
bool _experimental_enable_gpu_snapshot = 78; // Experimental support for GPU snapshotting
|
1286
|
+
|
1287
|
+
AutoscalerSettings autoscaler_settings = 79; // Bundle of parameters related to autoscaling
|
1288
|
+
|
1286
1289
|
}
|
1287
1290
|
|
1288
1291
|
message FunctionAsyncInvokeRequest {
|