modal 1.0.0.dev14__py3-none-any.whl → 1.0.0.dev15__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.
Potentially problematic release.
This version of modal might be problematic. Click here for more details.
- modal/_functions.py +3 -35
- modal/client.pyi +2 -2
- modal/functions.pyi +2 -22
- {modal-1.0.0.dev14.dist-info → modal-1.0.0.dev15.dist-info}/METADATA +1 -1
- {modal-1.0.0.dev14.dist-info → modal-1.0.0.dev15.dist-info}/RECORD +10 -10
- modal_version/__init__.py +1 -1
- {modal-1.0.0.dev14.dist-info → modal-1.0.0.dev15.dist-info}/WHEEL +0 -0
- {modal-1.0.0.dev14.dist-info → modal-1.0.0.dev15.dist-info}/entry_points.txt +0 -0
- {modal-1.0.0.dev14.dist-info → modal-1.0.0.dev15.dist-info}/licenses/LICENSE +0 -0
- {modal-1.0.0.dev14.dist-info → modal-1.0.0.dev15.dist-info}/top_level.txt +0 -0
modal/_functions.py
CHANGED
@@ -1508,20 +1508,6 @@ Use the `Function.get_web_url()` method instead.
|
|
1508
1508
|
async for res in invocation.run_generator():
|
1509
1509
|
yield res
|
1510
1510
|
|
1511
|
-
@synchronizer.no_io_translation
|
1512
|
-
async def _call_generator_nowait(self, args, kwargs):
|
1513
|
-
deprecation_warning(
|
1514
|
-
(2024, 12, 11),
|
1515
|
-
"Calling spawn on a generator function is deprecated and will soon raise an exception.",
|
1516
|
-
)
|
1517
|
-
return await _Invocation.create(
|
1518
|
-
self,
|
1519
|
-
args,
|
1520
|
-
kwargs,
|
1521
|
-
client=self.client,
|
1522
|
-
function_call_invocation_type=api_pb2.FUNCTION_CALL_INVOCATION_TYPE_ASYNC,
|
1523
|
-
)
|
1524
|
-
|
1525
1511
|
@synchronizer.no_io_translation
|
1526
1512
|
@live_method
|
1527
1513
|
async def remote(self, *args: P.args, **kwargs: P.kwargs) -> ReturnType:
|
@@ -1634,7 +1620,7 @@ Use the `Function.get_web_url()` method instead.
|
|
1634
1620
|
"""
|
1635
1621
|
self._check_no_web_url("_experimental_spawn")
|
1636
1622
|
if self._is_generator:
|
1637
|
-
|
1623
|
+
raise InvalidError("Cannot `spawn` a generator function.")
|
1638
1624
|
else:
|
1639
1625
|
invocation = await self._call_function_nowait(
|
1640
1626
|
args, kwargs, function_call_invocation_type=api_pb2.FUNCTION_CALL_INVOCATION_TYPE_ASYNC
|
@@ -1666,14 +1652,13 @@ Use the `Function.get_web_url()` method instead.
|
|
1666
1652
|
"""
|
1667
1653
|
self._check_no_web_url("spawn")
|
1668
1654
|
if self._is_generator:
|
1669
|
-
|
1655
|
+
raise InvalidError("Cannot `spawn` a generator function.")
|
1670
1656
|
else:
|
1671
1657
|
invocation = await self._call_function_nowait(args, kwargs, api_pb2.FUNCTION_CALL_INVOCATION_TYPE_ASYNC)
|
1672
1658
|
|
1673
1659
|
fc: _FunctionCall[ReturnType] = _FunctionCall._new_hydrated(
|
1674
1660
|
invocation.function_call_id, invocation.client, None
|
1675
1661
|
)
|
1676
|
-
fc._is_generator = self._is_generator if self._is_generator else False
|
1677
1662
|
return fc
|
1678
1663
|
|
1679
1664
|
def get_raw_f(self) -> Callable[..., Any]:
|
@@ -1732,22 +1717,8 @@ class _FunctionCall(typing.Generic[ReturnType], _Object, type_prefix="fc"):
|
|
1732
1717
|
|
1733
1718
|
The returned coroutine is not cancellation-safe.
|
1734
1719
|
"""
|
1735
|
-
|
1736
|
-
if self._is_generator:
|
1737
|
-
raise Exception("Cannot get the result of a generator function call. Use `get_gen` instead.")
|
1738
|
-
|
1739
1720
|
return await self._invocation().poll_function(timeout=timeout)
|
1740
1721
|
|
1741
|
-
async def get_gen(self) -> AsyncGenerator[Any, None]:
|
1742
|
-
"""
|
1743
|
-
Calls the generator remotely, executing it with the given arguments and returning the execution's result.
|
1744
|
-
"""
|
1745
|
-
if not self._is_generator:
|
1746
|
-
raise Exception("Cannot iterate over a non-generator function call. Use `get` instead.")
|
1747
|
-
|
1748
|
-
async for res in self._invocation().run_generator():
|
1749
|
-
yield res
|
1750
|
-
|
1751
1722
|
async def get_call_graph(self) -> list[InputInfo]:
|
1752
1723
|
"""Returns a structure representing the call graph from a given root
|
1753
1724
|
call ID, along with the status of execution for each node.
|
@@ -1778,9 +1749,7 @@ class _FunctionCall(typing.Generic[ReturnType], _Object, type_prefix="fc"):
|
|
1778
1749
|
await retry_transient_errors(self._client.stub.FunctionCallCancel, request)
|
1779
1750
|
|
1780
1751
|
@staticmethod
|
1781
|
-
async def from_id(
|
1782
|
-
function_call_id: str, client: Optional[_Client] = None, is_generator: bool = False
|
1783
|
-
) -> "_FunctionCall[Any]":
|
1752
|
+
async def from_id(function_call_id: str, client: Optional[_Client] = None) -> "_FunctionCall[Any]":
|
1784
1753
|
"""Instantiate a FunctionCall object from an existing ID.
|
1785
1754
|
|
1786
1755
|
Examples:
|
@@ -1803,7 +1772,6 @@ class _FunctionCall(typing.Generic[ReturnType], _Object, type_prefix="fc"):
|
|
1803
1772
|
client = await _Client.from_env()
|
1804
1773
|
|
1805
1774
|
fc: _FunctionCall[Any] = _FunctionCall._new_hydrated(function_call_id, client, None)
|
1806
|
-
fc._is_generator = is_generator
|
1807
1775
|
return fc
|
1808
1776
|
|
1809
1777
|
@staticmethod
|
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 = "1.0.0.
|
34
|
+
version: str = "1.0.0.dev15",
|
35
35
|
): ...
|
36
36
|
def is_closed(self) -> bool: ...
|
37
37
|
@property
|
@@ -94,7 +94,7 @@ class Client:
|
|
94
94
|
server_url: str,
|
95
95
|
client_type: int,
|
96
96
|
credentials: typing.Optional[tuple[str, str]],
|
97
|
-
version: str = "1.0.0.
|
97
|
+
version: str = "1.0.0.dev15",
|
98
98
|
): ...
|
99
99
|
def is_closed(self) -> bool: ...
|
100
100
|
@property
|
modal/functions.pyi
CHANGED
@@ -228,12 +228,6 @@ class Function(
|
|
228
228
|
|
229
229
|
_call_generator: ___call_generator_spec[typing_extensions.Self]
|
230
230
|
|
231
|
-
class ___call_generator_nowait_spec(typing_extensions.Protocol[SUPERSELF]):
|
232
|
-
def __call__(self, /, args, kwargs): ...
|
233
|
-
async def aio(self, /, args, kwargs): ...
|
234
|
-
|
235
|
-
_call_generator_nowait: ___call_generator_nowait_spec[typing_extensions.Self]
|
236
|
-
|
237
231
|
class __remote_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
|
238
232
|
def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER: ...
|
239
233
|
async def aio(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER: ...
|
@@ -350,12 +344,6 @@ class FunctionCall(typing.Generic[modal._functions.ReturnType], modal.object.Obj
|
|
350
344
|
|
351
345
|
get: __get_spec[modal._functions.ReturnType, typing_extensions.Self]
|
352
346
|
|
353
|
-
class __get_gen_spec(typing_extensions.Protocol[SUPERSELF]):
|
354
|
-
def __call__(self, /) -> typing.Generator[typing.Any, None, None]: ...
|
355
|
-
def aio(self, /) -> collections.abc.AsyncGenerator[typing.Any, None]: ...
|
356
|
-
|
357
|
-
get_gen: __get_gen_spec[typing_extensions.Self]
|
358
|
-
|
359
347
|
class __get_call_graph_spec(typing_extensions.Protocol[SUPERSELF]):
|
360
348
|
def __call__(self, /) -> list[modal.call_graph.InputInfo]: ...
|
361
349
|
async def aio(self, /) -> list[modal.call_graph.InputInfo]: ...
|
@@ -370,18 +358,10 @@ class FunctionCall(typing.Generic[modal._functions.ReturnType], modal.object.Obj
|
|
370
358
|
|
371
359
|
class __from_id_spec(typing_extensions.Protocol):
|
372
360
|
def __call__(
|
373
|
-
self,
|
374
|
-
/,
|
375
|
-
function_call_id: str,
|
376
|
-
client: typing.Optional[modal.client.Client] = None,
|
377
|
-
is_generator: bool = False,
|
361
|
+
self, /, function_call_id: str, client: typing.Optional[modal.client.Client] = None
|
378
362
|
) -> FunctionCall[typing.Any]: ...
|
379
363
|
async def aio(
|
380
|
-
self,
|
381
|
-
/,
|
382
|
-
function_call_id: str,
|
383
|
-
client: typing.Optional[modal.client.Client] = None,
|
384
|
-
is_generator: bool = False,
|
364
|
+
self, /, function_call_id: str, client: typing.Optional[modal.client.Client] = None
|
385
365
|
) -> FunctionCall[typing.Any]: ...
|
386
366
|
|
387
367
|
from_id: __from_id_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=2aWxN2v5WUnj-R-sk6BzJ-3AvggkQGQjwhtvbDH3pds,777
|
5
5
|
modal/_container_entrypoint.py,sha256=2Zx9O_EMJg0H77EdnC2vGKs6uFMWwbP1NLFf-qYmWmU,28962
|
6
|
-
modal/_functions.py,sha256=
|
6
|
+
modal/_functions.py,sha256=8ZHWZu2su2bbWb_QXjr9S2KfZemKxuMSxCansbVd0VY,77970
|
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=KzzzZoM41UQUiY9TKOrft9BtZKgjWG_ukdlyLGjB4UY,10758
|
@@ -22,7 +22,7 @@ modal/app.py,sha256=HuZu6c3CExccRcBfA7Geh-c_ajWGHB2w0xlVyDIVXlg,48146
|
|
22
22
|
modal/app.pyi,sha256=JT6UkaK3bq9TTYLtxHmjApmuEPHM6XZvLCSaCEAIm0E,24219
|
23
23
|
modal/call_graph.py,sha256=1g2DGcMIJvRy-xKicuf63IVE98gJSnQsr8R_NVMptNc,2581
|
24
24
|
modal/client.py,sha256=o-aQThHpvDHUzg_kUafyhWzACViUBhY2WLZ2EitnSHA,16787
|
25
|
-
modal/client.pyi,sha256=
|
25
|
+
modal/client.pyi,sha256=mMF8CeQ3GumEbUykAGcnyHiuhKfEafONZorMaBy1DfQ,8459
|
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=dBbeARwOWftlKd1cwtM0cHFtQWSWkwVXwVmOV4w0SyI,37907
|
@@ -39,7 +39,7 @@ modal/file_io.py,sha256=lcMs_E9Xfm0YX1t9U2wNIBPnqHRxmImqjLW1GHqVmyg,20945
|
|
39
39
|
modal/file_io.pyi,sha256=oB7x-rKq7bmm8cA7Z7W9C9yeko7KK9m9i5GidFnkGK4,9569
|
40
40
|
modal/file_pattern_matcher.py,sha256=wov-otB5M1oTdrYDtR2_VgacYin2srdtAP4McA1Cqzw,6516
|
41
41
|
modal/functions.py,sha256=kcNHvqeGBxPI7Cgd57NIBBghkfbeFJzXO44WW0jSmao,325
|
42
|
-
modal/functions.pyi,sha256=
|
42
|
+
modal/functions.pyi,sha256=cllJF89sCKlX82On69XG8XlETgI364xF7Hsj3kxJaeU,16304
|
43
43
|
modal/gpu.py,sha256=Kbhs_u49FaC2Zi0TjCdrpstpRtT5eZgecynmQi5IZVE,6752
|
44
44
|
modal/image.py,sha256=glnu6LDf3iFq71CGVstHx40CKVN4rw8tukPLAy5JgTQ,92464
|
45
45
|
modal/image.pyi,sha256=NbegOjy6QX_SL-eTxtJm1_4gOJHW04Ja449QHZIdKgU,25586
|
@@ -146,7 +146,7 @@ modal/requirements/2024.10.txt,sha256=qD-5cVIVM9wXesJ6JC89Ew-3m2KjEElUz3jaw_MddR
|
|
146
146
|
modal/requirements/PREVIEW.txt,sha256=qD-5cVIVM9wXesJ6JC89Ew-3m2KjEElUz3jaw_MddRo,296
|
147
147
|
modal/requirements/README.md,sha256=9tK76KP0Uph7O0M5oUgsSwEZDj5y-dcUPsnpR0Sc-Ik,854
|
148
148
|
modal/requirements/base-images.json,sha256=57vMSqzMbLBxw5tFWSaMiIkkVEps4JfX5PAtXGnkS4U,740
|
149
|
-
modal-1.0.0.
|
149
|
+
modal-1.0.0.dev15.dist-info/licenses/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
|
150
150
|
modal_docs/__init__.py,sha256=svYKtV8HDwDCN86zbdWqyq5T8sMdGDj0PVlzc2tIxDM,28
|
151
151
|
modal_docs/gen_cli_docs.py,sha256=c1yfBS_x--gL5bs0N4ihMwqwX8l3IBWSkBAKNNIi6bQ,3801
|
152
152
|
modal_docs/gen_reference_docs.py,sha256=d_CQUGQ0rfw28u75I2mov9AlS773z9rG40-yq5o7g2U,6359
|
@@ -169,10 +169,10 @@ modal_proto/options_pb2.pyi,sha256=l7DBrbLO7q3Ir-XDkWsajm0d0TQqqrfuX54i4BMpdQg,1
|
|
169
169
|
modal_proto/options_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDCNMhZD2VXqocC9l_gk,159
|
170
170
|
modal_proto/options_pb2_grpc.pyi,sha256=CImmhxHsYnF09iENPoe8S4J-n93jtgUYD2JPAc0yJSI,247
|
171
171
|
modal_proto/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
172
|
-
modal_version/__init__.py,sha256=
|
172
|
+
modal_version/__init__.py,sha256=yKGyyI3xd4SF0X24fPf9iBOJuzdAu_IM4aukTn9IR6Y,121
|
173
173
|
modal_version/__main__.py,sha256=2FO0yYQQwDTh6udt1h-cBnGd1c4ZyHnHSI4BksxzVac,105
|
174
|
-
modal-1.0.0.
|
175
|
-
modal-1.0.0.
|
176
|
-
modal-1.0.0.
|
177
|
-
modal-1.0.0.
|
178
|
-
modal-1.0.0.
|
174
|
+
modal-1.0.0.dev15.dist-info/METADATA,sha256=kL6tHFHIQ5LsfsWTMwEkX2e5tAZTHjmk_9QWlMx4VlQ,2455
|
175
|
+
modal-1.0.0.dev15.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
|
176
|
+
modal-1.0.0.dev15.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
|
177
|
+
modal-1.0.0.dev15.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
|
178
|
+
modal-1.0.0.dev15.dist-info/RECORD,,
|
modal_version/__init__.py
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|