modal 0.71.5__py3-none-any.whl → 0.71.7__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/client.pyi +2 -2
- modal/functions.pyi +6 -6
- modal/image.py +18 -0
- modal/image.pyi +9 -0
- {modal-0.71.5.dist-info → modal-0.71.7.dist-info}/METADATA +1 -1
- {modal-0.71.5.dist-info → modal-0.71.7.dist-info}/RECORD +14 -14
- modal_proto/api.proto +1 -0
- modal_proto/api_pb2.py +782 -782
- modal_proto/api_pb2.pyi +4 -1
- modal_version/_version_generated.py +1 -1
- {modal-0.71.5.dist-info → modal-0.71.7.dist-info}/LICENSE +0 -0
- {modal-0.71.5.dist-info → modal-0.71.7.dist-info}/WHEEL +0 -0
- {modal-0.71.5.dist-info → modal-0.71.7.dist-info}/entry_points.txt +0 -0
- {modal-0.71.5.dist-info → modal-0.71.7.dist-info}/top_level.txt +0 -0
modal/client.pyi
CHANGED
@@ -26,7 +26,7 @@ class _Client:
|
|
26
26
|
_stub: typing.Optional[modal_proto.api_grpc.ModalClientStub]
|
27
27
|
|
28
28
|
def __init__(
|
29
|
-
self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.71.
|
29
|
+
self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.71.7"
|
30
30
|
): ...
|
31
31
|
def is_closed(self) -> bool: ...
|
32
32
|
@property
|
@@ -81,7 +81,7 @@ class Client:
|
|
81
81
|
_stub: typing.Optional[modal_proto.api_grpc.ModalClientStub]
|
82
82
|
|
83
83
|
def __init__(
|
84
|
-
self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.71.
|
84
|
+
self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.71.7"
|
85
85
|
): ...
|
86
86
|
def is_closed(self) -> bool: ...
|
87
87
|
@property
|
modal/functions.pyi
CHANGED
@@ -462,11 +462,11 @@ class Function(typing.Generic[P, ReturnType, OriginalReturnType], modal.object.O
|
|
462
462
|
|
463
463
|
_call_generator_nowait: ___call_generator_nowait_spec
|
464
464
|
|
465
|
-
class __remote_spec(typing_extensions.Protocol[
|
465
|
+
class __remote_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER]):
|
466
466
|
def __call__(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER: ...
|
467
467
|
async def aio(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER: ...
|
468
468
|
|
469
|
-
remote: __remote_spec[
|
469
|
+
remote: __remote_spec[ReturnType, P]
|
470
470
|
|
471
471
|
class __remote_gen_spec(typing_extensions.Protocol):
|
472
472
|
def __call__(self, *args, **kwargs) -> typing.Generator[typing.Any, None, None]: ...
|
@@ -479,17 +479,17 @@ class Function(typing.Generic[P, ReturnType, OriginalReturnType], modal.object.O
|
|
479
479
|
def _get_obj(self) -> typing.Optional[modal.cls.Obj]: ...
|
480
480
|
def local(self, *args: P.args, **kwargs: P.kwargs) -> OriginalReturnType: ...
|
481
481
|
|
482
|
-
class ___experimental_spawn_spec(typing_extensions.Protocol[
|
482
|
+
class ___experimental_spawn_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER]):
|
483
483
|
def __call__(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
|
484
484
|
async def aio(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
|
485
485
|
|
486
|
-
_experimental_spawn: ___experimental_spawn_spec[
|
486
|
+
_experimental_spawn: ___experimental_spawn_spec[ReturnType, P]
|
487
487
|
|
488
|
-
class __spawn_spec(typing_extensions.Protocol[
|
488
|
+
class __spawn_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER]):
|
489
489
|
def __call__(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
|
490
490
|
async def aio(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
|
491
491
|
|
492
|
-
spawn: __spawn_spec[
|
492
|
+
spawn: __spawn_spec[ReturnType, P]
|
493
493
|
|
494
494
|
def get_raw_f(self) -> typing.Callable[..., typing.Any]: ...
|
495
495
|
|
modal/image.py
CHANGED
@@ -832,6 +832,24 @@ class _Image(_Object, type_prefix="im"):
|
|
832
832
|
),
|
833
833
|
)
|
834
834
|
|
835
|
+
@staticmethod
|
836
|
+
async def from_id(image_id: str, client: Optional[_Client] = None) -> "_Image":
|
837
|
+
"""Construct an Image from an id and look up the Image result.
|
838
|
+
|
839
|
+
The ID of an Image object can be accessed using `.object_id`.
|
840
|
+
"""
|
841
|
+
if client is None:
|
842
|
+
client = await _Client.from_env()
|
843
|
+
|
844
|
+
async def _load(self: _Image, resolver: Resolver, existing_object_id: Optional[str]):
|
845
|
+
resp = await retry_transient_errors(client.stub.ImageFromId, api_pb2.ImageFromIdRequest(image_id=image_id))
|
846
|
+
self._hydrate(resp.image_id, resolver.client, resp.metadata)
|
847
|
+
|
848
|
+
rep = "Image()"
|
849
|
+
obj = _Image._from_loader(_load, rep)
|
850
|
+
|
851
|
+
return obj
|
852
|
+
|
835
853
|
def pip_install(
|
836
854
|
self,
|
837
855
|
*packages: Union[str, list[str]], # A list of Python packages, eg. ["numpy", "matplotlib>=3.5.0"]
|
modal/image.pyi
CHANGED
@@ -126,6 +126,8 @@ class _Image(modal.object._Object):
|
|
126
126
|
remote_path: typing.Union[str, pathlib.Path] = ".",
|
127
127
|
ignore: typing.Union[collections.abc.Sequence[str], typing.Callable[[pathlib.Path], bool]] = [],
|
128
128
|
) -> _Image: ...
|
129
|
+
@staticmethod
|
130
|
+
async def from_id(image_id: str, client: typing.Optional[modal.client._Client] = None) -> _Image: ...
|
129
131
|
def pip_install(
|
130
132
|
self,
|
131
133
|
*packages: typing.Union[str, list[str]],
|
@@ -387,6 +389,13 @@ class Image(modal.object.Object):
|
|
387
389
|
remote_path: typing.Union[str, pathlib.Path] = ".",
|
388
390
|
ignore: typing.Union[collections.abc.Sequence[str], typing.Callable[[pathlib.Path], bool]] = [],
|
389
391
|
) -> Image: ...
|
392
|
+
|
393
|
+
class __from_id_spec(typing_extensions.Protocol):
|
394
|
+
def __call__(self, image_id: str, client: typing.Optional[modal.client.Client] = None) -> Image: ...
|
395
|
+
async def aio(self, image_id: str, client: typing.Optional[modal.client.Client] = None) -> Image: ...
|
396
|
+
|
397
|
+
from_id: __from_id_spec
|
398
|
+
|
390
399
|
def pip_install(
|
391
400
|
self,
|
392
401
|
*packages: typing.Union[str, list[str]],
|
@@ -19,7 +19,7 @@ modal/app.py,sha256=vEE0cK5QPF6_cdW5AJvcuWxz5KmeprHwBEtlDkVRHgE,45582
|
|
19
19
|
modal/app.pyi,sha256=Gx7gxjfQ70sxhbwfpx1VjvzEON-ZEMTJ_Vy8qt0oQvo,25302
|
20
20
|
modal/call_graph.py,sha256=1g2DGcMIJvRy-xKicuf63IVE98gJSnQsr8R_NVMptNc,2581
|
21
21
|
modal/client.py,sha256=JAnd4-GCN093BwkvOFAK5a6iy5ycxofjpUncMxlrIMw,15253
|
22
|
-
modal/client.pyi,sha256=
|
22
|
+
modal/client.pyi,sha256=BemCZNYj-Ol_UF2iZJVU15N3VIKhxO2CPtgxitRJWw4,7278
|
23
23
|
modal/cloud_bucket_mount.py,sha256=G7T7jWLD0QkmrfKR75mSTwdUZ2xNfj7pkVqb4ipmxmI,5735
|
24
24
|
modal/cloud_bucket_mount.pyi,sha256=CEi7vrH3kDUF4LAy4qP6tfImy2UJuFRcRbsgRNM1wo8,1403
|
25
25
|
modal/cls.py,sha256=3hjb0JcoPjxKZNeK22f5rR43bZRBjoRI7_EMZXY7YrE,31172
|
@@ -37,10 +37,10 @@ modal/file_io.py,sha256=ZR8VBCDsDt5uB9TNN9XbEh7sniJzM_5YL47m8WP0m5c,19617
|
|
37
37
|
modal/file_io.pyi,sha256=79Fg75BjmMEeCX0Lx-Z8C4XSNPCotwNdK6ZLIDFm2f4,9770
|
38
38
|
modal/file_pattern_matcher.py,sha256=LaI7Paxg0xR9D-D7Tgc60xR0w1KZee22LjGbFie1Vms,5571
|
39
39
|
modal/functions.py,sha256=3uJPbrEAWhpFfLfUnoRjGmvEUC-_wVh-8yNJBx8eVeM,68249
|
40
|
-
modal/functions.pyi,sha256=
|
40
|
+
modal/functions.pyi,sha256=3ESJ61f8oEDycDmrpnuNB2vjFKuLBG_aqyliXPTdY7M,25407
|
41
41
|
modal/gpu.py,sha256=MTxj6ql8EpgfBg8YmZ5a1cLznyuZFssX1qXbEX4LKVM,7503
|
42
|
-
modal/image.py,sha256=
|
43
|
-
modal/image.pyi,sha256=
|
42
|
+
modal/image.py,sha256=oKqqLhc3Ap2XMG5MKVlERKkMTwJPkNMNcSzxoZh4zuw,85259
|
43
|
+
modal/image.pyi,sha256=Pa1_LVr3FyNsnu_MhBO08fBgCeLazTEe25phYdu0bzE,25365
|
44
44
|
modal/io_streams.py,sha256=Xxc5grJiO94nBA48FFWH3S3g6SPR0xFVgZ_DZ1oFmvI,14428
|
45
45
|
modal/io_streams.pyi,sha256=bCCVSxkMcosYd8O3PQDDwJw7TQ8JEcnYonLJ5t27TQs,4804
|
46
46
|
modal/io_streams_helper.py,sha256=B5Ui56ph7LkRpZX0tAF80Q-gOMsvPPLx5bpIPX0kgDc,1772
|
@@ -149,10 +149,10 @@ modal_global_objects/mounts/__init__.py,sha256=MIEP8jhXUeGq_eCjYFcqN5b1bxBM4fdk0
|
|
149
149
|
modal_global_objects/mounts/modal_client_package.py,sha256=W0E_yShsRojPzWm6LtIQqNVolapdnrZkm2hVEQuZK_4,767
|
150
150
|
modal_global_objects/mounts/python_standalone.py,sha256=SL_riIxpd8mP4i4CLDCWiFFNj0Ltknm9c_UIGfX5d60,1836
|
151
151
|
modal_proto/__init__.py,sha256=MIEP8jhXUeGq_eCjYFcqN5b1bxBM4fdk0VESpjWR0fc,28
|
152
|
-
modal_proto/api.proto,sha256=
|
152
|
+
modal_proto/api.proto,sha256=ERfCFygQvpd09LyVtpZ-eInPfJ4p6UIDh_z3za_rbsw,80174
|
153
153
|
modal_proto/api_grpc.py,sha256=MLsxlZXikcv36aSs0iVZywIOANMWstVZMWJGQTDjdM0,102823
|
154
|
-
modal_proto/api_pb2.py,sha256=
|
155
|
-
modal_proto/api_pb2.pyi,sha256=
|
154
|
+
modal_proto/api_pb2.py,sha256=dJJ88RIIPlwyTBQk9rKfSfbAxeZXDZn7FpszS6mF0Qs,294984
|
155
|
+
modal_proto/api_pb2.pyi,sha256=I1cHME11tDMerj_8DzHF2SEwN1QorEfdjziW3_v-omA,393699
|
156
156
|
modal_proto/api_pb2_grpc.py,sha256=4d5SwJPLldCqqHz_BGqmJLlX-BMG592WFKUQ6IBg5rg,222415
|
157
157
|
modal_proto/api_pb2_grpc.pyi,sha256=C4c3jndI6TKEgVnx3vAmT86In4T9JKmB1CImiye_aQk,51822
|
158
158
|
modal_proto/modal_api_grpc.py,sha256=eeH1vHXgwO768tM7DXqvj-P37u15SI00gZtm8_EK15I,13732
|
@@ -166,10 +166,10 @@ modal_proto/options_pb2_grpc.pyi,sha256=CImmhxHsYnF09iENPoe8S4J-n93jtgUYD2JPAc0y
|
|
166
166
|
modal_proto/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
167
167
|
modal_version/__init__.py,sha256=BEBWj9tcbFUwzEjUrqly601rauw5cYsHdcmJHs3iu0s,470
|
168
168
|
modal_version/__main__.py,sha256=2FO0yYQQwDTh6udt1h-cBnGd1c4ZyHnHSI4BksxzVac,105
|
169
|
-
modal_version/_version_generated.py,sha256=
|
170
|
-
modal-0.71.
|
171
|
-
modal-0.71.
|
172
|
-
modal-0.71.
|
173
|
-
modal-0.71.
|
174
|
-
modal-0.71.
|
175
|
-
modal-0.71.
|
169
|
+
modal_version/_version_generated.py,sha256=vCubBvI9-d34zmRrXH9kK-02zZQnqA3cVMw5ONOUPds,148
|
170
|
+
modal-0.71.7.dist-info/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
|
171
|
+
modal-0.71.7.dist-info/METADATA,sha256=a3pklm2HmEel6rdqBnRdP8yR4-pVDyljfp9i_JULRvU,2328
|
172
|
+
modal-0.71.7.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
|
173
|
+
modal-0.71.7.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
|
174
|
+
modal-0.71.7.dist-info/top_level.txt,sha256=1nvYbOSIKcmU50fNrpnQnrrOpj269ei3LzgB6j9xGqg,64
|
175
|
+
modal-0.71.7.dist-info/RECORD,,
|
modal_proto/api.proto
CHANGED