modal 0.67.33__py3-none-any.whl → 0.67.43__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/_runtime/container_io_manager.py +2 -2
- modal/cli/_traceback.py +8 -3
- modal/cli/app.py +1 -1
- modal/cli/container.py +16 -5
- modal/cli/network_file_system.py +23 -2
- modal/cli/run.py +23 -14
- modal/cli/utils.py +4 -0
- modal/client.py +1 -1
- modal/client.pyi +2 -2
- modal/container_process.py +10 -3
- modal/container_process.pyi +3 -3
- modal/functions.py +2 -2
- modal/functions.pyi +4 -4
- modal/io_streams.py +1 -1
- modal/network_file_system.py +6 -0
- modal/network_file_system.pyi +20 -0
- modal/queue.py +33 -27
- modal/runner.py +14 -3
- modal/runner.pyi +9 -3
- modal/sandbox.py +46 -14
- modal/sandbox.pyi +10 -3
- {modal-0.67.33.dist-info → modal-0.67.43.dist-info}/METADATA +1 -1
- {modal-0.67.33.dist-info → modal-0.67.43.dist-info}/RECORD +35 -35
- modal_proto/api.proto +26 -1
- modal_proto/api_grpc.py +16 -0
- modal_proto/api_pb2.py +743 -710
- modal_proto/api_pb2.pyi +88 -4
- modal_proto/api_pb2_grpc.py +34 -1
- modal_proto/api_pb2_grpc.pyi +13 -3
- modal_proto/modal_api_grpc.py +1 -0
- modal_version/_version_generated.py +1 -1
- {modal-0.67.33.dist-info → modal-0.67.43.dist-info}/LICENSE +0 -0
- {modal-0.67.33.dist-info → modal-0.67.43.dist-info}/WHEEL +0 -0
- {modal-0.67.33.dist-info → modal-0.67.43.dist-info}/entry_points.txt +0 -0
- {modal-0.67.33.dist-info → modal-0.67.43.dist-info}/top_level.txt +0 -0
modal/sandbox.py
CHANGED
@@ -21,7 +21,14 @@ from ._utils.mount_utils import validate_network_file_systems, validate_volumes
|
|
21
21
|
from .client import _Client
|
22
22
|
from .config import config
|
23
23
|
from .container_process import _ContainerProcess
|
24
|
-
from .exception import
|
24
|
+
from .exception import (
|
25
|
+
ExecutionError,
|
26
|
+
InvalidError,
|
27
|
+
SandboxTerminatedError,
|
28
|
+
SandboxTimeoutError,
|
29
|
+
deprecation_error,
|
30
|
+
deprecation_warning,
|
31
|
+
)
|
25
32
|
from .gpu import GPU_T
|
26
33
|
from .image import _Image
|
27
34
|
from .io_streams import StreamReader, StreamWriter, _StreamReader, _StreamWriter
|
@@ -196,7 +203,10 @@ class _Sandbox(_Object, type_prefix="sb"):
|
|
196
203
|
gpu: GPU_T = None,
|
197
204
|
cloud: Optional[str] = None,
|
198
205
|
region: Optional[Union[str, Sequence[str]]] = None, # Region or regions to run the sandbox on.
|
199
|
-
|
206
|
+
# Specify, in fractional CPU cores, how many CPU cores to request.
|
207
|
+
# Or, pass (request, limit) to additionally specify a hard limit in fractional CPU cores.
|
208
|
+
# CPU throttling will prevent a container from exceeding its specified limit.
|
209
|
+
cpu: Optional[Union[float, tuple[float, float]]] = None,
|
200
210
|
# Specify, in MiB, a memory request which is the minimum memory required.
|
201
211
|
# Or, pass (request, limit) to additionally specify a hard limit in MiB.
|
202
212
|
memory: Optional[Union[int, tuple[int, int]]] = None,
|
@@ -331,6 +341,29 @@ class _Sandbox(_Object, type_prefix="sb"):
|
|
331
341
|
except GRPCError as exc:
|
332
342
|
raise InvalidError(exc.message) if exc.status == Status.INVALID_ARGUMENT else exc
|
333
343
|
|
344
|
+
async def snapshot_filesystem(self, timeout: int = 55) -> _Image:
|
345
|
+
"""Snapshot the filesystem of the Sandbox.
|
346
|
+
|
347
|
+
Returns an [`Image`](https://modal.com/docs/reference/modal.Image) object which
|
348
|
+
can be used to spawn a new Sandbox with the same filesystem.
|
349
|
+
"""
|
350
|
+
req = api_pb2.SandboxSnapshotFsRequest(sandbox_id=self.object_id, timeout=timeout)
|
351
|
+
resp = await retry_transient_errors(self._client.stub.SandboxSnapshotFs, req)
|
352
|
+
|
353
|
+
if resp.result.status != api_pb2.GenericResult.GENERIC_STATUS_SUCCESS:
|
354
|
+
raise ExecutionError(resp.result.exception)
|
355
|
+
|
356
|
+
image_id = resp.image_id
|
357
|
+
metadata = resp.image_metadata
|
358
|
+
|
359
|
+
async def _load(self: _Image, resolver: Resolver, existing_object_id: Optional[str]):
|
360
|
+
self._hydrate(image_id, resolver.client, metadata)
|
361
|
+
|
362
|
+
rep = "Image()"
|
363
|
+
image = _Image._from_loader(_load, rep)
|
364
|
+
|
365
|
+
return image
|
366
|
+
|
334
367
|
# Live handle methods
|
335
368
|
|
336
369
|
async def wait(self, raise_on_termination: bool = True):
|
@@ -481,17 +514,16 @@ class _Sandbox(_Object, type_prefix="sb"):
|
|
481
514
|
await secret.resolve(client=self._client)
|
482
515
|
|
483
516
|
task_id = await self._get_task_id()
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
secret_ids=[secret.object_id for secret in secrets],
|
493
|
-
)
|
517
|
+
req = api_pb2.ContainerExecRequest(
|
518
|
+
task_id=task_id,
|
519
|
+
command=cmds,
|
520
|
+
pty_info=_pty_info or pty_info,
|
521
|
+
runtime_debug=config.get("function_runtime_debug"),
|
522
|
+
timeout_secs=timeout or 0,
|
523
|
+
workdir=workdir,
|
524
|
+
secret_ids=[secret.object_id for secret in secrets],
|
494
525
|
)
|
526
|
+
resp = await retry_transient_errors(self._client.stub.ContainerExec, req)
|
495
527
|
by_line = bufsize == 1
|
496
528
|
return _ContainerProcess(resp.exec_id, self._client, stdout=stdout, stderr=stderr, text=text, by_line=by_line)
|
497
529
|
|
@@ -581,7 +613,7 @@ Sandbox = synchronize_api(_Sandbox)
|
|
581
613
|
|
582
614
|
def __getattr__(name):
|
583
615
|
if name == "LogsReader":
|
584
|
-
|
616
|
+
deprecation_error(
|
585
617
|
(2024, 8, 12),
|
586
618
|
"`modal.sandbox.LogsReader` is deprecated. Please import `modal.io_streams.StreamReader` instead.",
|
587
619
|
)
|
@@ -589,7 +621,7 @@ def __getattr__(name):
|
|
589
621
|
|
590
622
|
return StreamReader
|
591
623
|
elif name == "StreamWriter":
|
592
|
-
|
624
|
+
deprecation_error(
|
593
625
|
(2024, 8, 12),
|
594
626
|
"`modal.sandbox.StreamWriter` is deprecated. Please import `modal.io_streams.StreamWriter` instead.",
|
595
627
|
)
|
modal/sandbox.pyi
CHANGED
@@ -69,7 +69,7 @@ class _Sandbox(modal.object._Object):
|
|
69
69
|
gpu: typing.Union[None, bool, str, modal.gpu._GPUConfig] = None,
|
70
70
|
cloud: typing.Optional[str] = None,
|
71
71
|
region: typing.Union[str, collections.abc.Sequence[str], None] = None,
|
72
|
-
cpu: typing.
|
72
|
+
cpu: typing.Union[float, tuple[float, float], None] = None,
|
73
73
|
memory: typing.Union[int, tuple[int, int], None] = None,
|
74
74
|
block_network: bool = False,
|
75
75
|
cidr_allowlist: typing.Optional[collections.abc.Sequence[str]] = None,
|
@@ -88,6 +88,7 @@ class _Sandbox(modal.object._Object):
|
|
88
88
|
@staticmethod
|
89
89
|
async def from_id(sandbox_id: str, client: typing.Optional[modal.client._Client] = None) -> _Sandbox: ...
|
90
90
|
async def set_tags(self, tags: dict[str, str], *, client: typing.Optional[modal.client._Client] = None): ...
|
91
|
+
async def snapshot_filesystem(self, timeout: int = 55) -> modal.image._Image: ...
|
91
92
|
async def wait(self, raise_on_termination: bool = True): ...
|
92
93
|
async def tunnels(self, timeout: int = 50) -> dict[int, modal._tunnel.Tunnel]: ...
|
93
94
|
async def terminate(self): ...
|
@@ -189,7 +190,7 @@ class Sandbox(modal.object.Object):
|
|
189
190
|
gpu: typing.Union[None, bool, str, modal.gpu._GPUConfig] = None,
|
190
191
|
cloud: typing.Optional[str] = None,
|
191
192
|
region: typing.Union[str, collections.abc.Sequence[str], None] = None,
|
192
|
-
cpu: typing.
|
193
|
+
cpu: typing.Union[float, tuple[float, float], None] = None,
|
193
194
|
memory: typing.Union[int, tuple[int, int], None] = None,
|
194
195
|
block_network: bool = False,
|
195
196
|
cidr_allowlist: typing.Optional[collections.abc.Sequence[str]] = None,
|
@@ -220,7 +221,7 @@ class Sandbox(modal.object.Object):
|
|
220
221
|
gpu: typing.Union[None, bool, str, modal.gpu._GPUConfig] = None,
|
221
222
|
cloud: typing.Optional[str] = None,
|
222
223
|
region: typing.Union[str, collections.abc.Sequence[str], None] = None,
|
223
|
-
cpu: typing.
|
224
|
+
cpu: typing.Union[float, tuple[float, float], None] = None,
|
224
225
|
memory: typing.Union[int, tuple[int, int], None] = None,
|
225
226
|
block_network: bool = False,
|
226
227
|
cidr_allowlist: typing.Optional[collections.abc.Sequence[str]] = None,
|
@@ -252,6 +253,12 @@ class Sandbox(modal.object.Object):
|
|
252
253
|
|
253
254
|
set_tags: __set_tags_spec
|
254
255
|
|
256
|
+
class __snapshot_filesystem_spec(typing_extensions.Protocol):
|
257
|
+
def __call__(self, timeout: int = 55) -> modal.image.Image: ...
|
258
|
+
async def aio(self, timeout: int = 55) -> modal.image.Image: ...
|
259
|
+
|
260
|
+
snapshot_filesystem: __snapshot_filesystem_spec
|
261
|
+
|
255
262
|
class __wait_spec(typing_extensions.Protocol):
|
256
263
|
def __call__(self, raise_on_termination: bool = True): ...
|
257
264
|
async def aio(self, raise_on_termination: bool = True): ...
|
@@ -18,32 +18,32 @@ modal/_watcher.py,sha256=K6LYnlmSGQB4tWWI9JADv-tvSvQ1j522FwT71B51CX8,3584
|
|
18
18
|
modal/app.py,sha256=EJ7FUN6rWnSwLJoYJh8nmKg_t-8hdN8_rt0OrkP7JvQ,46084
|
19
19
|
modal/app.pyi,sha256=BE5SlR5tRECuc6-e2lUuOknDdov3zxgZ4N0AsLb5ZVQ,25270
|
20
20
|
modal/call_graph.py,sha256=1g2DGcMIJvRy-xKicuf63IVE98gJSnQsr8R_NVMptNc,2581
|
21
|
-
modal/client.py,sha256=
|
22
|
-
modal/client.pyi,sha256=
|
21
|
+
modal/client.py,sha256=cmylZhU35txmrx4nltNYuuqXRgeoMtm0ow1J9wJkEYQ,16400
|
22
|
+
modal/client.pyi,sha256=4PTumnNQ0bz1iY7cJ9H9YbH76flPkTjCk-1pk-7WLAQ,7354
|
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=OJqzj_V-n1g48BY_4Jg_BOTQdftEEl4kTWN0X4FOOdg,27378
|
26
26
|
modal/cls.pyi,sha256=47jaIT06fz8PSUrs-MaNn6r03PHsAyUGsKuK5e9RMhQ,8140
|
27
27
|
modal/config.py,sha256=1KhNJkjYsJkX1V8RPPdRYPlM2HE-ZZs0JVSxbiXjmrw,11010
|
28
|
-
modal/container_process.py,sha256=
|
29
|
-
modal/container_process.pyi,sha256=
|
28
|
+
modal/container_process.py,sha256=zDxCLk6KfJT1G9FfNtjom6gekBQ46op3TWepT7-Hkbg,6077
|
29
|
+
modal/container_process.pyi,sha256=dqtqBmyRpXXpRrDooESL6WBVU_1Rh6OG-66P2Hk9E5U,2666
|
30
30
|
modal/dict.py,sha256=RmJlEwFJOdSfAYcVa50hbbFccV8e7BvC5tc5g1HXF-c,12622
|
31
31
|
modal/dict.pyi,sha256=2cYgOqBxYZih4BYgMV0c3rNPuxYR6-cB1GBXzFkHA5c,7265
|
32
32
|
modal/environments.py,sha256=5cgA-zbm6ngKLsRA19zSOgtgo9-BarJK3FJK0BiF2Lo,6505
|
33
33
|
modal/environments.pyi,sha256=XalNpiPkAtHWAvOU2Cotq0ozmtl-Jv0FDsR8h9mr27Q,3521
|
34
34
|
modal/exception.py,sha256=EBkdWVved2XEPsXaoPRu56xfxFFHL9iuqvUsdj42WDA,6392
|
35
35
|
modal/experimental.py,sha256=jFuNbwrNHos47viMB9q-cHJSvf2RDxDdoEcss9plaZE,2302
|
36
|
-
modal/functions.py,sha256=
|
37
|
-
modal/functions.pyi,sha256=
|
36
|
+
modal/functions.py,sha256=3GjjFbf40XciWAa4rTmh0erkZjPzRjKHqWxUu91mHOU,66685
|
37
|
+
modal/functions.pyi,sha256=IyuM9TV79JfrtfTaJ4yq3EcWp3yHuxLavpxTOwSWEDw,24988
|
38
38
|
modal/gpu.py,sha256=r4rL6uH3UJIQthzYvfWauXNyh01WqCPtKZCmmSX1fd4,6881
|
39
39
|
modal/image.py,sha256=cQ6WP1xHXZT_nY8z3aEFiGwKzrTV0yxi3Ab8JzF91eo,79653
|
40
40
|
modal/image.pyi,sha256=PIKH6JBA4L5TfdJrQu3pm2ykyIITmiP920TpP8cdyQA,24585
|
41
|
-
modal/io_streams.py,sha256=
|
41
|
+
modal/io_streams.py,sha256=QkQiizKRzd5bnbKQsap31LJgBYlAnj4-XkV_50xPYX0,15079
|
42
42
|
modal/io_streams.pyi,sha256=bCCVSxkMcosYd8O3PQDDwJw7TQ8JEcnYonLJ5t27TQs,4804
|
43
43
|
modal/mount.py,sha256=liaid5p42o0OKnzoocJJ_oCovDVderk3-JuCTa5pqtA,27656
|
44
44
|
modal/mount.pyi,sha256=3e4nkXUeeVmUmOyK8Tiyk_EQlHeWruN3yGJVnmDUVrI,9761
|
45
|
-
modal/network_file_system.py,sha256=
|
46
|
-
modal/network_file_system.pyi,sha256=
|
45
|
+
modal/network_file_system.py,sha256=NKZgh_p8MyJyyJgP92lhRgTmwA3kOPw7m8AbYlchhCE,14530
|
46
|
+
modal/network_file_system.pyi,sha256=8mHKXuRkxHPazF6ljIW7g4M5aVqLSl6eKUPLgDCug5c,7901
|
47
47
|
modal/object.py,sha256=KmtWRDd5ntHGSO9ASHe9MJcIgjNRqaDXGc3rWOXwrmA,9646
|
48
48
|
modal/object.pyi,sha256=MO78H9yFSE5i1gExPEwyyQzLdlshkcGHN1aQ0ylyvq0,8802
|
49
49
|
modal/output.py,sha256=N0xf4qeudEaYrslzdAl35VKV8rapstgIM2e9wO8_iy0,1967
|
@@ -54,14 +54,14 @@ modal/partial_function.pyi,sha256=EafGOzZdEq-yE5bYRoMfnMqw-o8Hk_So8MRPDSB99_0,89
|
|
54
54
|
modal/proxy.py,sha256=ZrOsuQP7dSZFq1OrIxalNnt0Zvsnp1h86Th679sSL40,1417
|
55
55
|
modal/proxy.pyi,sha256=UvygdOYneLTuoDY6hVaMNCyZ947Tmx93IdLjErUqkvM,368
|
56
56
|
modal/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
57
|
-
modal/queue.py,sha256=
|
57
|
+
modal/queue.py,sha256=fJYFfpdrlVj_doc3QxgvJvv7c8BGHjjja5q_9HCtSqs,18658
|
58
58
|
modal/queue.pyi,sha256=di3ownBw4jc6d4X7ygXtbpjlUMOK69qyaD3lVsJbpoM,9900
|
59
59
|
modal/retries.py,sha256=HKR2Q9aNPWkMjQ5nwobqYTuZaSuw0a8lI2zrtY5IW98,5230
|
60
|
-
modal/runner.py,sha256=
|
61
|
-
modal/runner.pyi,sha256=
|
60
|
+
modal/runner.py,sha256=AiBGoc_BZxQenjA0T9yQ7hf515Va6G05ULYRGnTT5Y0,24453
|
61
|
+
modal/runner.pyi,sha256=Fa6HjaqH---CJhsefLm6Ce6DRLKZdz_Bng_gn9arJdw,5126
|
62
62
|
modal/running_app.py,sha256=CshNvGDJtagOdKW54uYjY8HY73j2TpnsL9jkPFZAsfA,560
|
63
|
-
modal/sandbox.py,sha256=
|
64
|
-
modal/sandbox.pyi,sha256=
|
63
|
+
modal/sandbox.py,sha256=Yd__KipEINH2euDPOcm5MPBnagRv19Sa5z5tJCvGOQs,26360
|
64
|
+
modal/sandbox.pyi,sha256=fRl32Pt5F6TbK7aYewjlcL4WQxxmp7m6Ybktmkd2VOk,18108
|
65
65
|
modal/schedule.py,sha256=0ZFpKs1bOxeo5n3HZjoL7OE2ktsb-_oGtq-WJEPO4tY,2615
|
66
66
|
modal/scheduler_placement.py,sha256=BAREdOY5HzHpzSBqt6jDVR6YC_jYfHMVqOzkyqQfngU,1235
|
67
67
|
modal/secret.py,sha256=Y1WgybQIkfkxdzH9CQ1h-Wd1DJJpzipigMhyyvSxTww,10007
|
@@ -75,7 +75,7 @@ modal/volume.py,sha256=IISuMeXq9MoSkhXg8Q6JG0F-2n9NTkWk0xGuJB8l3d8,29159
|
|
75
75
|
modal/volume.pyi,sha256=St0mDiaojfep6Bs4sBbkRJmeacYHF6lh6FKOWGmheHA,11182
|
76
76
|
modal/_runtime/__init__.py,sha256=MIEP8jhXUeGq_eCjYFcqN5b1bxBM4fdk0VESpjWR0fc,28
|
77
77
|
modal/_runtime/asgi.py,sha256=GvuxZqWnIHMIR-Bx5f7toCQlkERaJO8CHjTPNM9IFIw,21537
|
78
|
-
modal/_runtime/container_io_manager.py,sha256=
|
78
|
+
modal/_runtime/container_io_manager.py,sha256=8NyX5uuwmHEJgxMwdoY9PpEO-IHA8LGdYdbdHLIafK8,44131
|
79
79
|
modal/_runtime/execution_context.py,sha256=E6ofm6j1POXGPxS841X3V7JU6NheVb8OkQc7JpLq4Kg,2712
|
80
80
|
modal/_runtime/telemetry.py,sha256=T1RoAGyjBDr1swiM6pPsGRSITm7LI5FDK18oNXxY08U,5163
|
81
81
|
modal/_runtime/user_code_imports.py,sha256=q_3JOYqCPDcVFZWCHEjyEqj8yzdFsQ49HzeqYmFDLbk,14521
|
@@ -101,22 +101,22 @@ modal/_vendor/cloudpickle.py,sha256=Loq12qo7PBNbE4LFVEW6BdMMwY10MG94EOW1SCpcnQ0,
|
|
101
101
|
modal/_vendor/tblib.py,sha256=g1O7QUDd3sDoLd8YPFltkXkih7r_fyZOjgmGuligv3s,9722
|
102
102
|
modal/cli/__init__.py,sha256=waLjl5c6IPDhSsdWAm9Bji4e2PVxamYABKAze6CHVXY,28
|
103
103
|
modal/cli/_download.py,sha256=t6BXZwjTd9MgznDvbsV8rp0FZWggdzC-lUAGZU4xx1g,3984
|
104
|
-
modal/cli/_traceback.py,sha256=
|
105
|
-
modal/cli/app.py,sha256=
|
104
|
+
modal/cli/_traceback.py,sha256=Tm0g4V_fr4XAlmuh_4MNgZKtjJly9wsWtnKKvOJFM7Q,7130
|
105
|
+
modal/cli/app.py,sha256=KOU3tKdcw50612rmN2LmO-N8cT1M1-UgLs7tw68Kgds,7717
|
106
106
|
modal/cli/config.py,sha256=pXPLmX0bIoV57rQNqIPK7V-yllj-GPRY4jiBO_EklGg,1667
|
107
|
-
modal/cli/container.py,sha256=
|
107
|
+
modal/cli/container.py,sha256=nCySVD10VJPzmX3ghTsGmpxdYeVYYMW6ofjsyt2gQcM,3667
|
108
108
|
modal/cli/dict.py,sha256=gwX4ZBsrr0dpWf_B5_5GN_ealcVzpcGyvY24dEY4y3Y,4455
|
109
109
|
modal/cli/entry_point.py,sha256=aaNxFAqZcmtSjwzkYIA_Ba9CkL4cL4_i2gy5VjoXxkM,4228
|
110
110
|
modal/cli/environment.py,sha256=Ayddkiq9jdj3XYDJ8ZmUqFpPPH8xajYlbexRkzGtUcg,4334
|
111
111
|
modal/cli/import_refs.py,sha256=wnqE5AMeyAN3IZmQvJCp54KRnJh8Nq_5fMqB6u6GEL8,9147
|
112
112
|
modal/cli/launch.py,sha256=uyI-ouGvYRjHLGxGQ2lYBZq32BiRT1i0L8ksz5iy7K8,2935
|
113
|
-
modal/cli/network_file_system.py,sha256=
|
113
|
+
modal/cli/network_file_system.py,sha256=3QbAxKEoRc6RCMsYE3OS-GcuiI4GMkz_wAKsIBbN1qg,8186
|
114
114
|
modal/cli/profile.py,sha256=rLXfjJObfPNjaZvNfHGIKqs7y9bGYyGe-K7V0w-Ni0M,3110
|
115
115
|
modal/cli/queues.py,sha256=MIh2OsliNE2QeL1erubfsRsNuG4fxqcqWA2vgIfQ4Mg,4494
|
116
|
-
modal/cli/run.py,sha256=
|
116
|
+
modal/cli/run.py,sha256=MitoSFA_QaqkIVjBRi91w1ekz6UlCwL3htE3_RI3yjA,17353
|
117
117
|
modal/cli/secret.py,sha256=uQpwYrMY98iMCWeZOQTcktOYhPTZ8IHnyealDc2CZqo,4206
|
118
118
|
modal/cli/token.py,sha256=mxSgOWakXG6N71hQb1ko61XAR9ZGkTMZD-Txn7gmTac,1924
|
119
|
-
modal/cli/utils.py,sha256=
|
119
|
+
modal/cli/utils.py,sha256=hZmjyzcPjDnQSkLvycZD2LhGdcsfdZshs_rOU78EpvI,3717
|
120
120
|
modal/cli/volume.py,sha256=ngbnX4nhURMaCOqDGO4HmTvAbRBZBjRnPvk5TumnbVw,10004
|
121
121
|
modal/cli/programs/__init__.py,sha256=svYKtV8HDwDCN86zbdWqyq5T8sMdGDj0PVlzc2tIxDM,28
|
122
122
|
modal/cli/programs/run_jupyter.py,sha256=RRr07CqZrStMbLdBM3PpzU6KM8t9FtLbdIPthg2-Mpw,2755
|
@@ -142,13 +142,13 @@ modal_global_objects/mounts/__init__.py,sha256=MIEP8jhXUeGq_eCjYFcqN5b1bxBM4fdk0
|
|
142
142
|
modal_global_objects/mounts/modal_client_package.py,sha256=W0E_yShsRojPzWm6LtIQqNVolapdnrZkm2hVEQuZK_4,767
|
143
143
|
modal_global_objects/mounts/python_standalone.py,sha256=SL_riIxpd8mP4i4CLDCWiFFNj0Ltknm9c_UIGfX5d60,1836
|
144
144
|
modal_proto/__init__.py,sha256=MIEP8jhXUeGq_eCjYFcqN5b1bxBM4fdk0VESpjWR0fc,28
|
145
|
-
modal_proto/api.proto,sha256=
|
146
|
-
modal_proto/api_grpc.py,sha256=
|
147
|
-
modal_proto/api_pb2.py,sha256=
|
148
|
-
modal_proto/api_pb2.pyi,sha256=
|
149
|
-
modal_proto/api_pb2_grpc.py,sha256=
|
150
|
-
modal_proto/api_pb2_grpc.pyi,sha256=
|
151
|
-
modal_proto/modal_api_grpc.py,sha256
|
145
|
+
modal_proto/api.proto,sha256=zd8V-GFVMtUP8YwxnlVvaJIuocpWKchRCeUZSlMMk74,78818
|
146
|
+
modal_proto/api_grpc.py,sha256=DveC4ejFYEhCLiWbQShnmY31_FWGYU675Bmr7nHhsgs,101342
|
147
|
+
modal_proto/api_pb2.py,sha256=l88JT2IcEuSqCnk7WRTQrBoHtJyAQD4hHAoWmiCQr0A,287100
|
148
|
+
modal_proto/api_pb2.pyi,sha256=a303c1L3sRnSk9wZXa7DuQWwBZm8u6EShoJImMYxt98,384236
|
149
|
+
modal_proto/api_pb2_grpc.py,sha256=2PEP6JPOoTw2rDC5qYjLNuumP68ZwAouRhCoayisAhY,219162
|
150
|
+
modal_proto/api_pb2_grpc.pyi,sha256=uWtCxVEd0cFpOZ1oOGfZNO7Dv45OP4kp09jMnNyx9D4,51098
|
151
|
+
modal_proto/modal_api_grpc.py,sha256=-8mLby_om5MYo6yu1zA_hqhz0yLsQW7k2YWBVZW1iVs,13546
|
152
152
|
modal_proto/modal_options_grpc.py,sha256=qJ1cuwA54oRqrdTyPTbvfhFZYd9HhJKK5UCwt523r3Y,120
|
153
153
|
modal_proto/options.proto,sha256=a-siq4swVbZPfaFRXAipRZzGP2bq8OsdUvjlyzAeodQ,488
|
154
154
|
modal_proto/options_grpc.py,sha256=M18X3d-8F_cNYSVM3I25dUTO5rZ0rd-vCCfynfh13Nc,125
|
@@ -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=3IY-AWLH55r35_mQXIaut0jrJvoPuf1NZJBQQfSbPuo,470
|
161
161
|
modal_version/__main__.py,sha256=2FO0yYQQwDTh6udt1h-cBnGd1c4ZyHnHSI4BksxzVac,105
|
162
|
-
modal_version/_version_generated.py,sha256=
|
163
|
-
modal-0.67.
|
164
|
-
modal-0.67.
|
165
|
-
modal-0.67.
|
166
|
-
modal-0.67.
|
167
|
-
modal-0.67.
|
168
|
-
modal-0.67.
|
162
|
+
modal_version/_version_generated.py,sha256=tPxVZVhTZ80YH1CvSZDHAkJ_azeUcv00GgLvebLfni8,149
|
163
|
+
modal-0.67.43.dist-info/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
|
164
|
+
modal-0.67.43.dist-info/METADATA,sha256=tTXXCu0njTf-8EjJlrBL7TjvMP0e90efMYpHA5y1VRw,2329
|
165
|
+
modal-0.67.43.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
|
166
|
+
modal-0.67.43.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
|
167
|
+
modal-0.67.43.dist-info/top_level.txt,sha256=1nvYbOSIKcmU50fNrpnQnrrOpj269ei3LzgB6j9xGqg,64
|
168
|
+
modal-0.67.43.dist-info/RECORD,,
|
modal_proto/api.proto
CHANGED
@@ -400,7 +400,8 @@ message AppPublishRequest {
|
|
400
400
|
|
401
401
|
message AppPublishResponse {
|
402
402
|
string url = 1;
|
403
|
-
repeated string warnings = 2;
|
403
|
+
repeated string warnings = 2; // Deprecated soon in favor of server_warnings
|
404
|
+
repeated Warning server_warnings = 3;
|
404
405
|
}
|
405
406
|
|
406
407
|
message AppRollbackRequest {
|
@@ -619,6 +620,7 @@ message ClassGetRequest {
|
|
619
620
|
message ClassGetResponse {
|
620
621
|
string class_id = 1;
|
621
622
|
ClassHandleMetadata handle_metadata = 2;
|
623
|
+
repeated Warning server_warnings = 3;
|
622
624
|
}
|
623
625
|
|
624
626
|
message ClassHandleMetadata {
|
@@ -1211,6 +1213,17 @@ message Function {
|
|
1211
1213
|
bool _experimental_custom_scaling = 76;
|
1212
1214
|
}
|
1213
1215
|
|
1216
|
+
message FunctionAsyncInvokeRequest {
|
1217
|
+
string function_id = 1;
|
1218
|
+
string parent_input_id = 2;
|
1219
|
+
FunctionInput input = 3;
|
1220
|
+
}
|
1221
|
+
|
1222
|
+
message FunctionAsyncInvokeResponse {
|
1223
|
+
bool retry_with_blob_upload = 1;
|
1224
|
+
string function_call_id = 2;
|
1225
|
+
}
|
1226
|
+
|
1214
1227
|
message FunctionBindParamsRequest {
|
1215
1228
|
string function_id = 1;
|
1216
1229
|
bytes serialized_params = 2;
|
@@ -1446,6 +1459,7 @@ message FunctionGetRequest {
|
|
1446
1459
|
message FunctionGetResponse {
|
1447
1460
|
string function_id = 1;
|
1448
1461
|
FunctionHandleMetadata handle_metadata = 2;
|
1462
|
+
repeated Warning server_warnings = 4;
|
1449
1463
|
}
|
1450
1464
|
|
1451
1465
|
message FunctionGetSerializedRequest {
|
@@ -2614,6 +2628,16 @@ message VolumeRemoveFileRequest {
|
|
2614
2628
|
bool recursive = 3;
|
2615
2629
|
}
|
2616
2630
|
|
2631
|
+
message Warning {
|
2632
|
+
enum WarningType {
|
2633
|
+
WARNING_TYPE_UNSPECIFIED = 0;
|
2634
|
+
WARNING_TYPE_CLIENT_DEPRECATION = 1;
|
2635
|
+
WARNING_TYPE_RESOURCE_LIMIT = 2;
|
2636
|
+
}
|
2637
|
+
WarningType type = 1;
|
2638
|
+
string message = 2;
|
2639
|
+
}
|
2640
|
+
|
2617
2641
|
message WebUrlInfo {
|
2618
2642
|
bool truncated = 1;
|
2619
2643
|
bool has_unique_hash = 2 [deprecated=true];
|
@@ -2705,6 +2729,7 @@ service ModalClient {
|
|
2705
2729
|
rpc EnvironmentUpdate(EnvironmentUpdateRequest) returns (EnvironmentListItem);
|
2706
2730
|
|
2707
2731
|
// Functions
|
2732
|
+
rpc FunctionAsyncInvoke(FunctionAsyncInvokeRequest) returns (FunctionAsyncInvokeResponse);
|
2708
2733
|
rpc FunctionBindParams(FunctionBindParamsRequest) returns (FunctionBindParamsResponse);
|
2709
2734
|
rpc FunctionCallCancel(FunctionCallCancelRequest) returns (google.protobuf.Empty);
|
2710
2735
|
rpc FunctionCallGetDataIn(FunctionCallGetDataRequest) returns (stream DataChunk);
|
modal_proto/api_grpc.py
CHANGED
@@ -217,6 +217,10 @@ class ModalClientBase(abc.ABC):
|
|
217
217
|
async def EnvironmentUpdate(self, stream: 'grpclib.server.Stream[modal_proto.api_pb2.EnvironmentUpdateRequest, modal_proto.api_pb2.EnvironmentListItem]') -> None:
|
218
218
|
pass
|
219
219
|
|
220
|
+
@abc.abstractmethod
|
221
|
+
async def FunctionAsyncInvoke(self, stream: 'grpclib.server.Stream[modal_proto.api_pb2.FunctionAsyncInvokeRequest, modal_proto.api_pb2.FunctionAsyncInvokeResponse]') -> None:
|
222
|
+
pass
|
223
|
+
|
220
224
|
@abc.abstractmethod
|
221
225
|
async def FunctionBindParams(self, stream: 'grpclib.server.Stream[modal_proto.api_pb2.FunctionBindParamsRequest, modal_proto.api_pb2.FunctionBindParamsResponse]') -> None:
|
222
226
|
pass
|
@@ -843,6 +847,12 @@ class ModalClientBase(abc.ABC):
|
|
843
847
|
modal_proto.api_pb2.EnvironmentUpdateRequest,
|
844
848
|
modal_proto.api_pb2.EnvironmentListItem,
|
845
849
|
),
|
850
|
+
'/modal.client.ModalClient/FunctionAsyncInvoke': grpclib.const.Handler(
|
851
|
+
self.FunctionAsyncInvoke,
|
852
|
+
grpclib.const.Cardinality.UNARY_UNARY,
|
853
|
+
modal_proto.api_pb2.FunctionAsyncInvokeRequest,
|
854
|
+
modal_proto.api_pb2.FunctionAsyncInvokeResponse,
|
855
|
+
),
|
846
856
|
'/modal.client.ModalClient/FunctionBindParams': grpclib.const.Handler(
|
847
857
|
self.FunctionBindParams,
|
848
858
|
grpclib.const.Cardinality.UNARY_UNARY,
|
@@ -1635,6 +1645,12 @@ class ModalClientStub:
|
|
1635
1645
|
modal_proto.api_pb2.EnvironmentUpdateRequest,
|
1636
1646
|
modal_proto.api_pb2.EnvironmentListItem,
|
1637
1647
|
)
|
1648
|
+
self.FunctionAsyncInvoke = grpclib.client.UnaryUnaryMethod(
|
1649
|
+
channel,
|
1650
|
+
'/modal.client.ModalClient/FunctionAsyncInvoke',
|
1651
|
+
modal_proto.api_pb2.FunctionAsyncInvokeRequest,
|
1652
|
+
modal_proto.api_pb2.FunctionAsyncInvokeResponse,
|
1653
|
+
)
|
1638
1654
|
self.FunctionBindParams = grpclib.client.UnaryUnaryMethod(
|
1639
1655
|
channel,
|
1640
1656
|
'/modal.client.ModalClient/FunctionBindParams',
|