modal 0.68.24__py3-none-any.whl → 0.68.27__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/app.py +9 -30
- modal/app.pyi +3 -4
- modal/client.pyi +2 -2
- modal/file_io.py +2 -3
- modal/file_io.pyi +5 -8
- modal/sandbox.py +6 -6
- {modal-0.68.24.dist-info → modal-0.68.27.dist-info}/METADATA +1 -1
- {modal-0.68.24.dist-info → modal-0.68.27.dist-info}/RECORD +16 -16
- modal_proto/api.proto +1 -1
- modal_proto/api_pb2.py +750 -750
- modal_proto/api_pb2.pyi +4 -4
- modal_version/_version_generated.py +1 -1
- {modal-0.68.24.dist-info → modal-0.68.27.dist-info}/LICENSE +0 -0
- {modal-0.68.24.dist-info → modal-0.68.27.dist-info}/WHEEL +0 -0
- {modal-0.68.24.dist-info → modal-0.68.27.dist-info}/entry_points.txt +0 -0
- {modal-0.68.24.dist-info → modal-0.68.27.dist-info}/top_level.txt +0 -0
modal/app.py
CHANGED
@@ -45,7 +45,6 @@ from .partial_function import (
|
|
45
45
|
from .proxy import _Proxy
|
46
46
|
from .retries import Retries
|
47
47
|
from .running_app import RunningApp
|
48
|
-
from .sandbox import _Sandbox
|
49
48
|
from .schedule import Schedule
|
50
49
|
from .scheduler_placement import SchedulerPlacement
|
51
50
|
from .secret import _Secret
|
@@ -964,36 +963,16 @@ class _App:
|
|
964
963
|
_experimental_scheduler_placement: Optional[
|
965
964
|
SchedulerPlacement
|
966
965
|
] = None, # Experimental controls over fine-grained scheduling (alpha).
|
967
|
-
) ->
|
968
|
-
"""
|
969
|
-
|
970
|
-
|
971
|
-
|
972
|
-
|
973
|
-
|
974
|
-
|
975
|
-
|
976
|
-
return await _Sandbox.create(
|
977
|
-
*entrypoint_args,
|
978
|
-
app=self,
|
979
|
-
environment_name=self._running_app.environment_name,
|
980
|
-
image=image or _default_image,
|
981
|
-
mounts=mounts,
|
982
|
-
secrets=secrets,
|
983
|
-
timeout=timeout,
|
984
|
-
workdir=workdir,
|
985
|
-
gpu=gpu,
|
986
|
-
cloud=cloud,
|
987
|
-
region=region,
|
988
|
-
cpu=cpu,
|
989
|
-
memory=memory,
|
990
|
-
network_file_systems=network_file_systems,
|
991
|
-
block_network=block_network,
|
992
|
-
volumes=volumes,
|
993
|
-
pty_info=pty_info,
|
994
|
-
_experimental_scheduler_placement=_experimental_scheduler_placement,
|
995
|
-
client=self._client,
|
966
|
+
) -> None:
|
967
|
+
"""mdmd:hidden"""
|
968
|
+
arglist = ", ".join(repr(s) for s in entrypoint_args)
|
969
|
+
message = (
|
970
|
+
"`App.spawn_sandbox` is deprecated.\n\n"
|
971
|
+
"Sandboxes can be created using the `Sandbox` object:\n\n"
|
972
|
+
f"```\nsb = Sandbox.create({arglist}, app=app)\n```\n\n"
|
973
|
+
"See https://modal.com/docs/guide/sandbox for more info on working with sandboxes."
|
996
974
|
)
|
975
|
+
deprecation_error((2024, 7, 5), message)
|
997
976
|
|
998
977
|
def include(self, /, other_app: "_App"):
|
999
978
|
"""Include another App's objects in this one.
|
modal/app.pyi
CHANGED
@@ -13,7 +13,6 @@ import modal.partial_function
|
|
13
13
|
import modal.proxy
|
14
14
|
import modal.retries
|
15
15
|
import modal.running_app
|
16
|
-
import modal.sandbox
|
17
16
|
import modal.schedule
|
18
17
|
import modal.scheduler_placement
|
19
18
|
import modal.secret
|
@@ -261,7 +260,7 @@ class _App:
|
|
261
260
|
] = {},
|
262
261
|
pty_info: typing.Optional[modal_proto.api_pb2.PTYInfo] = None,
|
263
262
|
_experimental_scheduler_placement: typing.Optional[modal.scheduler_placement.SchedulerPlacement] = None,
|
264
|
-
) ->
|
263
|
+
) -> None: ...
|
265
264
|
def include(self, /, other_app: _App): ...
|
266
265
|
def _logs(
|
267
266
|
self, client: typing.Optional[modal.client._Client] = None
|
@@ -491,7 +490,7 @@ class App:
|
|
491
490
|
] = {},
|
492
491
|
pty_info: typing.Optional[modal_proto.api_pb2.PTYInfo] = None,
|
493
492
|
_experimental_scheduler_placement: typing.Optional[modal.scheduler_placement.SchedulerPlacement] = None,
|
494
|
-
) ->
|
493
|
+
) -> None: ...
|
495
494
|
async def aio(
|
496
495
|
self,
|
497
496
|
*entrypoint_args: str,
|
@@ -515,7 +514,7 @@ class App:
|
|
515
514
|
] = {},
|
516
515
|
pty_info: typing.Optional[modal_proto.api_pb2.PTYInfo] = None,
|
517
516
|
_experimental_scheduler_placement: typing.Optional[modal.scheduler_placement.SchedulerPlacement] = None,
|
518
|
-
) ->
|
517
|
+
) -> None: ...
|
519
518
|
|
520
519
|
spawn_sandbox: __spawn_sandbox_spec
|
521
520
|
|
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.68.
|
29
|
+
self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.68.27"
|
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.68.
|
84
|
+
self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.68.27"
|
85
85
|
): ...
|
86
86
|
def is_closed(self) -> bool: ...
|
87
87
|
@property
|
modal/file_io.py
CHANGED
@@ -367,11 +367,10 @@ class _FileIO(Generic[T]):
|
|
367
367
|
if self._closed:
|
368
368
|
raise ValueError("I/O operation on closed file")
|
369
369
|
|
370
|
-
def
|
371
|
-
self._check_closed()
|
370
|
+
async def __aenter__(self) -> "_FileIO":
|
372
371
|
return self
|
373
372
|
|
374
|
-
async def
|
373
|
+
async def __aexit__(self, exc_type, exc_value, traceback) -> None:
|
375
374
|
await self._close()
|
376
375
|
|
377
376
|
|
modal/file_io.pyi
CHANGED
@@ -48,8 +48,8 @@ class _FileIO(typing.Generic[T]):
|
|
48
48
|
def _check_writable(self) -> None: ...
|
49
49
|
def _check_readable(self) -> None: ...
|
50
50
|
def _check_closed(self) -> None: ...
|
51
|
-
def
|
52
|
-
async def
|
51
|
+
async def __aenter__(self) -> _FileIO: ...
|
52
|
+
async def __aexit__(self, exc_type, exc_value, traceback) -> None: ...
|
53
53
|
|
54
54
|
class __delete_bytes_spec(typing_extensions.Protocol):
|
55
55
|
def __call__(self, file: FileIO, start: typing.Optional[int] = None, end: typing.Optional[int] = None) -> None: ...
|
@@ -177,9 +177,6 @@ class FileIO(typing.Generic[T]):
|
|
177
177
|
def _check_readable(self) -> None: ...
|
178
178
|
def _check_closed(self) -> None: ...
|
179
179
|
def __enter__(self) -> FileIO: ...
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
async def aio(self, exc_type, exc_value, traceback) -> None: ...
|
184
|
-
|
185
|
-
__exit__: ____exit___spec
|
180
|
+
async def __aenter__(self) -> FileIO: ...
|
181
|
+
def __exit__(self, exc_type, exc_value, traceback) -> None: ...
|
182
|
+
async def __aexit__(self, exc_type, exc_value, traceback) -> None: ...
|
modal/sandbox.py
CHANGED
@@ -30,7 +30,6 @@ from .exception import (
|
|
30
30
|
SandboxTerminatedError,
|
31
31
|
SandboxTimeoutError,
|
32
32
|
deprecation_error,
|
33
|
-
deprecation_warning,
|
34
33
|
)
|
35
34
|
from .file_io import _FileIO
|
36
35
|
from .gpu import GPU_T
|
@@ -284,13 +283,14 @@ class _Sandbox(_Object, type_prefix="sb"):
|
|
284
283
|
app_id = _App._container_app.app_id
|
285
284
|
app_client = _App._container_app.client
|
286
285
|
else:
|
287
|
-
|
286
|
+
arglist = ", ".join(repr(s) for s in entrypoint_args)
|
287
|
+
deprecation_error(
|
288
288
|
(2024, 9, 14),
|
289
|
-
"Creating a `Sandbox` without an `App` is deprecated.\n"
|
290
|
-
"You may pass in an `App` object, or reference one by name with `App.lookup`:\n"
|
289
|
+
"Creating a `Sandbox` without an `App` is deprecated.\n\n"
|
290
|
+
"You may pass in an `App` object, or reference one by name with `App.lookup`:\n\n"
|
291
291
|
"```\n"
|
292
|
-
"app = modal.App.lookup('
|
293
|
-
"modal.Sandbox.create(
|
292
|
+
"app = modal.App.lookup('sandbox-app', create_if_missing=True)\n"
|
293
|
+
f"sb = modal.Sandbox.create({arglist}, app=app)\n"
|
294
294
|
"```",
|
295
295
|
)
|
296
296
|
|
@@ -15,11 +15,11 @@ modal/_traceback.py,sha256=orZ7rsCk9ekV7ZoFjZTH_H00azCypwRKaLh0MZb1dR8,4898
|
|
15
15
|
modal/_tunnel.py,sha256=o-jJhS4vQ6-XswDhHcJWGMZZmD03SC0e9i8fEu1JTjo,6310
|
16
16
|
modal/_tunnel.pyi,sha256=JmmDYAy9F1FpgJ_hWx0xkom2nTOFQjn4mTPYlU3PFo4,1245
|
17
17
|
modal/_watcher.py,sha256=K6LYnlmSGQB4tWWI9JADv-tvSvQ1j522FwT71B51CX8,3584
|
18
|
-
modal/app.py,sha256=
|
19
|
-
modal/app.pyi,sha256=
|
18
|
+
modal/app.py,sha256=e-zwazkqvbtv0eXnIWQnfBW_v9g_6S9a8CGh1Bzr5HU,45423
|
19
|
+
modal/app.pyi,sha256=3h538rJ0Z2opldsKLuQhDnvop05TfzNG-Uw_n9rEHa4,25197
|
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=9YTYpc1W_gagxXekcHSXylx-k8T2kRj4dkH1mSU2fwM,7280
|
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=ONnrfZ2vPcaY2JuKypPiBA9eTiyg8Qfg-Ull40nn9zs,30956
|
@@ -33,8 +33,8 @@ modal/environments.py,sha256=5cgA-zbm6ngKLsRA19zSOgtgo9-BarJK3FJK0BiF2Lo,6505
|
|
33
33
|
modal/environments.pyi,sha256=XalNpiPkAtHWAvOU2Cotq0ozmtl-Jv0FDsR8h9mr27Q,3521
|
34
34
|
modal/exception.py,sha256=dRK789TD1HaB63kHhu1yZuvS2vP_Vua3iLMBtA6dgqk,7128
|
35
35
|
modal/experimental.py,sha256=jFuNbwrNHos47viMB9q-cHJSvf2RDxDdoEcss9plaZE,2302
|
36
|
-
modal/file_io.py,sha256=
|
37
|
-
modal/file_io.pyi,sha256=
|
36
|
+
modal/file_io.py,sha256=2eoSYpMMYs-FRCQbU7joFvaObuYz6HtEtLBik1hz5Xw,14616
|
37
|
+
modal/file_io.pyi,sha256=QSWGm35no2ApXiy3olLwUiT7jaNKVxIOz0rXQauCg4M,6897
|
38
38
|
modal/file_pattern_matcher.py,sha256=vX6MjWRGdonE4I8QPdjFUnz6moBjSzvgD6417BNQrW4,4021
|
39
39
|
modal/functions.py,sha256=IIdHw0FNOdoMksG1b2zvkn8f-xskhJu07ZvHMey9iq4,67667
|
40
40
|
modal/functions.pyi,sha256=bHbJiWW5TbFKKjDn7bSCFvOcUcAjPFqTStS-NAHPSeM,25068
|
@@ -63,7 +63,7 @@ modal/retries.py,sha256=HKR2Q9aNPWkMjQ5nwobqYTuZaSuw0a8lI2zrtY5IW98,5230
|
|
63
63
|
modal/runner.py,sha256=Q02VdfLCO7YKpnOSqqh58XL3hR2XHaDeiJVYW3MKz_8,24580
|
64
64
|
modal/runner.pyi,sha256=BvMS1ZVzWSn8B8q0KnIZOJKPkN5L-i5b-USbV6SWWHQ,5177
|
65
65
|
modal/running_app.py,sha256=CshNvGDJtagOdKW54uYjY8HY73j2TpnsL9jkPFZAsfA,560
|
66
|
-
modal/sandbox.py,sha256=
|
66
|
+
modal/sandbox.py,sha256=pPHRLcShPoexUaMJUJecsH6YJJVwQtAWc8ouxH3i4y4,27344
|
67
67
|
modal/sandbox.pyi,sha256=QPNuiTLNoKwYf8JK_fmfUBXpdGYlukyaksFV1DpCd2g,18987
|
68
68
|
modal/schedule.py,sha256=0ZFpKs1bOxeo5n3HZjoL7OE2ktsb-_oGtq-WJEPO4tY,2615
|
69
69
|
modal/scheduler_placement.py,sha256=BAREdOY5HzHpzSBqt6jDVR6YC_jYfHMVqOzkyqQfngU,1235
|
@@ -146,10 +146,10 @@ modal_global_objects/mounts/__init__.py,sha256=MIEP8jhXUeGq_eCjYFcqN5b1bxBM4fdk0
|
|
146
146
|
modal_global_objects/mounts/modal_client_package.py,sha256=W0E_yShsRojPzWm6LtIQqNVolapdnrZkm2hVEQuZK_4,767
|
147
147
|
modal_global_objects/mounts/python_standalone.py,sha256=SL_riIxpd8mP4i4CLDCWiFFNj0Ltknm9c_UIGfX5d60,1836
|
148
148
|
modal_proto/__init__.py,sha256=MIEP8jhXUeGq_eCjYFcqN5b1bxBM4fdk0VESpjWR0fc,28
|
149
|
-
modal_proto/api.proto,sha256=
|
149
|
+
modal_proto/api.proto,sha256=Fdc1QR9kxirCiZW7o8fslrYd8vk-gR2dWOWj2uCbkHk,79553
|
150
150
|
modal_proto/api_grpc.py,sha256=DveC4ejFYEhCLiWbQShnmY31_FWGYU675Bmr7nHhsgs,101342
|
151
|
-
modal_proto/api_pb2.py,sha256=
|
152
|
-
modal_proto/api_pb2.pyi,sha256=
|
151
|
+
modal_proto/api_pb2.py,sha256=EwN_R_HDiLP0s61rpSRQ5r6Kwof_XiPtH-lqeX6gC9I,292335
|
152
|
+
modal_proto/api_pb2.pyi,sha256=Ggl_mfNlUQWPQaxDUMqeC4Rglf1xXSf4Kx8vIFPiXp8,390741
|
153
153
|
modal_proto/api_pb2_grpc.py,sha256=2PEP6JPOoTw2rDC5qYjLNuumP68ZwAouRhCoayisAhY,219162
|
154
154
|
modal_proto/api_pb2_grpc.pyi,sha256=uWtCxVEd0cFpOZ1oOGfZNO7Dv45OP4kp09jMnNyx9D4,51098
|
155
155
|
modal_proto/modal_api_grpc.py,sha256=-8mLby_om5MYo6yu1zA_hqhz0yLsQW7k2YWBVZW1iVs,13546
|
@@ -163,10 +163,10 @@ modal_proto/options_pb2_grpc.pyi,sha256=CImmhxHsYnF09iENPoe8S4J-n93jtgUYD2JPAc0y
|
|
163
163
|
modal_proto/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
164
164
|
modal_version/__init__.py,sha256=RT6zPoOdFO99u5Wcxxaoir4ZCuPTbQ22cvzFAXl3vUY,470
|
165
165
|
modal_version/__main__.py,sha256=2FO0yYQQwDTh6udt1h-cBnGd1c4ZyHnHSI4BksxzVac,105
|
166
|
-
modal_version/_version_generated.py,sha256
|
167
|
-
modal-0.68.
|
168
|
-
modal-0.68.
|
169
|
-
modal-0.68.
|
170
|
-
modal-0.68.
|
171
|
-
modal-0.68.
|
172
|
-
modal-0.68.
|
166
|
+
modal_version/_version_generated.py,sha256=-fthnpx3dlNaui7c3f7RAZuXLNwCnL-H9fI359j-_3Y,149
|
167
|
+
modal-0.68.27.dist-info/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
|
168
|
+
modal-0.68.27.dist-info/METADATA,sha256=jSpBvGP2tKY45IX_6MISrLQxLm1QI8OT8DRPVY5vzlQ,2329
|
169
|
+
modal-0.68.27.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
|
170
|
+
modal-0.68.27.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
|
171
|
+
modal-0.68.27.dist-info/top_level.txt,sha256=1nvYbOSIKcmU50fNrpnQnrrOpj269ei3LzgB6j9xGqg,64
|
172
|
+
modal-0.68.27.dist-info/RECORD,,
|
modal_proto/api.proto
CHANGED
@@ -361,7 +361,7 @@ message AppHeartbeatRequest {
|
|
361
361
|
}
|
362
362
|
|
363
363
|
message AppLayout {
|
364
|
-
repeated Object
|
364
|
+
repeated Object objects = 1;
|
365
365
|
map<string, string> function_ids = 2; // tag -> function id
|
366
366
|
map<string, string> class_ids = 3; // tag -> class id
|
367
367
|
}
|