modal 0.66.51__py3-none-any.whl → 0.66.52__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 +1 -1
- modal/object.py +1 -1
- modal/object.pyi +2 -0
- modal/volume.py +13 -6
- modal/volume.pyi +10 -4
- {modal-0.66.51.dist-info → modal-0.66.52.dist-info}/METADATA +1 -1
- {modal-0.66.51.dist-info → modal-0.66.52.dist-info}/RECORD +14 -14
- modal_version/_version_generated.py +1 -1
- {modal-0.66.51.dist-info → modal-0.66.52.dist-info}/LICENSE +0 -0
- {modal-0.66.51.dist-info → modal-0.66.52.dist-info}/WHEEL +0 -0
- {modal-0.66.51.dist-info → modal-0.66.52.dist-info}/entry_points.txt +0 -0
- {modal-0.66.51.dist-info → modal-0.66.52.dist-info}/top_level.txt +0 -0
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[typing.Tuple[str, str]],
|
34
|
-
version: str = "0.66.
|
34
|
+
version: str = "0.66.52",
|
35
35
|
): ...
|
36
36
|
def is_closed(self) -> bool: ...
|
37
37
|
@property
|
@@ -90,7 +90,7 @@ class Client:
|
|
90
90
|
server_url: str,
|
91
91
|
client_type: int,
|
92
92
|
credentials: typing.Optional[typing.Tuple[str, str]],
|
93
|
-
version: str = "0.66.
|
93
|
+
version: str = "0.66.52",
|
94
94
|
): ...
|
95
95
|
def is_closed(self) -> bool: ...
|
96
96
|
@property
|
modal/functions.pyi
CHANGED
@@ -446,11 +446,11 @@ class Function(typing.Generic[P, ReturnType, OriginalReturnType], modal.object.O
|
|
446
446
|
|
447
447
|
_call_generator_nowait: ___call_generator_nowait_spec
|
448
448
|
|
449
|
-
class __remote_spec(typing_extensions.Protocol[
|
449
|
+
class __remote_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER]):
|
450
450
|
def __call__(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER: ...
|
451
451
|
async def aio(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER: ...
|
452
452
|
|
453
|
-
remote: __remote_spec[
|
453
|
+
remote: __remote_spec[ReturnType, P]
|
454
454
|
|
455
455
|
class __remote_gen_spec(typing_extensions.Protocol):
|
456
456
|
def __call__(self, *args, **kwargs) -> typing.Generator[typing.Any, None, None]: ...
|
@@ -462,17 +462,17 @@ class Function(typing.Generic[P, ReturnType, OriginalReturnType], modal.object.O
|
|
462
462
|
def _get_obj(self) -> typing.Optional[modal.cls.Obj]: ...
|
463
463
|
def local(self, *args: P.args, **kwargs: P.kwargs) -> OriginalReturnType: ...
|
464
464
|
|
465
|
-
class ___experimental_spawn_spec(typing_extensions.Protocol[
|
465
|
+
class ___experimental_spawn_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER]):
|
466
466
|
def __call__(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
|
467
467
|
async def aio(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
|
468
468
|
|
469
|
-
_experimental_spawn: ___experimental_spawn_spec[
|
469
|
+
_experimental_spawn: ___experimental_spawn_spec[ReturnType, P]
|
470
470
|
|
471
|
-
class __spawn_spec(typing_extensions.Protocol[
|
471
|
+
class __spawn_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER]):
|
472
472
|
def __call__(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
|
473
473
|
async def aio(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
|
474
474
|
|
475
|
-
spawn: __spawn_spec[
|
475
|
+
spawn: __spawn_spec[ReturnType, P]
|
476
476
|
|
477
477
|
def get_raw_f(self) -> typing.Callable[..., typing.Any]: ...
|
478
478
|
|
modal/image.py
CHANGED
@@ -1714,7 +1714,7 @@ class _Image(_Object, type_prefix="im"):
|
|
1714
1714
|
"""
|
1715
1715
|
|
1716
1716
|
def build_dockerfile(version: ImageBuilderVersion) -> DockerfileSpec:
|
1717
|
-
commands = ["FROM base", f"WORKDIR {shlex.quote(path)}"]
|
1717
|
+
commands = ["FROM base", f"WORKDIR {shlex.quote(str(path))}"]
|
1718
1718
|
return DockerfileSpec(commands=commands, context_files={})
|
1719
1719
|
|
1720
1720
|
return _Image._from_args(
|
modal/object.py
CHANGED
@@ -17,7 +17,7 @@ O = TypeVar("O", bound="_Object")
|
|
17
17
|
|
18
18
|
_BLOCKING_O = synchronize_api(O)
|
19
19
|
|
20
|
-
EPHEMERAL_OBJECT_HEARTBEAT_SLEEP = 300
|
20
|
+
EPHEMERAL_OBJECT_HEARTBEAT_SLEEP: int = 300
|
21
21
|
|
22
22
|
|
23
23
|
def _get_environment_name(environment_name: Optional[str] = None, resolver: Optional[Resolver] = None) -> Optional[str]:
|
modal/object.pyi
CHANGED
modal/volume.py
CHANGED
@@ -122,14 +122,21 @@ class _Volume(_Object, type_prefix="vo"):
|
|
122
122
|
```
|
123
123
|
"""
|
124
124
|
|
125
|
-
_lock: asyncio.Lock
|
125
|
+
_lock: Optional[asyncio.Lock] = None
|
126
126
|
|
127
|
-
def
|
127
|
+
async def _get_lock(self):
|
128
128
|
# To (mostly*) prevent multiple concurrent operations on the same volume, which can cause problems under
|
129
129
|
# some unlikely circumstances.
|
130
130
|
# *: You can bypass this by creating multiple handles to the same volume, e.g. via lookup. But this
|
131
131
|
# covers the typical case = good enough.
|
132
|
-
|
132
|
+
|
133
|
+
# Note: this function runs no async code but is marked as async to ensure it's
|
134
|
+
# being run inside the synchronicity event loop and binds the lock to the
|
135
|
+
# correct event loop on Python 3.9 which eagerly assigns event loops on
|
136
|
+
# constructions of locks
|
137
|
+
if self._lock is None:
|
138
|
+
self._lock = asyncio.Lock()
|
139
|
+
return self._lock
|
133
140
|
|
134
141
|
@staticmethod
|
135
142
|
def new():
|
@@ -188,7 +195,7 @@ class _Volume(_Object, type_prefix="vo"):
|
|
188
195
|
environment_name: Optional[str] = None,
|
189
196
|
version: "typing.Optional[modal_proto.api_pb2.VolumeFsVersion.ValueType]" = None,
|
190
197
|
_heartbeat_sleep: float = EPHEMERAL_OBJECT_HEARTBEAT_SLEEP,
|
191
|
-
) ->
|
198
|
+
) -> AsyncGenerator["_Volume", None]:
|
192
199
|
"""Creates a new ephemeral volume within a context manager:
|
193
200
|
|
194
201
|
Usage:
|
@@ -269,7 +276,7 @@ class _Volume(_Object, type_prefix="vo"):
|
|
269
276
|
|
270
277
|
@live_method
|
271
278
|
async def _do_reload(self, lock=True):
|
272
|
-
async with self.
|
279
|
+
async with (await self._get_lock()) if lock else asyncnullcontext():
|
273
280
|
req = api_pb2.VolumeReloadRequest(volume_id=self.object_id)
|
274
281
|
_ = await retry_transient_errors(self._client.stub.VolumeReload, req)
|
275
282
|
|
@@ -280,7 +287,7 @@ class _Volume(_Object, type_prefix="vo"):
|
|
280
287
|
If successful, the changes made are now persisted in durable storage and available to other containers accessing
|
281
288
|
the volume.
|
282
289
|
"""
|
283
|
-
async with self.
|
290
|
+
async with await self._get_lock():
|
284
291
|
req = api_pb2.VolumeCommitRequest(volume_id=self.object_id)
|
285
292
|
try:
|
286
293
|
# TODO(gongy): only apply indefinite retries on 504 status.
|
modal/volume.pyi
CHANGED
@@ -33,9 +33,9 @@ class FileEntry:
|
|
33
33
|
def __hash__(self): ...
|
34
34
|
|
35
35
|
class _Volume(modal.object._Object):
|
36
|
-
_lock: asyncio.locks.Lock
|
36
|
+
_lock: typing.Optional[asyncio.locks.Lock]
|
37
37
|
|
38
|
-
def
|
38
|
+
async def _get_lock(self): ...
|
39
39
|
@staticmethod
|
40
40
|
def new(): ...
|
41
41
|
@staticmethod
|
@@ -122,10 +122,16 @@ class _VolumeUploadContextManager:
|
|
122
122
|
) -> modal_proto.api_pb2.MountFile: ...
|
123
123
|
|
124
124
|
class Volume(modal.object.Object):
|
125
|
-
_lock: asyncio.locks.Lock
|
125
|
+
_lock: typing.Optional[asyncio.locks.Lock]
|
126
126
|
|
127
127
|
def __init__(self, *args, **kwargs): ...
|
128
|
-
|
128
|
+
|
129
|
+
class ___get_lock_spec(typing_extensions.Protocol):
|
130
|
+
def __call__(self): ...
|
131
|
+
async def aio(self): ...
|
132
|
+
|
133
|
+
_get_lock: ___get_lock_spec
|
134
|
+
|
129
135
|
@staticmethod
|
130
136
|
def new(): ...
|
131
137
|
@staticmethod
|
@@ -19,7 +19,7 @@ modal/app.py,sha256=ZQux8ZGLblIWbKHn7s15mucx97EwbjJso9WKRTYYOf0,45208
|
|
19
19
|
modal/app.pyi,sha256=sX2BXX_178lp8O_GvwZqsxDdxQi1j3DjNfthMvlMlJU,25273
|
20
20
|
modal/call_graph.py,sha256=l-Wi6vM8aosCdHTWegcCyGeVJGFdZ_fzlCmbRVPBXFI,2593
|
21
21
|
modal/client.py,sha256=4SpWb4n0nolITR36kADZl1tYLOg6avukmzZU56UQjCo,16385
|
22
|
-
modal/client.pyi,sha256
|
22
|
+
modal/client.pyi,sha256=fZ4BnAY7mf5yMxkRhmEJsqP6ioP6e0IZZA42KcCxluk,7372
|
23
23
|
modal/cloud_bucket_mount.py,sha256=eWQhCtMIczpokjfTZEgNBCGO_s5ft46PqTSLfKBykq4,5748
|
24
24
|
modal/cloud_bucket_mount.pyi,sha256=tTF7M4FR9bTA30cFkz8qq3ZTlFL19NHU_36e_5GgAGA,1424
|
25
25
|
modal/cls.py,sha256=apKnBOHKYEpBiMC8mRvHtCDJl1g0vP0tG1r8mUZ1yH0,24684
|
@@ -34,9 +34,9 @@ modal/environments.pyi,sha256=oScvFAclF55-tL9UioLIL_SPBwgy_9O-BBvJ-PLbRgY,3542
|
|
34
34
|
modal/exception.py,sha256=K-czk1oK8wFvK8snWrytXSByo2WNb9SJAlgBVPGWZBs,6417
|
35
35
|
modal/experimental.py,sha256=jFuNbwrNHos47viMB9q-cHJSvf2RDxDdoEcss9plaZE,2302
|
36
36
|
modal/functions.py,sha256=BxccB-3a1migZQ6JA6iiHZJQ7WQ-jYpmg9DEZoTxzcc,71639
|
37
|
-
modal/functions.pyi,sha256=
|
37
|
+
modal/functions.pyi,sha256=5JGM4Mhpm674Ia7h3OTsPBmZA32goyOs2oBCCUG8A3I,24800
|
38
38
|
modal/gpu.py,sha256=r4rL6uH3UJIQthzYvfWauXNyh01WqCPtKZCmmSX1fd4,6881
|
39
|
-
modal/image.py,sha256=
|
39
|
+
modal/image.py,sha256=f4OB4gfyaSz3mQjumzEMeZT4Uq0SzsGBMN5NkPQQSec,79550
|
40
40
|
modal/image.pyi,sha256=3rfae_E0KuNHqdi5j33nHXp_7P3tTkt7QKH5cXYczUc,24672
|
41
41
|
modal/io_streams.py,sha256=XUsNsxRzDrhkjyb2Hx0hugCoOEz266SHQF8wP-VgsfY,14582
|
42
42
|
modal/io_streams.pyi,sha256=WJmSI1WvZITUNBO7mnIuJgYdSKdbLaHk10V4GbttAVw,4452
|
@@ -44,8 +44,8 @@ modal/mount.py,sha256=QZ4nabpbNU9tjLIPCq86rlHor9CXzADMkhJWBYfKKgg,27750
|
|
44
44
|
modal/mount.pyi,sha256=nywUmeUELLY2OEnAc1NNBHmSxuEylTWBzkh6nuXkkuc,9965
|
45
45
|
modal/network_file_system.py,sha256=P_LsILecyda1SRHU76Hk4Lq3M1HSx9shFJbaLThzw0U,14071
|
46
46
|
modal/network_file_system.pyi,sha256=XLyUnDx55ExbJcF_xlKxRax_r06XTvSsQh-a-_EyCOU,7239
|
47
|
-
modal/object.py,sha256=
|
48
|
-
modal/object.pyi,sha256=
|
47
|
+
modal/object.py,sha256=Qgee_lQJY_583YsGIVrSNuDF_gJA_qmTAeVTVI1tf-g,9637
|
48
|
+
modal/object.pyi,sha256=uGGD5A2B_mj8jxLfFiHama5wzCcBS_GNvPSKsIfsCO0,8518
|
49
49
|
modal/output.py,sha256=FtPR7yvjZMgdSKD_KYkIcwYgCOiV9EKYjaj7K55Hjvg,1940
|
50
50
|
modal/parallel_map.py,sha256=lf8Wer6FAf8-dYqPqoL45cz7FYDU66-TF-h5CO2Kf5Q,16052
|
51
51
|
modal/parallel_map.pyi,sha256=pOhT0P3DDYlwLx0fR3PTsecA7DI8uOdXC1N8i-ZkyOY,2328
|
@@ -71,8 +71,8 @@ modal/serving.pyi,sha256=0KWUH5rdYnihSv1XB8bK9GokzpfzrCq8Sf6nYlUvQI8,1689
|
|
71
71
|
modal/stream_type.py,sha256=A6320qoAAWhEfwOCZfGtymQTu5AfLfJXXgARqooTPvY,417
|
72
72
|
modal/token_flow.py,sha256=lsVpJACut76AeJLw44vJKMSlpcqp8wcvxdUOoX6CIOc,6754
|
73
73
|
modal/token_flow.pyi,sha256=qEYP7grgqSA440w7kBREU9Ezeo_NxCT67OciIPgDzcc,1958
|
74
|
-
modal/volume.py,sha256=
|
75
|
-
modal/volume.pyi,sha256=
|
74
|
+
modal/volume.py,sha256=5IdcerxXjP9MpAZm9QXPTWRDYZD5UJSFebWGglCha8k,29301
|
75
|
+
modal/volume.pyi,sha256=3lB6wiC75u3o44cwJVqDsmvR4wsP2JXSxJrVXi9KrK4,11127
|
76
76
|
modal/_runtime/__init__.py,sha256=MIEP8jhXUeGq_eCjYFcqN5b1bxBM4fdk0VESpjWR0fc,28
|
77
77
|
modal/_runtime/asgi.py,sha256=WoAwIiGKpk089MOca3_iA73h36v0uBuoPx0-87ajIDY,19843
|
78
78
|
modal/_runtime/container_io_manager.py,sha256=_MEhwyCSYeCaPQnztPxkm0anRXa3CPcwIKi403N53uo,44120
|
@@ -159,10 +159,10 @@ modal_proto/options_pb2_grpc.pyi,sha256=CImmhxHsYnF09iENPoe8S4J-n93jtgUYD2JPAc0y
|
|
159
159
|
modal_proto/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
160
160
|
modal_version/__init__.py,sha256=UnAuHBPuPSstqgdCOx0SBVdfhpeJnMlY_oxEbu44Izg,470
|
161
161
|
modal_version/__main__.py,sha256=2FO0yYQQwDTh6udt1h-cBnGd1c4ZyHnHSI4BksxzVac,105
|
162
|
-
modal_version/_version_generated.py,sha256=
|
163
|
-
modal-0.66.
|
164
|
-
modal-0.66.
|
165
|
-
modal-0.66.
|
166
|
-
modal-0.66.
|
167
|
-
modal-0.66.
|
168
|
-
modal-0.66.
|
162
|
+
modal_version/_version_generated.py,sha256=ejUtktb37whw_RO7gJu2mzTcbyyje5SrnzvpI_2mGrs,149
|
163
|
+
modal-0.66.52.dist-info/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
|
164
|
+
modal-0.66.52.dist-info/METADATA,sha256=KVM51Rvw6DWszOpsfhoC4drFw8BsskaqrjACjmrlF_c,2329
|
165
|
+
modal-0.66.52.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
|
166
|
+
modal-0.66.52.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
|
167
|
+
modal-0.66.52.dist-info/top_level.txt,sha256=1nvYbOSIKcmU50fNrpnQnrrOpj269ei3LzgB6j9xGqg,64
|
168
|
+
modal-0.66.52.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|