modal 0.74.31__py3-none-any.whl → 0.74.33__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 +2 -12
- modal/_utils/function_utils.py +5 -1
- modal/client.pyi +2 -2
- {modal-0.74.31.dist-info → modal-0.74.33.dist-info}/METADATA +1 -1
- {modal-0.74.31.dist-info → modal-0.74.33.dist-info}/RECORD +10 -10
- modal_version/_version_generated.py +1 -1
- {modal-0.74.31.dist-info → modal-0.74.33.dist-info}/WHEEL +0 -0
- {modal-0.74.31.dist-info → modal-0.74.33.dist-info}/entry_points.txt +0 -0
- {modal-0.74.31.dist-info → modal-0.74.33.dist-info}/licenses/LICENSE +0 -0
- {modal-0.74.31.dist-info → modal-0.74.33.dist-info}/top_level.txt +0 -0
modal/_functions.py
CHANGED
@@ -966,19 +966,9 @@ class _Function(typing.Generic[P, ReturnType, OriginalReturnType], _Object, type
|
|
966
966
|
parent = self
|
967
967
|
|
968
968
|
async def _load(param_bound_func: _Function, resolver: Resolver, existing_object_id: Optional[str]):
|
969
|
-
try:
|
970
|
-
identity = f"{parent.info.function_name} class service function"
|
971
|
-
except Exception:
|
972
|
-
# Can't always look up the function name that way, so fall back to generic message
|
973
|
-
identity = "class service function for a parametrized class"
|
974
969
|
if not parent.is_hydrated:
|
975
|
-
|
976
|
-
|
977
|
-
else:
|
978
|
-
reason = ""
|
979
|
-
raise ExecutionError(
|
980
|
-
f"The {identity} has not been hydrated with the metadata it needs to run on Modal{reason}."
|
981
|
-
)
|
970
|
+
# While the base Object.hydrate() method appears to be idempotent, it's not always safe
|
971
|
+
await parent.hydrate()
|
982
972
|
|
983
973
|
assert parent._client and parent._client.stub
|
984
974
|
|
modal/_utils/function_utils.py
CHANGED
@@ -140,7 +140,7 @@ class FunctionInfo:
|
|
140
140
|
def __init__(
|
141
141
|
self,
|
142
142
|
f: Optional[Callable[..., Any]],
|
143
|
-
serialized=False,
|
143
|
+
serialized: bool = False,
|
144
144
|
name_override: Optional[str] = None,
|
145
145
|
user_cls: Optional[type] = None,
|
146
146
|
):
|
@@ -148,6 +148,10 @@ class FunctionInfo:
|
|
148
148
|
self.user_cls = user_cls
|
149
149
|
|
150
150
|
if name_override is not None:
|
151
|
+
if not serialized:
|
152
|
+
# We may relax this constraint in the future, but currently we don't track the distinction between
|
153
|
+
# the Function's name inside modal and the name of the object that we need to import in a container.
|
154
|
+
raise InvalidError("Setting a custom `name=` also requires setting `serialized=True`")
|
151
155
|
self.function_name = name_override
|
152
156
|
elif f is None and user_cls:
|
153
157
|
# "service function" for running all methods of a class
|
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.33"
|
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.33"
|
89
89
|
): ...
|
90
90
|
def is_closed(self) -> bool: ...
|
91
91
|
@property
|
@@ -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=SAne05DDItfyywxXxh_WpmUuSq5BXOc3DXbCsveQhao,74070
|
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=XV6ltRSq0V4LtMUrMO0EsEfsZXxe1bpwdVhheWvo0Ig,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
|
@@ -96,7 +96,7 @@ modal/_utils/blob_utils.py,sha256=WhWaSFLcffVDchMyfKys-j0EFVbm9l7rebzeoa7Z2jM,18
|
|
96
96
|
modal/_utils/bytes_io_segment_payload.py,sha256=uunxVJS4PE1LojF_UpURMzVK9GuvmYWRqQo_bxEj5TU,3385
|
97
97
|
modal/_utils/deprecation.py,sha256=EXP1beU4pmEqEzWMLw6E3kUfNfpmNA_VOp6i0EHi93g,4856
|
98
98
|
modal/_utils/docker_utils.py,sha256=h1uETghR40mp_y3fSWuZAfbIASH1HMzuphJHghAL6DU,3722
|
99
|
-
modal/_utils/function_utils.py,sha256=
|
99
|
+
modal/_utils/function_utils.py,sha256=_q89uQr9v5ontrBkJ-WwEGR-VInJQpaCxmReCmfp4_A,27277
|
100
100
|
modal/_utils/git_utils.py,sha256=qtUU6JAttF55ZxYq51y55OR58B0tDPZsZWK5dJe6W5g,3182
|
101
101
|
modal/_utils/grpc_testing.py,sha256=H1zHqthv19eGPJz2HKXDyWXWGSqO4BRsxah3L5Xaa8A,8619
|
102
102
|
modal/_utils/grpc_utils.py,sha256=YgUfYuOKVYshBmFaIo4VWwcEEIFeZ2VjiVS5Y5K3Lfo,8549
|
@@ -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.33.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=6Use0Q9KiS4_eDdhMKDVfgMatdQWkDUKTNgIT_FQwJE,149
|
174
|
+
modal-0.74.33.dist-info/METADATA,sha256=vvPoqqVkrkz1meqKfpP3v1QGI3qYyREmtjagy7Ha1Jg,2474
|
175
|
+
modal-0.74.33.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
|
176
|
+
modal-0.74.33.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
|
177
|
+
modal-0.74.33.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
|
178
|
+
modal-0.74.33.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|