modal 1.0.0.dev4__py3-none-any.whl → 1.0.0.dev8__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.
Potentially problematic release.
This version of modal might be problematic. Click here for more details.
- modal/_utils/grpc_utils.py +6 -1
- modal/app.py +0 -50
- modal/app.pyi +0 -83
- modal/client.pyi +2 -2
- modal/container_process.py +1 -9
- modal/container_process.pyi +3 -3
- modal/functions.pyi +6 -6
- modal/runner.py +0 -18
- modal/runner.pyi +0 -5
- modal/sandbox.py +0 -20
- modal/sandbox.pyi +0 -2
- modal/serving.py +0 -6
- modal/serving.pyi +0 -3
- modal/volume.py +6 -13
- {modal-1.0.0.dev4.dist-info → modal-1.0.0.dev8.dist-info}/METADATA +1 -1
- {modal-1.0.0.dev4.dist-info → modal-1.0.0.dev8.dist-info}/RECORD +24 -24
- modal_proto/api.proto +1 -1
- modal_proto/api_pb2.py +156 -156
- modal_proto/api_pb2.pyi +4 -4
- modal_version/__init__.py +1 -1
- {modal-1.0.0.dev4.dist-info → modal-1.0.0.dev8.dist-info}/WHEEL +0 -0
- {modal-1.0.0.dev4.dist-info → modal-1.0.0.dev8.dist-info}/entry_points.txt +0 -0
- {modal-1.0.0.dev4.dist-info → modal-1.0.0.dev8.dist-info}/licenses/LICENSE +0 -0
- {modal-1.0.0.dev4.dist-info → modal-1.0.0.dev8.dist-info}/top_level.txt +0 -0
modal/_utils/grpc_utils.py
CHANGED
@@ -148,15 +148,20 @@ def create_channel(
|
|
148
148
|
|
149
149
|
logger.debug(f"Sending request to {event.method_name}")
|
150
150
|
|
151
|
-
async def
|
151
|
+
async def recv_initial_metadata(initial_metadata: grpclib.events.RecvInitialMetadata) -> None:
|
152
152
|
# If we receive an auth token from the server, include it in all future requests.
|
153
153
|
# TODO(nathan): This isn't perfect because the metadata isn't propagated when the
|
154
154
|
# process is forked and a new channel is created. This is OK for now since this
|
155
155
|
# token is only used by the experimental input plane
|
156
|
+
if token := initial_metadata.metadata.get("x-modal-auth-token"):
|
157
|
+
metadata["x-modal-auth-token"] = str(token)
|
158
|
+
|
159
|
+
async def recv_trailing_metadata(trailing_metadata: grpclib.events.RecvTrailingMetadata) -> None:
|
156
160
|
if token := trailing_metadata.metadata.get("x-modal-auth-token"):
|
157
161
|
metadata["x-modal-auth-token"] = str(token)
|
158
162
|
|
159
163
|
grpclib.events.listen(channel, grpclib.events.SendRequest, send_request)
|
164
|
+
grpclib.events.listen(channel, grpclib.events.RecvInitialMetadata, recv_initial_metadata)
|
160
165
|
grpclib.events.listen(channel, grpclib.events.RecvTrailingMetadata, recv_trailing_metadata)
|
161
166
|
|
162
167
|
return channel
|
modal/app.py
CHANGED
@@ -30,7 +30,6 @@ from ._partial_function import (
|
|
30
30
|
)
|
31
31
|
from ._utils.async_utils import synchronize_api
|
32
32
|
from ._utils.deprecation import (
|
33
|
-
deprecation_error,
|
34
33
|
deprecation_warning,
|
35
34
|
warn_on_renamed_autoscaler_settings,
|
36
35
|
)
|
@@ -328,7 +327,6 @@ class _App:
|
|
328
327
|
self,
|
329
328
|
*,
|
330
329
|
client: Optional[_Client] = None,
|
331
|
-
show_progress: Optional[bool] = None,
|
332
330
|
detach: bool = False,
|
333
331
|
interactive: bool = False,
|
334
332
|
environment_name: Optional[str] = None,
|
@@ -374,16 +372,6 @@ class _App:
|
|
374
372
|
"""
|
375
373
|
from .runner import _run_app # Defer import of runner.py, which imports a lot from Rich
|
376
374
|
|
377
|
-
# See Github discussion here: https://github.com/modal-labs/modal-client/pull/2030#issuecomment-2237266186
|
378
|
-
|
379
|
-
if show_progress is True:
|
380
|
-
deprecation_error(
|
381
|
-
(2024, 11, 20),
|
382
|
-
"`show_progress=True` is no longer supported. Use `with modal.enable_output():` instead.",
|
383
|
-
)
|
384
|
-
elif show_progress is False:
|
385
|
-
deprecation_warning((2024, 11, 20), "`show_progress=False` is deprecated (and has no effect)")
|
386
|
-
|
387
375
|
async with _run_app(
|
388
376
|
self, client=client, detach=detach, interactive=interactive, environment_name=environment_name
|
389
377
|
):
|
@@ -1037,44 +1025,6 @@ class _App:
|
|
1037
1025
|
|
1038
1026
|
return wrapper
|
1039
1027
|
|
1040
|
-
async def spawn_sandbox(
|
1041
|
-
self,
|
1042
|
-
*entrypoint_args: str,
|
1043
|
-
image: Optional[_Image] = None, # The image to run as the container for the sandbox.
|
1044
|
-
mounts: Sequence[_Mount] = (), # Mounts to attach to the sandbox.
|
1045
|
-
secrets: Sequence[_Secret] = (), # Environment variables to inject into the sandbox.
|
1046
|
-
network_file_systems: dict[Union[str, PurePosixPath], _NetworkFileSystem] = {},
|
1047
|
-
timeout: Optional[int] = None, # Maximum execution time of the sandbox in seconds.
|
1048
|
-
workdir: Optional[str] = None, # Working directory of the sandbox.
|
1049
|
-
gpu: GPU_T = None,
|
1050
|
-
cloud: Optional[str] = None,
|
1051
|
-
region: Optional[Union[str, Sequence[str]]] = None, # Region or regions to run the sandbox on.
|
1052
|
-
# Specify, in fractional CPU cores, how many CPU cores to request.
|
1053
|
-
# Or, pass (request, limit) to additionally specify a hard limit in fractional CPU cores.
|
1054
|
-
# CPU throttling will prevent a container from exceeding its specified limit.
|
1055
|
-
cpu: Optional[Union[float, tuple[float, float]]] = None,
|
1056
|
-
# Specify, in MiB, a memory request which is the minimum memory required.
|
1057
|
-
# Or, pass (request, limit) to additionally specify a hard limit in MiB.
|
1058
|
-
memory: Optional[Union[int, tuple[int, int]]] = None,
|
1059
|
-
block_network: bool = False, # Whether to block network access
|
1060
|
-
volumes: dict[
|
1061
|
-
Union[str, PurePosixPath], Union[_Volume, _CloudBucketMount]
|
1062
|
-
] = {}, # Mount points for Modal Volumes and CloudBucketMounts
|
1063
|
-
pty_info: Optional[api_pb2.PTYInfo] = None,
|
1064
|
-
_experimental_scheduler_placement: Optional[
|
1065
|
-
SchedulerPlacement
|
1066
|
-
] = None, # Experimental controls over fine-grained scheduling (alpha).
|
1067
|
-
) -> None:
|
1068
|
-
"""mdmd:hidden"""
|
1069
|
-
arglist = ", ".join(repr(s) for s in entrypoint_args)
|
1070
|
-
message = (
|
1071
|
-
"`App.spawn_sandbox` is deprecated.\n\n"
|
1072
|
-
"Sandboxes can be created using the `Sandbox` object:\n\n"
|
1073
|
-
f"```\nsb = Sandbox.create({arglist}, app=app)\n```\n\n"
|
1074
|
-
"See https://modal.com/docs/guide/sandbox for more info on working with sandboxes."
|
1075
|
-
)
|
1076
|
-
deprecation_error((2024, 7, 5), message)
|
1077
|
-
|
1078
1028
|
def include(self, /, other_app: "_App") -> typing_extensions.Self:
|
1079
1029
|
"""Include another App's objects in this one.
|
1080
1030
|
|
modal/app.pyi
CHANGED
@@ -20,7 +20,6 @@ import modal.schedule
|
|
20
20
|
import modal.scheduler_placement
|
21
21
|
import modal.secret
|
22
22
|
import modal.volume
|
23
|
-
import modal_proto.api_pb2
|
24
23
|
import pathlib
|
25
24
|
import synchronicity.combined_types
|
26
25
|
import typing
|
@@ -134,7 +133,6 @@ class _App:
|
|
134
133
|
self,
|
135
134
|
*,
|
136
135
|
client: typing.Optional[modal.client._Client] = None,
|
137
|
-
show_progress: typing.Optional[bool] = None,
|
138
136
|
detach: bool = False,
|
139
137
|
interactive: bool = False,
|
140
138
|
environment_name: typing.Optional[str] = None,
|
@@ -263,30 +261,6 @@ class _App:
|
|
263
261
|
_experimental_buffer_containers: typing.Optional[int] = None,
|
264
262
|
allow_cross_region_volumes: typing.Optional[bool] = None,
|
265
263
|
) -> collections.abc.Callable[[typing.Union[CLS_T, modal._partial_function._PartialFunction]], CLS_T]: ...
|
266
|
-
async def spawn_sandbox(
|
267
|
-
self,
|
268
|
-
*entrypoint_args: str,
|
269
|
-
image: typing.Optional[modal.image._Image] = None,
|
270
|
-
mounts: collections.abc.Sequence[modal.mount._Mount] = (),
|
271
|
-
secrets: collections.abc.Sequence[modal.secret._Secret] = (),
|
272
|
-
network_file_systems: dict[
|
273
|
-
typing.Union[str, pathlib.PurePosixPath], modal.network_file_system._NetworkFileSystem
|
274
|
-
] = {},
|
275
|
-
timeout: typing.Optional[int] = None,
|
276
|
-
workdir: typing.Optional[str] = None,
|
277
|
-
gpu: typing.Union[None, str, modal.gpu._GPUConfig] = None,
|
278
|
-
cloud: typing.Optional[str] = None,
|
279
|
-
region: typing.Union[str, collections.abc.Sequence[str], None] = None,
|
280
|
-
cpu: typing.Union[float, tuple[float, float], None] = None,
|
281
|
-
memory: typing.Union[int, tuple[int, int], None] = None,
|
282
|
-
block_network: bool = False,
|
283
|
-
volumes: dict[
|
284
|
-
typing.Union[str, pathlib.PurePosixPath],
|
285
|
-
typing.Union[modal.volume._Volume, modal.cloud_bucket_mount._CloudBucketMount],
|
286
|
-
] = {},
|
287
|
-
pty_info: typing.Optional[modal_proto.api_pb2.PTYInfo] = None,
|
288
|
-
_experimental_scheduler_placement: typing.Optional[modal.scheduler_placement.SchedulerPlacement] = None,
|
289
|
-
) -> None: ...
|
290
264
|
def include(self, /, other_app: _App) -> typing_extensions.Self: ...
|
291
265
|
def _logs(
|
292
266
|
self, client: typing.Optional[modal.client._Client] = None
|
@@ -381,7 +355,6 @@ class App:
|
|
381
355
|
/,
|
382
356
|
*,
|
383
357
|
client: typing.Optional[modal.client.Client] = None,
|
384
|
-
show_progress: typing.Optional[bool] = None,
|
385
358
|
detach: bool = False,
|
386
359
|
interactive: bool = False,
|
387
360
|
environment_name: typing.Optional[str] = None,
|
@@ -391,7 +364,6 @@ class App:
|
|
391
364
|
/,
|
392
365
|
*,
|
393
366
|
client: typing.Optional[modal.client.Client] = None,
|
394
|
-
show_progress: typing.Optional[bool] = None,
|
395
367
|
detach: bool = False,
|
396
368
|
interactive: bool = False,
|
397
369
|
environment_name: typing.Optional[str] = None,
|
@@ -537,61 +509,6 @@ class App:
|
|
537
509
|
_experimental_buffer_containers: typing.Optional[int] = None,
|
538
510
|
allow_cross_region_volumes: typing.Optional[bool] = None,
|
539
511
|
) -> collections.abc.Callable[[typing.Union[CLS_T, modal.partial_function.PartialFunction]], CLS_T]: ...
|
540
|
-
|
541
|
-
class __spawn_sandbox_spec(typing_extensions.Protocol[SUPERSELF]):
|
542
|
-
def __call__(
|
543
|
-
self,
|
544
|
-
/,
|
545
|
-
*entrypoint_args: str,
|
546
|
-
image: typing.Optional[modal.image.Image] = None,
|
547
|
-
mounts: collections.abc.Sequence[modal.mount.Mount] = (),
|
548
|
-
secrets: collections.abc.Sequence[modal.secret.Secret] = (),
|
549
|
-
network_file_systems: dict[
|
550
|
-
typing.Union[str, pathlib.PurePosixPath], modal.network_file_system.NetworkFileSystem
|
551
|
-
] = {},
|
552
|
-
timeout: typing.Optional[int] = None,
|
553
|
-
workdir: typing.Optional[str] = None,
|
554
|
-
gpu: typing.Union[None, str, modal.gpu._GPUConfig] = None,
|
555
|
-
cloud: typing.Optional[str] = None,
|
556
|
-
region: typing.Union[str, collections.abc.Sequence[str], None] = None,
|
557
|
-
cpu: typing.Union[float, tuple[float, float], None] = None,
|
558
|
-
memory: typing.Union[int, tuple[int, int], None] = None,
|
559
|
-
block_network: bool = False,
|
560
|
-
volumes: dict[
|
561
|
-
typing.Union[str, pathlib.PurePosixPath],
|
562
|
-
typing.Union[modal.volume.Volume, modal.cloud_bucket_mount.CloudBucketMount],
|
563
|
-
] = {},
|
564
|
-
pty_info: typing.Optional[modal_proto.api_pb2.PTYInfo] = None,
|
565
|
-
_experimental_scheduler_placement: typing.Optional[modal.scheduler_placement.SchedulerPlacement] = None,
|
566
|
-
) -> None: ...
|
567
|
-
async def aio(
|
568
|
-
self,
|
569
|
-
/,
|
570
|
-
*entrypoint_args: str,
|
571
|
-
image: typing.Optional[modal.image.Image] = None,
|
572
|
-
mounts: collections.abc.Sequence[modal.mount.Mount] = (),
|
573
|
-
secrets: collections.abc.Sequence[modal.secret.Secret] = (),
|
574
|
-
network_file_systems: dict[
|
575
|
-
typing.Union[str, pathlib.PurePosixPath], modal.network_file_system.NetworkFileSystem
|
576
|
-
] = {},
|
577
|
-
timeout: typing.Optional[int] = None,
|
578
|
-
workdir: typing.Optional[str] = None,
|
579
|
-
gpu: typing.Union[None, str, modal.gpu._GPUConfig] = None,
|
580
|
-
cloud: typing.Optional[str] = None,
|
581
|
-
region: typing.Union[str, collections.abc.Sequence[str], None] = None,
|
582
|
-
cpu: typing.Union[float, tuple[float, float], None] = None,
|
583
|
-
memory: typing.Union[int, tuple[int, int], None] = None,
|
584
|
-
block_network: bool = False,
|
585
|
-
volumes: dict[
|
586
|
-
typing.Union[str, pathlib.PurePosixPath],
|
587
|
-
typing.Union[modal.volume.Volume, modal.cloud_bucket_mount.CloudBucketMount],
|
588
|
-
] = {},
|
589
|
-
pty_info: typing.Optional[modal_proto.api_pb2.PTYInfo] = None,
|
590
|
-
_experimental_scheduler_placement: typing.Optional[modal.scheduler_placement.SchedulerPlacement] = None,
|
591
|
-
) -> None: ...
|
592
|
-
|
593
|
-
spawn_sandbox: __spawn_sandbox_spec[typing_extensions.Self]
|
594
|
-
|
595
512
|
def include(self, /, other_app: App) -> typing_extensions.Self: ...
|
596
513
|
|
597
514
|
class ___logs_spec(typing_extensions.Protocol[SUPERSELF]):
|
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[tuple[str, str]],
|
34
|
-
version: str = "1.0.0.
|
34
|
+
version: str = "1.0.0.dev8",
|
35
35
|
): ...
|
36
36
|
def is_closed(self) -> bool: ...
|
37
37
|
@property
|
@@ -94,7 +94,7 @@ class Client:
|
|
94
94
|
server_url: str,
|
95
95
|
client_type: int,
|
96
96
|
credentials: typing.Optional[tuple[str, str]],
|
97
|
-
version: str = "1.0.0.
|
97
|
+
version: str = "1.0.0.dev8",
|
98
98
|
): ...
|
99
99
|
def is_closed(self) -> bool: ...
|
100
100
|
@property
|
modal/container_process.py
CHANGED
@@ -6,7 +6,6 @@ from typing import Generic, Optional, TypeVar
|
|
6
6
|
from modal_proto import api_pb2
|
7
7
|
|
8
8
|
from ._utils.async_utils import TaskContext, synchronize_api
|
9
|
-
from ._utils.deprecation import deprecation_error
|
10
9
|
from ._utils.grpc_utils import retry_transient_errors
|
11
10
|
from ._utils.shell_utils import stream_from_stdin, write_to_fd
|
12
11
|
from .client import _Client
|
@@ -118,18 +117,11 @@ class _ContainerProcess(Generic[T]):
|
|
118
117
|
self._returncode = resp.exit_code
|
119
118
|
return self._returncode
|
120
119
|
|
121
|
-
async def attach(self
|
120
|
+
async def attach(self):
|
122
121
|
if platform.system() == "Windows":
|
123
122
|
print("interactive exec is not currently supported on Windows.")
|
124
123
|
return
|
125
124
|
|
126
|
-
if pty is not None:
|
127
|
-
deprecation_error(
|
128
|
-
(2024, 12, 9),
|
129
|
-
"The `pty` argument to `modal.container_process.attach(pty=...)` is deprecated, "
|
130
|
-
"as only PTY mode is supported. Please remove the argument.",
|
131
|
-
)
|
132
|
-
|
133
125
|
from rich.console import Console
|
134
126
|
|
135
127
|
console = Console()
|
modal/container_process.pyi
CHANGED
@@ -35,7 +35,7 @@ class _ContainerProcess(typing.Generic[T]):
|
|
35
35
|
def returncode(self) -> int: ...
|
36
36
|
async def poll(self) -> typing.Optional[int]: ...
|
37
37
|
async def wait(self) -> int: ...
|
38
|
-
async def attach(self
|
38
|
+
async def attach(self): ...
|
39
39
|
|
40
40
|
SUPERSELF = typing.TypeVar("SUPERSELF", covariant=True)
|
41
41
|
|
@@ -80,7 +80,7 @@ class ContainerProcess(typing.Generic[T]):
|
|
80
80
|
wait: __wait_spec[typing_extensions.Self]
|
81
81
|
|
82
82
|
class __attach_spec(typing_extensions.Protocol[SUPERSELF]):
|
83
|
-
def __call__(self,
|
84
|
-
async def aio(self,
|
83
|
+
def __call__(self, /): ...
|
84
|
+
async def aio(self, /): ...
|
85
85
|
|
86
86
|
attach: __attach_spec[typing_extensions.Self]
|
modal/functions.pyi
CHANGED
@@ -234,11 +234,11 @@ class Function(
|
|
234
234
|
|
235
235
|
_call_generator_nowait: ___call_generator_nowait_spec[typing_extensions.Self]
|
236
236
|
|
237
|
-
class __remote_spec(typing_extensions.Protocol[
|
237
|
+
class __remote_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
|
238
238
|
def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER: ...
|
239
239
|
async def aio(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER: ...
|
240
240
|
|
241
|
-
remote: __remote_spec[modal._functions.
|
241
|
+
remote: __remote_spec[modal._functions.P, modal._functions.ReturnType, typing_extensions.Self]
|
242
242
|
|
243
243
|
class __remote_gen_spec(typing_extensions.Protocol[SUPERSELF]):
|
244
244
|
def __call__(self, /, *args, **kwargs) -> typing.Generator[typing.Any, None, None]: ...
|
@@ -253,12 +253,12 @@ class Function(
|
|
253
253
|
self, *args: modal._functions.P.args, **kwargs: modal._functions.P.kwargs
|
254
254
|
) -> modal._functions.OriginalReturnType: ...
|
255
255
|
|
256
|
-
class ___experimental_spawn_spec(typing_extensions.Protocol[
|
256
|
+
class ___experimental_spawn_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
|
257
257
|
def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
|
258
258
|
async def aio(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
|
259
259
|
|
260
260
|
_experimental_spawn: ___experimental_spawn_spec[
|
261
|
-
modal._functions.
|
261
|
+
modal._functions.P, modal._functions.ReturnType, typing_extensions.Self
|
262
262
|
]
|
263
263
|
|
264
264
|
class ___spawn_map_inner_spec(typing_extensions.Protocol[P_INNER, SUPERSELF]):
|
@@ -267,11 +267,11 @@ class Function(
|
|
267
267
|
|
268
268
|
_spawn_map_inner: ___spawn_map_inner_spec[modal._functions.P, typing_extensions.Self]
|
269
269
|
|
270
|
-
class __spawn_spec(typing_extensions.Protocol[
|
270
|
+
class __spawn_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
|
271
271
|
def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
|
272
272
|
async def aio(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
|
273
273
|
|
274
|
-
spawn: __spawn_spec[modal._functions.
|
274
|
+
spawn: __spawn_spec[modal._functions.P, modal._functions.ReturnType, typing_extensions.Self]
|
275
275
|
|
276
276
|
def get_raw_f(self) -> collections.abc.Callable[..., typing.Any]: ...
|
277
277
|
|
modal/runner.py
CHANGED
@@ -27,7 +27,6 @@ from ._pty import get_pty_info
|
|
27
27
|
from ._resolver import Resolver
|
28
28
|
from ._traceback import print_server_warnings, traceback_contains_remote_call
|
29
29
|
from ._utils.async_utils import TaskContext, gather_cancel_on_exc, synchronize_api
|
30
|
-
from ._utils.deprecation import deprecation_error
|
31
30
|
from ._utils.git_utils import get_git_commit_info
|
32
31
|
from ._utils.grpc_utils import retry_transient_errors
|
33
32
|
from ._utils.name_utils import check_object_name, is_valid_tag
|
@@ -632,24 +631,7 @@ async def _interactive_shell(
|
|
632
631
|
raise
|
633
632
|
|
634
633
|
|
635
|
-
def _run_stub(*args: Any, **kwargs: Any):
|
636
|
-
"""mdmd:hidden
|
637
|
-
`run_stub` has been renamed to `run_app` and is deprecated. Please update your code.
|
638
|
-
"""
|
639
|
-
deprecation_error(
|
640
|
-
(2024, 5, 1), "`run_stub` has been renamed to `run_app` and is deprecated. Please update your code."
|
641
|
-
)
|
642
|
-
|
643
|
-
|
644
|
-
def _deploy_stub(*args: Any, **kwargs: Any):
|
645
|
-
"""mdmd:hidden"""
|
646
|
-
message = "`deploy_stub` has been renamed to `deploy_app`. Please update your code."
|
647
|
-
deprecation_error((2024, 5, 1), message)
|
648
|
-
|
649
|
-
|
650
634
|
run_app = synchronize_api(_run_app)
|
651
635
|
serve_update = synchronize_api(_serve_update)
|
652
636
|
deploy_app = synchronize_api(_deploy_app)
|
653
637
|
interactive_shell = synchronize_api(_interactive_shell)
|
654
|
-
run_stub = synchronize_api(_run_stub)
|
655
|
-
deploy_stub = synchronize_api(_deploy_stub)
|
modal/runner.pyi
CHANGED
@@ -83,8 +83,6 @@ async def _deploy_app(
|
|
83
83
|
async def _interactive_shell(
|
84
84
|
_app: _App, cmds: list[str], environment_name: str = "", pty: bool = True, **kwargs: typing.Any
|
85
85
|
) -> None: ...
|
86
|
-
def _run_stub(*args: typing.Any, **kwargs: typing.Any): ...
|
87
|
-
def _deploy_stub(*args: typing.Any, **kwargs: typing.Any): ...
|
88
86
|
|
89
87
|
class __run_app_spec(typing_extensions.Protocol):
|
90
88
|
def __call__(
|
@@ -153,6 +151,3 @@ class __interactive_shell_spec(typing_extensions.Protocol):
|
|
153
151
|
) -> None: ...
|
154
152
|
|
155
153
|
interactive_shell: __interactive_shell_spec
|
156
|
-
|
157
|
-
def run_stub(*args: typing.Any, **kwargs: typing.Any): ...
|
158
|
-
def deploy_stub(*args: typing.Any, **kwargs: typing.Any): ...
|
modal/sandbox.py
CHANGED
@@ -762,23 +762,3 @@ class _Sandbox(_Object, type_prefix="sb"):
|
|
762
762
|
|
763
763
|
|
764
764
|
Sandbox = synchronize_api(_Sandbox)
|
765
|
-
|
766
|
-
|
767
|
-
def __getattr__(name):
|
768
|
-
if name == "LogsReader":
|
769
|
-
deprecation_error(
|
770
|
-
(2024, 8, 12),
|
771
|
-
"`modal.sandbox.LogsReader` is deprecated. Please import `modal.io_streams.StreamReader` instead.",
|
772
|
-
)
|
773
|
-
from .io_streams import StreamReader
|
774
|
-
|
775
|
-
return StreamReader
|
776
|
-
elif name == "StreamWriter":
|
777
|
-
deprecation_error(
|
778
|
-
(2024, 8, 12),
|
779
|
-
"`modal.sandbox.StreamWriter` is deprecated. Please import `modal.io_streams.StreamWriter` instead.",
|
780
|
-
)
|
781
|
-
from .io_streams import StreamWriter
|
782
|
-
|
783
|
-
return StreamWriter
|
784
|
-
raise AttributeError(f"module {__name__} has no attribute {name}")
|
modal/sandbox.pyi
CHANGED
modal/serving.py
CHANGED
@@ -11,7 +11,6 @@ from synchronicity.async_wrap import asynccontextmanager
|
|
11
11
|
from modal._output import OutputManager
|
12
12
|
|
13
13
|
from ._utils.async_utils import TaskContext, asyncify, synchronize_api, synchronizer
|
14
|
-
from ._utils.deprecation import deprecation_error
|
15
14
|
from ._utils.logger import logger
|
16
15
|
from ._watcher import watch
|
17
16
|
from .cli.import_refs import ImportRef, import_app_from_ref
|
@@ -122,9 +121,4 @@ async def _serve_app(
|
|
122
121
|
yield app
|
123
122
|
|
124
123
|
|
125
|
-
def _serve_stub(*args, **kwargs):
|
126
|
-
deprecation_error((2024, 5, 1), "`serve_stub` is deprecated. Please use `serve_app` instead.")
|
127
|
-
|
128
|
-
|
129
124
|
serve_app = synchronize_api(_serve_app)
|
130
|
-
serve_stub = synchronize_api(_serve_stub)
|
modal/serving.pyi
CHANGED
@@ -33,7 +33,6 @@ def _serve_app(
|
|
33
33
|
_watcher: typing.Optional[collections.abc.AsyncGenerator[set[str], None]] = None,
|
34
34
|
environment_name: typing.Optional[str] = None,
|
35
35
|
) -> typing.AsyncContextManager[_App]: ...
|
36
|
-
def _serve_stub(*args, **kwargs): ...
|
37
36
|
|
38
37
|
class __serve_app_spec(typing_extensions.Protocol):
|
39
38
|
def __call__(
|
@@ -56,5 +55,3 @@ class __serve_app_spec(typing_extensions.Protocol):
|
|
56
55
|
) -> typing.AsyncContextManager[_App]: ...
|
57
56
|
|
58
57
|
serve_app: __serve_app_spec
|
59
|
-
|
60
|
-
def serve_stub(*args, **kwargs): ...
|
modal/volume.py
CHANGED
@@ -27,7 +27,7 @@ from grpclib import GRPCError, Status
|
|
27
27
|
from synchronicity.async_wrap import asynccontextmanager
|
28
28
|
|
29
29
|
import modal_proto.api_pb2
|
30
|
-
from modal.exception import VolumeUploadTimeoutError
|
30
|
+
from modal.exception import InvalidError, VolumeUploadTimeoutError
|
31
31
|
from modal_proto import api_pb2
|
32
32
|
|
33
33
|
from ._object import EPHEMERAL_OBJECT_HEARTBEAT_SLEEP, _get_environment_name, _Object, live_method, live_method_gen
|
@@ -49,7 +49,7 @@ from ._utils.blob_utils import (
|
|
49
49
|
get_file_upload_spec_from_fileobj,
|
50
50
|
get_file_upload_spec_from_path,
|
51
51
|
)
|
52
|
-
from ._utils.deprecation import
|
52
|
+
from ._utils.deprecation import deprecation_warning
|
53
53
|
from ._utils.grpc_utils import retry_transient_errors
|
54
54
|
from ._utils.http_utils import ClientSessionRegistry
|
55
55
|
from ._utils.name_utils import check_object_name
|
@@ -364,21 +364,14 @@ class _Volume(_Object, type_prefix="vo"):
|
|
364
364
|
recursively.
|
365
365
|
"""
|
366
366
|
if path.endswith("**"):
|
367
|
-
|
367
|
+
raise InvalidError(
|
368
368
|
"Glob patterns in `volume get` and `Volume.listdir()` are deprecated. "
|
369
369
|
"Please pass recursive=True instead. For the CLI, just remove the glob suffix."
|
370
370
|
)
|
371
|
-
deprecation_error(
|
372
|
-
(2024, 4, 23),
|
373
|
-
msg,
|
374
|
-
)
|
375
371
|
elif path.endswith("*"):
|
376
|
-
|
377
|
-
(
|
378
|
-
|
379
|
-
"Glob patterns in `volume get` and `Volume.listdir()` are deprecated. "
|
380
|
-
"Please remove the glob `*` suffix."
|
381
|
-
),
|
372
|
+
raise InvalidError(
|
373
|
+
"Glob patterns in `volume get` and `Volume.listdir()` are deprecated. "
|
374
|
+
"Please remove the glob `*` suffix."
|
382
375
|
)
|
383
376
|
|
384
377
|
req = api_pb2.VolumeListFilesRequest(volume_id=self.object_id, path=path, recursive=recursive)
|
@@ -18,18 +18,18 @@ modal/_tunnel.py,sha256=zTBxBiuH1O22tS1OliAJdIsSmaZS8PlnifS_6S5z-mk,6320
|
|
18
18
|
modal/_tunnel.pyi,sha256=a4Ea0RQ5jaJB0A4LH9FANGB44ObqkHHGVDV4RwtokzU,1251
|
19
19
|
modal/_type_manager.py,sha256=DWjgmjYJuOagw2erin506UUbG2H5UzZCFEekS-7hmfA,9087
|
20
20
|
modal/_watcher.py,sha256=K6LYnlmSGQB4tWWI9JADv-tvSvQ1j522FwT71B51CX8,3584
|
21
|
-
modal/app.py,sha256=
|
22
|
-
modal/app.pyi,sha256=
|
21
|
+
modal/app.py,sha256=ZgAz5Ogt5psPpaHWyK_1YcpDnlRLzwJcJj7zXGbgQoI,48457
|
22
|
+
modal/app.pyi,sha256=hLjOTbIGrU-LH930NNxfBHAGZEDBsPGKubt6yT0IH28,24428
|
23
23
|
modal/call_graph.py,sha256=1g2DGcMIJvRy-xKicuf63IVE98gJSnQsr8R_NVMptNc,2581
|
24
24
|
modal/client.py,sha256=o-aQThHpvDHUzg_kUafyhWzACViUBhY2WLZ2EitnSHA,16787
|
25
|
-
modal/client.pyi,sha256=
|
25
|
+
modal/client.pyi,sha256=jp21wYeZSeS6Rj48EpbUAya3JZ18V2_doLf0Seh42Vc,8457
|
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=KKCzn4xTo0hz4t9WxcYVDIHA3_Vm4kPs3UnBq134H58,38238
|
29
29
|
modal/cls.pyi,sha256=BmFCoiFS4EQjkx36iybAFNpxu6xaq24lyJpQuCsB-ko,12990
|
30
30
|
modal/config.py,sha256=OOMEJ5LHNFbHRW5wUpuhl0TH6EPW8D1XV9I3OJXrZrk,12668
|
31
|
-
modal/container_process.py,sha256=
|
32
|
-
modal/container_process.pyi,sha256=
|
31
|
+
modal/container_process.py,sha256=PDvjcyZ6eeN8foKQgR0WJ66Sg3lt7OFhK7Y_Akz6k5w,5846
|
32
|
+
modal/container_process.pyi,sha256=pPIUxVV_TY4huO2jF5cSSjb6L_EN7Es4xRvuwZ5sa5M,2802
|
33
33
|
modal/dict.py,sha256=G7jA94GYBwcN1jgpaFESjS3xDBIjR_N4cJLno5H2qow,14304
|
34
34
|
modal/dict.pyi,sha256=RBaQyOd1ABRNN7vIf5L_rv94y7Kq5Qn9IlKHSr4j8N0,8120
|
35
35
|
modal/environments.py,sha256=gHFNLG78bqgizpQ4w_elz27QOqmcgAonFsmLs7NjUJ4,6804
|
@@ -39,7 +39,7 @@ modal/file_io.py,sha256=lcMs_E9Xfm0YX1t9U2wNIBPnqHRxmImqjLW1GHqVmyg,20945
|
|
39
39
|
modal/file_io.pyi,sha256=oB7x-rKq7bmm8cA7Z7W9C9yeko7KK9m9i5GidFnkGK4,9569
|
40
40
|
modal/file_pattern_matcher.py,sha256=wov-otB5M1oTdrYDtR2_VgacYin2srdtAP4McA1Cqzw,6516
|
41
41
|
modal/functions.py,sha256=kcNHvqeGBxPI7Cgd57NIBBghkfbeFJzXO44WW0jSmao,325
|
42
|
-
modal/functions.pyi,sha256=
|
42
|
+
modal/functions.pyi,sha256=0RGY6ZEkaHZcxhKrY_DnwYew9vDIK7hW8BY0LFjm2GM,17001
|
43
43
|
modal/gpu.py,sha256=Kbhs_u49FaC2Zi0TjCdrpstpRtT5eZgecynmQi5IZVE,6752
|
44
44
|
modal/image.py,sha256=7YZwSbUMAU1zT3OsoCL3ty4dfaNAjvVJWjjVcGZ1ZcE,92929
|
45
45
|
modal/image.pyi,sha256=MDq7tNJevElK78VxFYrZRe_00kz9gPdg98MN5c6fFoE,25644
|
@@ -62,23 +62,23 @@ modal/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
62
62
|
modal/queue.py,sha256=U2QmeY8T0fdLZmZKKcDcSnNzYu8MM-tr2qm0Nd3D2eo,18809
|
63
63
|
modal/queue.pyi,sha256=O0f0S5kM1P0GVgzUzgsN0XsI46B9cJem4kkWluFndjM,10632
|
64
64
|
modal/retries.py,sha256=IvNLDM0f_GLUDD5VgEDoN09C88yoxSrCquinAuxT1Sc,5205
|
65
|
-
modal/runner.py,sha256=
|
66
|
-
modal/runner.pyi,sha256=
|
65
|
+
modal/runner.py,sha256=BqqN9rWfr-Bwuv9fVNZqAwZnM8OSC9H-HTJC1KQPRMg,24150
|
66
|
+
modal/runner.pyi,sha256=1AnEu48SUPnLWp3raQ2zJCV5lc85EGLkX2nL0bHWaB0,5162
|
67
67
|
modal/running_app.py,sha256=v61mapYNV1-O-Uaho5EfJlryMLvIT9We0amUOSvSGx8,1188
|
68
|
-
modal/sandbox.py,sha256=
|
69
|
-
modal/sandbox.pyi,sha256=
|
68
|
+
modal/sandbox.py,sha256=shZ-jzYx5WJl8qgv84OWkwzhIhunSNvm2KMUjGAoIhg,32062
|
69
|
+
modal/sandbox.pyi,sha256=BD1VfQGFY6X6sismOWGd8_UMTPE7-gs3eSfNFw44u2M,22931
|
70
70
|
modal/schedule.py,sha256=ewa7hb9NKYnoeSCW2PujZAbGGJL8btX6X3KalCFpc_M,2626
|
71
71
|
modal/scheduler_placement.py,sha256=BAREdOY5HzHpzSBqt6jDVR6YC_jYfHMVqOzkyqQfngU,1235
|
72
72
|
modal/secret.py,sha256=I2z-rgKWl_Ix107d2_Y2OWGXdFOuJ7zMOyDfIOdFI1A,10374
|
73
73
|
modal/secret.pyi,sha256=NY_dz0UjiYyn4u4LaBZwPP3Ji7SlTLpEyzrYK2sj9HQ,3103
|
74
|
-
modal/serving.py,sha256=
|
75
|
-
modal/serving.pyi,sha256=
|
74
|
+
modal/serving.py,sha256=3I3WBeVbzZY258u9PXBCW_dZBgypq3OhwBuTVvlgubE,4423
|
75
|
+
modal/serving.pyi,sha256=YfixTaWikyYpwhnNxCHMZnDDQiPmV1xJ87QF91U_WGU,1924
|
76
76
|
modal/snapshot.py,sha256=6rQvDP3iX9hdiAudKTy0-m0JESt4kk0q2gusXbaRA-8,1279
|
77
77
|
modal/snapshot.pyi,sha256=dIEBdTPb7O3VwkQ8TMPjfyU17RLuS9i0DnACxxHy8X4,676
|
78
78
|
modal/stream_type.py,sha256=A6320qoAAWhEfwOCZfGtymQTu5AfLfJXXgARqooTPvY,417
|
79
79
|
modal/token_flow.py,sha256=0_4KabXKsuE4OXTJ1OuLOtA-b1sesShztMZkkRFK7tA,7605
|
80
80
|
modal/token_flow.pyi,sha256=ILbRv6JsZq-jK8jcJM7eB74e0PsbzwBm7hyPcV9lBlQ,2121
|
81
|
-
modal/volume.py,sha256=
|
81
|
+
modal/volume.py,sha256=E4S7cFbM2vg2i8yCR1qkVHgwPGYkkiBqqVd1dzWgTO8,43216
|
82
82
|
modal/volume.pyi,sha256=9hPIMRBzGZycVL8uRfGpjSmNu_pCbkGAOyrnE86bU2Y,21113
|
83
83
|
modal/_runtime/__init__.py,sha256=MIEP8jhXUeGq_eCjYFcqN5b1bxBM4fdk0VESpjWR0fc,28
|
84
84
|
modal/_runtime/asgi.py,sha256=_2xSTsDD27Cit7xnMs4lzkJA2wzer2_N4Oa3BkXFzVA,22521
|
@@ -99,7 +99,7 @@ modal/_utils/docker_utils.py,sha256=h1uETghR40mp_y3fSWuZAfbIASH1HMzuphJHghAL6DU,
|
|
99
99
|
modal/_utils/function_utils.py,sha256=KNoFx_DBtfw3QMB8V_HPDcj4GylnI3tuf7RKPF2T3-I,27342
|
100
100
|
modal/_utils/git_utils.py,sha256=qtUU6JAttF55ZxYq51y55OR58B0tDPZsZWK5dJe6W5g,3182
|
101
101
|
modal/_utils/grpc_testing.py,sha256=H1zHqthv19eGPJz2HKXDyWXWGSqO4BRsxah3L5Xaa8A,8619
|
102
|
-
modal/_utils/grpc_utils.py,sha256=
|
102
|
+
modal/_utils/grpc_utils.py,sha256=xSFosSJYQ4m6cH9WtChcSXqsnyk6DMeVvOHI4N3914g,10922
|
103
103
|
modal/_utils/hash_utils.py,sha256=zg3J6OGxTFGSFri1qQ12giDz90lWk8bzaxCTUCRtiX4,3034
|
104
104
|
modal/_utils/http_utils.py,sha256=yeTFsXYr0rYMEhB7vBP7audG9Uc7OLhzKBANFDZWVt0,2451
|
105
105
|
modal/_utils/jwt_utils.py,sha256=fxH9plyrbAemTbjSsQtzIdDXE9QXxvMC4DiUZ16G0aA,1360
|
@@ -146,7 +146,7 @@ modal/requirements/2024.10.txt,sha256=qD-5cVIVM9wXesJ6JC89Ew-3m2KjEElUz3jaw_MddR
|
|
146
146
|
modal/requirements/PREVIEW.txt,sha256=qD-5cVIVM9wXesJ6JC89Ew-3m2KjEElUz3jaw_MddRo,296
|
147
147
|
modal/requirements/README.md,sha256=9tK76KP0Uph7O0M5oUgsSwEZDj5y-dcUPsnpR0Sc-Ik,854
|
148
148
|
modal/requirements/base-images.json,sha256=57vMSqzMbLBxw5tFWSaMiIkkVEps4JfX5PAtXGnkS4U,740
|
149
|
-
modal-1.0.0.
|
149
|
+
modal-1.0.0.dev8.dist-info/licenses/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
|
150
150
|
modal_docs/__init__.py,sha256=svYKtV8HDwDCN86zbdWqyq5T8sMdGDj0PVlzc2tIxDM,28
|
151
151
|
modal_docs/gen_cli_docs.py,sha256=c1yfBS_x--gL5bs0N4ihMwqwX8l3IBWSkBAKNNIi6bQ,3801
|
152
152
|
modal_docs/gen_reference_docs.py,sha256=d_CQUGQ0rfw28u75I2mov9AlS773z9rG40-yq5o7g2U,6359
|
@@ -154,10 +154,10 @@ modal_docs/mdmd/__init__.py,sha256=svYKtV8HDwDCN86zbdWqyq5T8sMdGDj0PVlzc2tIxDM,2
|
|
154
154
|
modal_docs/mdmd/mdmd.py,sha256=Irx49MCCTlBOP4FBdLR--JrpA3-WhsVeriq0LGgsRic,6232
|
155
155
|
modal_docs/mdmd/signatures.py,sha256=XJaZrK7Mdepk5fdX51A8uENiLFNil85Ud0d4MH8H5f0,3218
|
156
156
|
modal_proto/__init__.py,sha256=MIEP8jhXUeGq_eCjYFcqN5b1bxBM4fdk0VESpjWR0fc,28
|
157
|
-
modal_proto/api.proto,sha256=
|
157
|
+
modal_proto/api.proto,sha256=rYkUnPrFJ16VieQ7Nch47ijFUC5uZZqXjbX-vuMotpQ,95038
|
158
158
|
modal_proto/api_grpc.py,sha256=C0nQFKPCQN3lBeke1Xd7x4Jzd5m8RxnuFEoUxjIQIwA,115918
|
159
|
-
modal_proto/api_pb2.py,sha256=
|
160
|
-
modal_proto/api_pb2.pyi,sha256=
|
159
|
+
modal_proto/api_pb2.py,sha256=DgY9Urmgfq4zW_dcZs4iBs5MuIIp3ZFVyS86St-ko1s,335226
|
160
|
+
modal_proto/api_pb2.pyi,sha256=y70XJ1wAV9l3EdMN-tNmEJRrCh5PsWGF9MOmEKizGjU,457566
|
161
161
|
modal_proto/api_pb2_grpc.py,sha256=dlQcjQVsUJN6cTG9JX6fxaB2iXUFyfhEF9VtQIh-yZE,250736
|
162
162
|
modal_proto/api_pb2_grpc.pyi,sha256=5j_xfVcvGDXmr9vpUQofD6aLpaI2ZfIdefB9jBHtqnE,58657
|
163
163
|
modal_proto/modal_api_grpc.py,sha256=kmpUqh6tc-mgqsZdH7JeFGrA4HULZggCSI2nDz65JvA,17532
|
@@ -169,10 +169,10 @@ modal_proto/options_pb2.pyi,sha256=l7DBrbLO7q3Ir-XDkWsajm0d0TQqqrfuX54i4BMpdQg,1
|
|
169
169
|
modal_proto/options_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDCNMhZD2VXqocC9l_gk,159
|
170
170
|
modal_proto/options_pb2_grpc.pyi,sha256=CImmhxHsYnF09iENPoe8S4J-n93jtgUYD2JPAc0yJSI,247
|
171
171
|
modal_proto/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
172
|
-
modal_version/__init__.py,sha256=
|
172
|
+
modal_version/__init__.py,sha256=mSIU4DAqSrinyPKo7hd3niRUoksSypFoQ_aHclrYkes,120
|
173
173
|
modal_version/__main__.py,sha256=2FO0yYQQwDTh6udt1h-cBnGd1c4ZyHnHSI4BksxzVac,105
|
174
|
-
modal-1.0.0.
|
175
|
-
modal-1.0.0.
|
176
|
-
modal-1.0.0.
|
177
|
-
modal-1.0.0.
|
178
|
-
modal-1.0.0.
|
174
|
+
modal-1.0.0.dev8.dist-info/METADATA,sha256=a5HqYKDyvXVq9mVIN5WZAh0mMa-meRTm56wuDnu3res,2454
|
175
|
+
modal-1.0.0.dev8.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
|
176
|
+
modal-1.0.0.dev8.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
|
177
|
+
modal-1.0.0.dev8.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
|
178
|
+
modal-1.0.0.dev8.dist-info/RECORD,,
|