modal 0.74.29__py3-none-any.whl → 0.74.31__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 +3 -10
- modal/client.pyi +2 -2
- modal/functions.pyi +8 -7
- {modal-0.74.29.dist-info → modal-0.74.31.dist-info}/METADATA +1 -1
- {modal-0.74.29.dist-info → modal-0.74.31.dist-info}/RECORD +10 -10
- modal_version/_version_generated.py +1 -1
- {modal-0.74.29.dist-info → modal-0.74.31.dist-info}/WHEEL +0 -0
- {modal-0.74.29.dist-info → modal-0.74.31.dist-info}/entry_points.txt +0 -0
- {modal-0.74.29.dist-info → modal-0.74.31.dist-info}/licenses/LICENSE +0 -0
- {modal-0.74.29.dist-info → modal-0.74.31.dist-info}/top_level.txt +0 -0
modal/_functions.py
CHANGED
@@ -377,6 +377,7 @@ ReturnType = typing.TypeVar("ReturnType", covariant=True)
|
|
377
377
|
OriginalReturnType = typing.TypeVar(
|
378
378
|
"OriginalReturnType", covariant=True
|
379
379
|
) # differs from return type if ReturnType is coroutine
|
380
|
+
T = typing.TypeVar("T", covariant=True)
|
380
381
|
|
381
382
|
|
382
383
|
class _Function(typing.Generic[P, ReturnType, OriginalReturnType], _Object, type_prefix="fu"):
|
@@ -406,7 +407,6 @@ class _Function(typing.Generic[P, ReturnType, OriginalReturnType], _Object, type
|
|
406
407
|
_build_args: dict
|
407
408
|
|
408
409
|
_is_generator: Optional[bool] = None
|
409
|
-
_cluster_size: Optional[int] = None
|
410
410
|
|
411
411
|
# when this is the method of a class/object function, invocation of this function
|
412
412
|
# should supply the method name in the FunctionInput:
|
@@ -930,7 +930,6 @@ class _Function(typing.Generic[P, ReturnType, OriginalReturnType], _Object, type
|
|
930
930
|
obj._app = app # needed for CLI right now
|
931
931
|
obj._obj = None
|
932
932
|
obj._is_generator = is_generator
|
933
|
-
obj._cluster_size = cluster_size
|
934
933
|
obj._is_method = False
|
935
934
|
obj._spec = function_spec # needed for modal shell
|
936
935
|
obj._webhook_config = webhook_config # only set locally
|
@@ -1235,7 +1234,6 @@ class _Function(typing.Generic[P, ReturnType, OriginalReturnType], _Object, type
|
|
1235
1234
|
# Overridden concrete implementation of base class method
|
1236
1235
|
self._progress = None
|
1237
1236
|
self._is_generator = None
|
1238
|
-
self._cluster_size = None
|
1239
1237
|
self._web_url = None
|
1240
1238
|
self._function_name = None
|
1241
1239
|
self._info = None
|
@@ -1304,11 +1302,6 @@ class _Function(typing.Generic[P, ReturnType, OriginalReturnType], _Object, type
|
|
1304
1302
|
assert self._is_generator is not None # should be set now
|
1305
1303
|
return self._is_generator
|
1306
1304
|
|
1307
|
-
@property
|
1308
|
-
def cluster_size(self) -> int:
|
1309
|
-
"""mdmd:hidden"""
|
1310
|
-
return self._cluster_size or 1
|
1311
|
-
|
1312
1305
|
@live_method_gen
|
1313
1306
|
async def _map(
|
1314
1307
|
self, input_queue: _SynchronizedQueue, order_outputs: bool, return_exceptions: bool
|
@@ -1667,7 +1660,7 @@ class _FunctionCall(typing.Generic[ReturnType], _Object, type_prefix="fc"):
|
|
1667
1660
|
return fc
|
1668
1661
|
|
1669
1662
|
@staticmethod
|
1670
|
-
async def gather(*function_calls: "_FunctionCall[
|
1663
|
+
async def gather(*function_calls: "_FunctionCall[T]") -> typing.Sequence[T]:
|
1671
1664
|
"""Wait until all Modal FunctionCall objects have results before returning.
|
1672
1665
|
|
1673
1666
|
Accepts a variable number of `FunctionCall` objects, as returned by `Function.spawn()`.
|
@@ -1693,7 +1686,7 @@ class _FunctionCall(typing.Generic[ReturnType], _Object, type_prefix="fc"):
|
|
1693
1686
|
raise exc
|
1694
1687
|
|
1695
1688
|
|
1696
|
-
async def _gather(*function_calls: _FunctionCall[
|
1689
|
+
async def _gather(*function_calls: _FunctionCall[T]) -> typing.Sequence[T]:
|
1697
1690
|
"""Deprecated: Please use `modal.FunctionCall.gather()` instead."""
|
1698
1691
|
deprecation_warning(
|
1699
1692
|
(2025, 2, 24),
|
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.74.
|
30
|
+
self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.74.31"
|
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.74.
|
88
|
+
self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.74.31"
|
89
89
|
): ...
|
90
90
|
def is_closed(self) -> bool: ...
|
91
91
|
@property
|
modal/functions.pyi
CHANGED
@@ -48,7 +48,6 @@ class Function(
|
|
48
48
|
_raw_f: typing.Optional[collections.abc.Callable[..., typing.Any]]
|
49
49
|
_build_args: dict
|
50
50
|
_is_generator: typing.Optional[bool]
|
51
|
-
_cluster_size: typing.Optional[int]
|
52
51
|
_use_method_name: str
|
53
52
|
_class_parameter_info: typing.Optional[modal_proto.api_pb2.ClassParameterInfo]
|
54
53
|
_method_handle_metadata: typing.Optional[dict[str, modal_proto.api_pb2.FunctionHandleMetadata]]
|
@@ -163,8 +162,6 @@ class Function(
|
|
163
162
|
def web_url(self) -> typing.Optional[str]: ...
|
164
163
|
@property
|
165
164
|
def is_generator(self) -> bool: ...
|
166
|
-
@property
|
167
|
-
def cluster_size(self) -> int: ...
|
168
165
|
|
169
166
|
class ___map_spec(typing_extensions.Protocol[SUPERSELF]):
|
170
167
|
def __call__(
|
@@ -330,13 +327,17 @@ class FunctionCall(typing.Generic[modal._functions.ReturnType], modal.object.Obj
|
|
330
327
|
from_id: __from_id_spec
|
331
328
|
|
332
329
|
class __gather_spec(typing_extensions.Protocol):
|
333
|
-
def __call__(
|
334
|
-
|
330
|
+
def __call__(
|
331
|
+
self, *function_calls: FunctionCall[modal._functions.T]
|
332
|
+
) -> typing.Sequence[modal._functions.T]: ...
|
333
|
+
async def aio(
|
334
|
+
self, *function_calls: FunctionCall[modal._functions.T]
|
335
|
+
) -> typing.Sequence[modal._functions.T]: ...
|
335
336
|
|
336
337
|
gather: __gather_spec
|
337
338
|
|
338
339
|
class __gather_spec(typing_extensions.Protocol):
|
339
|
-
def __call__(self, *function_calls) -> typing.Sequence[modal._functions.
|
340
|
-
async def aio(self, *function_calls) -> typing.Sequence[modal._functions.
|
340
|
+
def __call__(self, *function_calls) -> typing.Sequence[modal._functions.T]: ...
|
341
|
+
async def aio(self, *function_calls) -> typing.Sequence[modal._functions.T]: ...
|
341
342
|
|
342
343
|
gather: __gather_spec
|
@@ -3,7 +3,7 @@ modal/__main__.py,sha256=sTJcc9EbDuCKSwg3tL6ZckFw9WWdlkXW8mId1IvJCNc,2846
|
|
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=DymOImhc3uGRkIq_qXmBsEbWMB4EBMpfuXzz2S4BcGg,29404
|
6
|
-
modal/_functions.py,sha256=
|
6
|
+
modal/_functions.py,sha256=iwiTAinCtv-DjyQxt2xludY8Q6NVjXajiqkA77WJgZk,74586
|
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
|
@@ -22,7 +22,7 @@ modal/app.py,sha256=VQPV0u6zqePdocBZS6Tgjf_we7aSrLtvqqXmZNdMfBQ,50890
|
|
22
22
|
modal/app.pyi,sha256=Dq7cfzkW8HR6Ud6L6YueZucHelEUYnGUc6BKn8KWpIk,28420
|
23
23
|
modal/call_graph.py,sha256=1g2DGcMIJvRy-xKicuf63IVE98gJSnQsr8R_NVMptNc,2581
|
24
24
|
modal/client.py,sha256=U-YKSw0n7J1ZLREt9cbEJCtmHe5YoPKFxl0xlkan2yc,15565
|
25
|
-
modal/client.pyi,sha256=
|
25
|
+
modal/client.pyi,sha256=F01QFFHv-mHp7HhLRFQorYvajr8tHUaOqwby6IPEFHE,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=ByV4st7Ka5mXAW4eBl9WMOmZKq1pSiCT4etpHIcylo8,33519
|
@@ -39,7 +39,7 @@ modal/file_io.py,sha256=lcMs_E9Xfm0YX1t9U2wNIBPnqHRxmImqjLW1GHqVmyg,20945
|
|
39
39
|
modal/file_io.pyi,sha256=NTRft1tbPSWf9TlWVeZmTlgB5AZ_Zhu2srWIrWr7brk,9445
|
40
40
|
modal/file_pattern_matcher.py,sha256=trosX-Bp7dOubudN1bLLhRAoidWy1TcoaR4Pv8CedWw,6497
|
41
41
|
modal/functions.py,sha256=kcNHvqeGBxPI7Cgd57NIBBghkfbeFJzXO44WW0jSmao,325
|
42
|
-
modal/functions.pyi,sha256=
|
42
|
+
modal/functions.pyi,sha256=ljRsgHRmnHEvZlrvzUSDb9PCZjtsPgMxYQptYS6REu4,14825
|
43
43
|
modal/gpu.py,sha256=Kbhs_u49FaC2Zi0TjCdrpstpRtT5eZgecynmQi5IZVE,6752
|
44
44
|
modal/image.py,sha256=ZCghS6l1O7pezXcdMHk6RoJpW3qWszfWGJTW38lNXaU,92797
|
45
45
|
modal/image.pyi,sha256=ddbegF532pDLiVANOJdtJiYoDbbF3mAFrsCiyvIu7jU,25632
|
@@ -145,7 +145,7 @@ modal/requirements/2024.10.txt,sha256=qD-5cVIVM9wXesJ6JC89Ew-3m2KjEElUz3jaw_MddR
|
|
145
145
|
modal/requirements/PREVIEW.txt,sha256=qD-5cVIVM9wXesJ6JC89Ew-3m2KjEElUz3jaw_MddRo,296
|
146
146
|
modal/requirements/README.md,sha256=9tK76KP0Uph7O0M5oUgsSwEZDj5y-dcUPsnpR0Sc-Ik,854
|
147
147
|
modal/requirements/base-images.json,sha256=57vMSqzMbLBxw5tFWSaMiIkkVEps4JfX5PAtXGnkS4U,740
|
148
|
-
modal-0.74.
|
148
|
+
modal-0.74.31.dist-info/licenses/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
|
149
149
|
modal_docs/__init__.py,sha256=svYKtV8HDwDCN86zbdWqyq5T8sMdGDj0PVlzc2tIxDM,28
|
150
150
|
modal_docs/gen_cli_docs.py,sha256=c1yfBS_x--gL5bs0N4ihMwqwX8l3IBWSkBAKNNIi6bQ,3801
|
151
151
|
modal_docs/gen_reference_docs.py,sha256=d_CQUGQ0rfw28u75I2mov9AlS773z9rG40-yq5o7g2U,6359
|
@@ -170,9 +170,9 @@ modal_proto/options_pb2_grpc.pyi,sha256=CImmhxHsYnF09iENPoe8S4J-n93jtgUYD2JPAc0y
|
|
170
170
|
modal_proto/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
171
171
|
modal_version/__init__.py,sha256=m94xZNWIjH8oUtJk4l9xfovzDJede2o7X-q0MHVECtM,470
|
172
172
|
modal_version/__main__.py,sha256=2FO0yYQQwDTh6udt1h-cBnGd1c4ZyHnHSI4BksxzVac,105
|
173
|
-
modal_version/_version_generated.py,sha256=
|
174
|
-
modal-0.74.
|
175
|
-
modal-0.74.
|
176
|
-
modal-0.74.
|
177
|
-
modal-0.74.
|
178
|
-
modal-0.74.
|
173
|
+
modal_version/_version_generated.py,sha256=5bXOrW09X_4o3zYkm9WbdqgEm0U1a6sTj4ZkbyYOV3k,149
|
174
|
+
modal-0.74.31.dist-info/METADATA,sha256=KFsHQLePFUGyylvgiUhuEQ37SnNV8Q2XDyC2Zt1tUOY,2474
|
175
|
+
modal-0.74.31.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
|
176
|
+
modal-0.74.31.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
|
177
|
+
modal-0.74.31.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
|
178
|
+
modal-0.74.31.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|