modal 0.73.147__py3-none-any.whl → 0.73.149__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/_partial_function.py +13 -2
- modal/app.py +2 -2
- modal/client.pyi +2 -2
- modal/functions.pyi +6 -6
- {modal-0.73.147.dist-info → modal-0.73.149.dist-info}/METADATA +1 -1
- {modal-0.73.147.dist-info → modal-0.73.149.dist-info}/RECORD +11 -11
- modal_version/_version_generated.py +1 -1
- {modal-0.73.147.dist-info → modal-0.73.149.dist-info}/LICENSE +0 -0
- {modal-0.73.147.dist-info → modal-0.73.149.dist-info}/WHEEL +0 -0
- {modal-0.73.147.dist-info → modal-0.73.149.dist-info}/entry_points.txt +0 -0
- {modal-0.73.147.dist-info → modal-0.73.149.dist-info}/top_level.txt +0 -0
modal/_partial_function.py
CHANGED
@@ -772,14 +772,22 @@ def _batched(
|
|
772
772
|
|
773
773
|
**Usage**
|
774
774
|
|
775
|
-
```python
|
775
|
+
```python
|
776
|
+
# Stack the decorator under `@app.function()` to enable dynamic batching
|
776
777
|
@app.function()
|
777
778
|
@modal.batched(max_batch_size=4, wait_ms=1000)
|
778
779
|
async def batched_multiply(xs: list[int], ys: list[int]) -> list[int]:
|
779
780
|
return [x * y for x, y in zip(xs, xs)]
|
780
781
|
|
781
782
|
# call batched_multiply with individual inputs
|
782
|
-
batched_multiply.remote.aio(2, 100)
|
783
|
+
# batched_multiply.remote.aio(2, 100)
|
784
|
+
|
785
|
+
# With `@app.cls()`, apply the decorator to a method (this may change in the future)
|
786
|
+
@app.cls()
|
787
|
+
class BatchedClass:
|
788
|
+
@modal.batched(max_batch_size=4, wait_ms=1000)
|
789
|
+
def batched_multiply(self, xs: list[int], ys: list[int]) -> list[int]:
|
790
|
+
return [x * y for x, y in zip(xs, xs)]
|
783
791
|
```
|
784
792
|
|
785
793
|
See the [dynamic batching guide](https://modal.com/docs/guide/dynamic-batching) for more information.
|
@@ -859,6 +867,9 @@ def _concurrent(
|
|
859
867
|
|
860
868
|
```
|
861
869
|
|
870
|
+
*Added in v0.73.148:* This decorator replaces the `allow_concurrent_inputs` parameter
|
871
|
+
in `@app.function()` and `@app.cls()`.
|
872
|
+
|
862
873
|
"""
|
863
874
|
if _warn_parentheses_missing is not None:
|
864
875
|
raise InvalidError(
|
modal/app.py
CHANGED
@@ -881,8 +881,8 @@ class _App:
|
|
881
881
|
f"Modal class {user_cls.__name__} with a modal batched function cannot have other modal methods." # noqa
|
882
882
|
)
|
883
883
|
batch_function = next(iter(batch_functions.values()))
|
884
|
-
batch_max_size = batch_function.batch_max_size
|
885
|
-
batch_wait_ms = batch_function.batch_wait_ms
|
884
|
+
batch_max_size = batch_function.params.batch_max_size
|
885
|
+
batch_wait_ms = batch_function.params.batch_wait_ms
|
886
886
|
else:
|
887
887
|
batch_max_size = None
|
888
888
|
batch_wait_ms = None
|
modal/client.pyi
CHANGED
@@ -31,7 +31,7 @@ class _Client:
|
|
31
31
|
server_url: str,
|
32
32
|
client_type: int,
|
33
33
|
credentials: typing.Optional[tuple[str, str]],
|
34
|
-
version: str = "0.73.
|
34
|
+
version: str = "0.73.149",
|
35
35
|
): ...
|
36
36
|
def is_closed(self) -> bool: ...
|
37
37
|
@property
|
@@ -93,7 +93,7 @@ class Client:
|
|
93
93
|
server_url: str,
|
94
94
|
client_type: int,
|
95
95
|
credentials: typing.Optional[tuple[str, str]],
|
96
|
-
version: str = "0.73.
|
96
|
+
version: str = "0.73.149",
|
97
97
|
): ...
|
98
98
|
def is_closed(self) -> bool: ...
|
99
99
|
@property
|
modal/functions.pyi
CHANGED
@@ -199,11 +199,11 @@ class Function(
|
|
199
199
|
|
200
200
|
_call_generator_nowait: ___call_generator_nowait_spec[typing_extensions.Self]
|
201
201
|
|
202
|
-
class __remote_spec(typing_extensions.Protocol[
|
202
|
+
class __remote_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
|
203
203
|
def __call__(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER: ...
|
204
204
|
async def aio(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER: ...
|
205
205
|
|
206
|
-
remote: __remote_spec[modal._functions.
|
206
|
+
remote: __remote_spec[modal._functions.P, modal._functions.ReturnType, typing_extensions.Self]
|
207
207
|
|
208
208
|
class __remote_gen_spec(typing_extensions.Protocol[SUPERSELF]):
|
209
209
|
def __call__(self, *args, **kwargs) -> typing.Generator[typing.Any, None, None]: ...
|
@@ -218,19 +218,19 @@ class Function(
|
|
218
218
|
self, *args: modal._functions.P.args, **kwargs: modal._functions.P.kwargs
|
219
219
|
) -> modal._functions.OriginalReturnType: ...
|
220
220
|
|
221
|
-
class ___experimental_spawn_spec(typing_extensions.Protocol[
|
221
|
+
class ___experimental_spawn_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
|
222
222
|
def __call__(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
|
223
223
|
async def aio(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
|
224
224
|
|
225
225
|
_experimental_spawn: ___experimental_spawn_spec[
|
226
|
-
modal._functions.
|
226
|
+
modal._functions.P, modal._functions.ReturnType, typing_extensions.Self
|
227
227
|
]
|
228
228
|
|
229
|
-
class __spawn_spec(typing_extensions.Protocol[
|
229
|
+
class __spawn_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
|
230
230
|
def __call__(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
|
231
231
|
async def aio(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
|
232
232
|
|
233
|
-
spawn: __spawn_spec[modal._functions.
|
233
|
+
spawn: __spawn_spec[modal._functions.P, modal._functions.ReturnType, typing_extensions.Self]
|
234
234
|
|
235
235
|
def get_raw_f(self) -> collections.abc.Callable[..., typing.Any]: ...
|
236
236
|
|
@@ -8,7 +8,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=8mmd5lvjZaC7qi0KAnLR1H590MlxNslAE2_Kr9biJUA,39704
|
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
|
@@ -19,11 +19,11 @@ modal/_tunnel.py,sha256=zTBxBiuH1O22tS1OliAJdIsSmaZS8PlnifS_6S5z-mk,6320
|
|
19
19
|
modal/_tunnel.pyi,sha256=JmmDYAy9F1FpgJ_hWx0xkom2nTOFQjn4mTPYlU3PFo4,1245
|
20
20
|
modal/_type_manager.py,sha256=SvDvX9JK1jLp8TA_psLd-hNYPALlG9KtSOmlbHqdtQE,8284
|
21
21
|
modal/_watcher.py,sha256=K6LYnlmSGQB4tWWI9JADv-tvSvQ1j522FwT71B51CX8,3584
|
22
|
-
modal/app.py,sha256=
|
22
|
+
modal/app.py,sha256=w00bV9cjABAsS2ExE7zb1jY6Q_snXYmdKa3xRFg8iXA,47428
|
23
23
|
modal/app.pyi,sha256=pUEqciyGZ446sc_QoG8XcQ_oc6oU-U4dqjkxjhgOX98,26968
|
24
24
|
modal/call_graph.py,sha256=1g2DGcMIJvRy-xKicuf63IVE98gJSnQsr8R_NVMptNc,2581
|
25
25
|
modal/client.py,sha256=j9D3hNis1lfhnz9lVFGgJgowbH3PaGUzNKgHPWYG778,15372
|
26
|
-
modal/client.pyi,sha256=
|
26
|
+
modal/client.pyi,sha256=WmuN4GciDSp7DcmkfVsTCLxX8HS9YPE_mGEaNDOQ44I,7661
|
27
27
|
modal/cloud_bucket_mount.py,sha256=YOe9nnvSr4ZbeCn587d7_VhE9IioZYRvF9VYQTQux08,5914
|
28
28
|
modal/cloud_bucket_mount.pyi,sha256=30T3K1a89l6wzmEJ_J9iWv9SknoGqaZDx59Xs-ZQcmk,1607
|
29
29
|
modal/cls.py,sha256=6MZYzhOcsCG7uWKk_zv_Q7fDcn5dkmK0M4QVRrpfF3Q,31769
|
@@ -40,7 +40,7 @@ modal/file_io.py,sha256=lcMs_E9Xfm0YX1t9U2wNIBPnqHRxmImqjLW1GHqVmyg,20945
|
|
40
40
|
modal/file_io.pyi,sha256=NTRft1tbPSWf9TlWVeZmTlgB5AZ_Zhu2srWIrWr7brk,9445
|
41
41
|
modal/file_pattern_matcher.py,sha256=trosX-Bp7dOubudN1bLLhRAoidWy1TcoaR4Pv8CedWw,6497
|
42
42
|
modal/functions.py,sha256=kcNHvqeGBxPI7Cgd57NIBBghkfbeFJzXO44WW0jSmao,325
|
43
|
-
modal/functions.pyi,sha256=
|
43
|
+
modal/functions.pyi,sha256=PqApQjvICj11NIMEVCmaUIUyJUfEIuY_KkEzCZ4t6iI,14438
|
44
44
|
modal/gpu.py,sha256=Kbhs_u49FaC2Zi0TjCdrpstpRtT5eZgecynmQi5IZVE,6752
|
45
45
|
modal/image.py,sha256=HtkKomhX4inozqSRi7lf5Vt9IEqCnVHn5bEo59hD64A,92835
|
46
46
|
modal/image.pyi,sha256=iWclz2rxaP-LSsYMgU0X3ZcN5mEFvpyKzIPKJbohmsg,25591
|
@@ -170,10 +170,10 @@ 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=wiJQ53c-OMs0Xf1UeXOxQ7FwlV1VzIjnX6o-pRYZ_Pk,470
|
172
172
|
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.
|
173
|
+
modal_version/_version_generated.py,sha256=BxHotpHruLnH7GLl0RT_fVwnOMZTLKxolPLPFnxZfms,150
|
174
|
+
modal-0.73.149.dist-info/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
|
175
|
+
modal-0.73.149.dist-info/METADATA,sha256=6nhm-6xgI3d4VAMQGzPYtskBKscvL6M784wRlU40Y24,2453
|
176
|
+
modal-0.73.149.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
|
177
|
+
modal-0.73.149.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
|
178
|
+
modal-0.73.149.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
|
179
|
+
modal-0.73.149.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|