modal 0.73.77__py3-none-any.whl → 0.73.78__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/cls.py +27 -7
- modal/functions.pyi +6 -6
- {modal-0.73.77.dist-info → modal-0.73.78.dist-info}/METADATA +1 -1
- {modal-0.73.77.dist-info → modal-0.73.78.dist-info}/RECORD +10 -10
- modal_version/_version_generated.py +1 -1
- {modal-0.73.77.dist-info → modal-0.73.78.dist-info}/LICENSE +0 -0
- {modal-0.73.77.dist-info → modal-0.73.78.dist-info}/WHEEL +0 -0
- {modal-0.73.77.dist-info → modal-0.73.78.dist-info}/entry_points.txt +0 -0
- {modal-0.73.77.dist-info → modal-0.73.78.dist-info}/top_level.txt +0 -0
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.78"
|
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.78"
|
89
89
|
): ...
|
90
90
|
def is_closed(self) -> bool: ...
|
91
91
|
@property
|
modal/cls.py
CHANGED
@@ -110,11 +110,14 @@ def _bind_instance_method(cls: "_Cls", service_function: _Function, method_name:
|
|
110
110
|
hydrate_from_instance_service_function(fun)
|
111
111
|
|
112
112
|
def _deps():
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
113
|
+
unhydrated_deps = []
|
114
|
+
# without this check, the common service_function will be reloaded by all methods
|
115
|
+
# TODO(elias): Investigate if we can fix this multi-loader in the resolver - feels like a bug?
|
116
|
+
if not cls.is_hydrated:
|
117
|
+
unhydrated_deps.append(cls)
|
118
|
+
if not service_function.is_hydrated:
|
119
|
+
unhydrated_deps.append(service_function)
|
120
|
+
return unhydrated_deps
|
118
121
|
|
119
122
|
rep = f"Method({cls._name}.{method_name})"
|
120
123
|
|
@@ -368,7 +371,7 @@ class _Cls(_Object, type_prefix="cs"):
|
|
368
371
|
"""
|
369
372
|
|
370
373
|
_class_service_function: Optional[_Function] # The _Function (read "service") serving *all* methods of the class
|
371
|
-
_options: Optional[_ServiceOptions]
|
374
|
+
_options: Optional[_ServiceOptions]
|
372
375
|
|
373
376
|
_app: Optional["modal.app._App"] = None # not set for lookups
|
374
377
|
_name: Optional[str]
|
@@ -609,7 +612,24 @@ class _Cls(_Object, type_prefix="cs"):
|
|
609
612
|
else:
|
610
613
|
resources = None
|
611
614
|
|
612
|
-
|
615
|
+
async def _load_from_base(new_cls, resolver, existing_object_id):
|
616
|
+
# this is a bit confusing, the cls will always have the same metadata
|
617
|
+
# since it has the same *class* service function (i.e. "template")
|
618
|
+
# But the (instance) service function for each Obj will be different
|
619
|
+
# since it will rebind to whatever `_options` have been assigned on
|
620
|
+
# the particular Cls parent
|
621
|
+
if not self.is_hydrated:
|
622
|
+
# this should only happen for Cls.from_name instances
|
623
|
+
# other classes should already be hydrated!
|
624
|
+
await resolver.load(self)
|
625
|
+
|
626
|
+
new_cls._initialize_from_other(self)
|
627
|
+
|
628
|
+
def _deps():
|
629
|
+
return []
|
630
|
+
|
631
|
+
cls = _Cls._from_loader(_load_from_base, rep=f"{self._name}.with_options(...)", is_another_app=True, deps=_deps)
|
632
|
+
cls._initialize_from_other(self)
|
613
633
|
cls._options = _ServiceOptions(
|
614
634
|
secrets=secrets,
|
615
635
|
resources=resources,
|
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
|
|
@@ -22,10 +22,10 @@ modal/app.py,sha256=kF3frIt4eRKVYYCjusMMhKJpO_lDdm2z37HOXPwpjT8,45506
|
|
22
22
|
modal/app.pyi,sha256=tZFbcsu20SuvfB2puxCyuXLFNJ9bQulzag55rVpgZmc,26827
|
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=nsP8_keaoKGSvTKUjg-5lvGIkudDje81JI4blMbvPA0,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
|
-
modal/cls.py,sha256=
|
28
|
+
modal/cls.py,sha256=5DjpSBP1IyROKZm5ItDiEGdbRnfTT6K1Ul0jEvEKw_Q,31695
|
29
29
|
modal/cls.pyi,sha256=ZJUwtRaQBGlM6tphvnv49FHBVDSgttMdD_LnYyRSKJM,10302
|
30
30
|
modal/config.py,sha256=Boz1bPzaG-k5Grjq6y6fAELH1N_gTuYDnpB6FODzCPo,11710
|
31
31
|
modal/container_process.py,sha256=WTqLn01dJPVkPpwR_0w_JH96ceN5mV4TGtiu1ZR2RRA,6108
|
@@ -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=ujc6eIYyNmMn__4dpxEy85-vZmAniZv56D2A4uBgs6U,14377
|
45
45
|
modal/gpu.py,sha256=Kbhs_u49FaC2Zi0TjCdrpstpRtT5eZgecynmQi5IZVE,6752
|
46
46
|
modal/image.py,sha256=adMUpS7WrCu-M78BWslz2r6GPviy4qPvd5Dh-dBIrrk,90257
|
47
47
|
modal/image.pyi,sha256=L7aZUOElSGtNHmFHz1RgKP1cG5paiXt_EzylrwBwzVk,25004
|
@@ -168,10 +168,10 @@ modal_proto/options_pb2_grpc.pyi,sha256=CImmhxHsYnF09iENPoe8S4J-n93jtgUYD2JPAc0y
|
|
168
168
|
modal_proto/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
169
169
|
modal_version/__init__.py,sha256=wiJQ53c-OMs0Xf1UeXOxQ7FwlV1VzIjnX6o-pRYZ_Pk,470
|
170
170
|
modal_version/__main__.py,sha256=2FO0yYQQwDTh6udt1h-cBnGd1c4ZyHnHSI4BksxzVac,105
|
171
|
-
modal_version/_version_generated.py,sha256=
|
172
|
-
modal-0.73.
|
173
|
-
modal-0.73.
|
174
|
-
modal-0.73.
|
175
|
-
modal-0.73.
|
176
|
-
modal-0.73.
|
177
|
-
modal-0.73.
|
171
|
+
modal_version/_version_generated.py,sha256=SVM-j7lp7Izmro-RLUeewxt817YY4EwwPw1pMBXAJso,149
|
172
|
+
modal-0.73.78.dist-info/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
|
173
|
+
modal-0.73.78.dist-info/METADATA,sha256=X3t3uscecWYwdrRCFn-rrPcuGE664EzvBTfL9PseXMk,2452
|
174
|
+
modal-0.73.78.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
|
175
|
+
modal-0.73.78.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
|
176
|
+
modal-0.73.78.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
|
177
|
+
modal-0.73.78.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|