modal 1.0.6.dev58__py3-none-any.whl → 1.2.3.dev7__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/__main__.py +3 -4
- modal/_billing.py +80 -0
- modal/_clustered_functions.py +7 -3
- modal/_clustered_functions.pyi +4 -2
- modal/_container_entrypoint.py +41 -49
- modal/_functions.py +424 -195
- modal/_grpc_client.py +171 -0
- modal/_load_context.py +105 -0
- modal/_object.py +68 -20
- modal/_output.py +58 -45
- modal/_partial_function.py +36 -11
- modal/_pty.py +7 -3
- modal/_resolver.py +21 -35
- modal/_runtime/asgi.py +4 -3
- modal/_runtime/container_io_manager.py +301 -186
- modal/_runtime/container_io_manager.pyi +70 -61
- modal/_runtime/execution_context.py +18 -2
- modal/_runtime/execution_context.pyi +4 -1
- modal/_runtime/gpu_memory_snapshot.py +170 -63
- modal/_runtime/user_code_imports.py +28 -58
- modal/_serialization.py +57 -1
- modal/_utils/async_utils.py +33 -12
- modal/_utils/auth_token_manager.py +2 -5
- modal/_utils/blob_utils.py +110 -53
- modal/_utils/function_utils.py +49 -42
- modal/_utils/grpc_utils.py +80 -50
- modal/_utils/mount_utils.py +26 -1
- modal/_utils/name_utils.py +17 -3
- modal/_utils/task_command_router_client.py +536 -0
- modal/_utils/time_utils.py +34 -6
- modal/app.py +219 -83
- modal/app.pyi +229 -56
- modal/billing.py +5 -0
- modal/{requirements → builder}/2025.06.txt +1 -0
- modal/{requirements → builder}/PREVIEW.txt +1 -0
- modal/cli/_download.py +19 -3
- modal/cli/_traceback.py +3 -2
- modal/cli/app.py +4 -4
- modal/cli/cluster.py +15 -7
- modal/cli/config.py +5 -3
- modal/cli/container.py +7 -6
- modal/cli/dict.py +22 -16
- modal/cli/entry_point.py +12 -5
- modal/cli/environment.py +5 -4
- modal/cli/import_refs.py +3 -3
- modal/cli/launch.py +102 -5
- modal/cli/network_file_system.py +9 -13
- modal/cli/profile.py +3 -2
- modal/cli/programs/launch_instance_ssh.py +94 -0
- modal/cli/programs/run_jupyter.py +1 -1
- modal/cli/programs/run_marimo.py +95 -0
- modal/cli/programs/vscode.py +1 -1
- modal/cli/queues.py +57 -26
- modal/cli/run.py +58 -16
- modal/cli/secret.py +48 -22
- modal/cli/utils.py +3 -4
- modal/cli/volume.py +28 -25
- modal/client.py +13 -116
- modal/client.pyi +9 -91
- modal/cloud_bucket_mount.py +5 -3
- modal/cloud_bucket_mount.pyi +5 -1
- modal/cls.py +130 -102
- modal/cls.pyi +45 -85
- modal/config.py +29 -10
- modal/container_process.py +291 -13
- modal/container_process.pyi +95 -32
- modal/dict.py +282 -63
- modal/dict.pyi +423 -73
- modal/environments.py +15 -27
- modal/environments.pyi +5 -15
- modal/exception.py +8 -0
- modal/experimental/__init__.py +143 -38
- modal/experimental/flash.py +247 -78
- modal/experimental/flash.pyi +137 -9
- modal/file_io.py +14 -28
- modal/file_io.pyi +2 -2
- modal/file_pattern_matcher.py +25 -16
- modal/functions.pyi +134 -61
- modal/image.py +255 -86
- modal/image.pyi +300 -62
- modal/io_streams.py +436 -126
- modal/io_streams.pyi +236 -171
- modal/mount.py +62 -157
- modal/mount.pyi +45 -172
- modal/network_file_system.py +30 -53
- modal/network_file_system.pyi +16 -76
- modal/object.pyi +42 -8
- modal/parallel_map.py +821 -113
- modal/parallel_map.pyi +134 -0
- modal/partial_function.pyi +4 -1
- modal/proxy.py +16 -7
- modal/proxy.pyi +10 -2
- modal/queue.py +263 -61
- modal/queue.pyi +409 -66
- modal/runner.py +112 -92
- modal/runner.pyi +45 -27
- modal/sandbox.py +451 -124
- modal/sandbox.pyi +513 -67
- modal/secret.py +291 -67
- modal/secret.pyi +425 -19
- modal/serving.py +7 -11
- modal/serving.pyi +7 -8
- modal/snapshot.py +11 -8
- modal/token_flow.py +4 -4
- modal/volume.py +344 -98
- modal/volume.pyi +464 -68
- {modal-1.0.6.dev58.dist-info → modal-1.2.3.dev7.dist-info}/METADATA +9 -8
- modal-1.2.3.dev7.dist-info/RECORD +195 -0
- modal_docs/mdmd/mdmd.py +11 -1
- modal_proto/api.proto +399 -67
- modal_proto/api_grpc.py +241 -1
- modal_proto/api_pb2.py +1395 -1000
- modal_proto/api_pb2.pyi +1239 -79
- modal_proto/api_pb2_grpc.py +499 -4
- modal_proto/api_pb2_grpc.pyi +162 -14
- modal_proto/modal_api_grpc.py +175 -160
- modal_proto/sandbox_router.proto +145 -0
- modal_proto/sandbox_router_grpc.py +105 -0
- modal_proto/sandbox_router_pb2.py +149 -0
- modal_proto/sandbox_router_pb2.pyi +333 -0
- modal_proto/sandbox_router_pb2_grpc.py +203 -0
- modal_proto/sandbox_router_pb2_grpc.pyi +75 -0
- modal_proto/task_command_router.proto +144 -0
- modal_proto/task_command_router_grpc.py +105 -0
- modal_proto/task_command_router_pb2.py +149 -0
- modal_proto/task_command_router_pb2.pyi +333 -0
- modal_proto/task_command_router_pb2_grpc.py +203 -0
- modal_proto/task_command_router_pb2_grpc.pyi +75 -0
- modal_version/__init__.py +1 -1
- modal-1.0.6.dev58.dist-info/RECORD +0 -183
- modal_proto/modal_options_grpc.py +0 -3
- modal_proto/options.proto +0 -19
- modal_proto/options_grpc.py +0 -3
- modal_proto/options_pb2.py +0 -35
- modal_proto/options_pb2.pyi +0 -20
- modal_proto/options_pb2_grpc.py +0 -4
- modal_proto/options_pb2_grpc.pyi +0 -7
- /modal/{requirements → builder}/2023.12.312.txt +0 -0
- /modal/{requirements → builder}/2023.12.txt +0 -0
- /modal/{requirements → builder}/2024.04.txt +0 -0
- /modal/{requirements → builder}/2024.10.txt +0 -0
- /modal/{requirements → builder}/README.md +0 -0
- /modal/{requirements → builder}/base-images.json +0 -0
- {modal-1.0.6.dev58.dist-info → modal-1.2.3.dev7.dist-info}/WHEEL +0 -0
- {modal-1.0.6.dev58.dist-info → modal-1.2.3.dev7.dist-info}/entry_points.txt +0 -0
- {modal-1.0.6.dev58.dist-info → modal-1.2.3.dev7.dist-info}/licenses/LICENSE +0 -0
- {modal-1.0.6.dev58.dist-info → modal-1.2.3.dev7.dist-info}/top_level.txt +0 -0
modal/object.pyi
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import collections.abc
|
|
2
2
|
import google.protobuf.message
|
|
3
|
+
import modal._load_context
|
|
3
4
|
import modal._resolver
|
|
4
5
|
import modal.client
|
|
5
6
|
import typing
|
|
@@ -12,12 +13,14 @@ class Object:
|
|
|
12
13
|
_prefix_to_type: typing.ClassVar[dict[str, type]]
|
|
13
14
|
_load: typing.Optional[
|
|
14
15
|
collections.abc.Callable[
|
|
15
|
-
[typing_extensions.Self, modal._resolver.Resolver, typing.Optional[str]],
|
|
16
|
+
[typing_extensions.Self, modal._resolver.Resolver, modal._load_context.LoadContext, typing.Optional[str]],
|
|
17
|
+
collections.abc.Awaitable[None],
|
|
16
18
|
]
|
|
17
19
|
]
|
|
18
20
|
_preload: typing.Optional[
|
|
19
21
|
collections.abc.Callable[
|
|
20
|
-
[typing_extensions.Self, modal._resolver.Resolver, typing.Optional[str]],
|
|
22
|
+
[typing_extensions.Self, modal._resolver.Resolver, modal._load_context.LoadContext, typing.Optional[str]],
|
|
23
|
+
collections.abc.Awaitable[None],
|
|
21
24
|
]
|
|
22
25
|
]
|
|
23
26
|
_rep: str
|
|
@@ -27,10 +30,12 @@ class Object:
|
|
|
27
30
|
_deduplication_key: typing.Optional[
|
|
28
31
|
collections.abc.Callable[[], collections.abc.Awaitable[collections.abc.Hashable]]
|
|
29
32
|
]
|
|
33
|
+
_load_context_overrides: modal._load_context.LoadContext
|
|
30
34
|
_object_id: typing.Optional[str]
|
|
31
35
|
_client: typing.Optional[modal.client.Client]
|
|
32
36
|
_is_hydrated: bool
|
|
33
37
|
_is_rehydrated: bool
|
|
38
|
+
_name: typing.Optional[str]
|
|
34
39
|
|
|
35
40
|
def __init__(self, *args, **kwargs):
|
|
36
41
|
"""mdmd:hidden"""
|
|
@@ -45,15 +50,22 @@ class Object:
|
|
|
45
50
|
/,
|
|
46
51
|
rep: str,
|
|
47
52
|
load: typing.Optional[
|
|
48
|
-
collections.abc.Callable[
|
|
53
|
+
collections.abc.Callable[
|
|
54
|
+
[SUPERSELF, modal._resolver.Resolver, modal._load_context.LoadContext, typing.Optional[str]], None
|
|
55
|
+
]
|
|
49
56
|
] = None,
|
|
50
57
|
is_another_app: bool = False,
|
|
51
58
|
preload: typing.Optional[
|
|
52
|
-
collections.abc.Callable[
|
|
59
|
+
collections.abc.Callable[
|
|
60
|
+
[SUPERSELF, modal._resolver.Resolver, modal._load_context.LoadContext, typing.Optional[str]], None
|
|
61
|
+
]
|
|
53
62
|
] = None,
|
|
54
63
|
hydrate_lazily: bool = False,
|
|
55
64
|
deps: typing.Optional[collections.abc.Callable[..., collections.abc.Sequence[Object]]] = None,
|
|
56
65
|
deduplication_key: typing.Optional[collections.abc.Callable[[], collections.abc.Hashable]] = None,
|
|
66
|
+
name: typing.Optional[str] = None,
|
|
67
|
+
*,
|
|
68
|
+
load_context_overrides: typing.Optional[modal._load_context.LoadContext] = None,
|
|
57
69
|
): ...
|
|
58
70
|
def aio(
|
|
59
71
|
self,
|
|
@@ -61,13 +73,15 @@ class Object:
|
|
|
61
73
|
rep: str,
|
|
62
74
|
load: typing.Optional[
|
|
63
75
|
collections.abc.Callable[
|
|
64
|
-
[SUPERSELF, modal._resolver.Resolver, typing.Optional[str]],
|
|
76
|
+
[SUPERSELF, modal._resolver.Resolver, modal._load_context.LoadContext, typing.Optional[str]],
|
|
77
|
+
collections.abc.Awaitable[None],
|
|
65
78
|
]
|
|
66
79
|
] = None,
|
|
67
80
|
is_another_app: bool = False,
|
|
68
81
|
preload: typing.Optional[
|
|
69
82
|
collections.abc.Callable[
|
|
70
|
-
[SUPERSELF, modal._resolver.Resolver, typing.Optional[str]],
|
|
83
|
+
[SUPERSELF, modal._resolver.Resolver, modal._load_context.LoadContext, typing.Optional[str]],
|
|
84
|
+
collections.abc.Awaitable[None],
|
|
71
85
|
]
|
|
72
86
|
] = None,
|
|
73
87
|
hydrate_lazily: bool = False,
|
|
@@ -75,6 +89,9 @@ class Object:
|
|
|
75
89
|
deduplication_key: typing.Optional[
|
|
76
90
|
collections.abc.Callable[[], collections.abc.Awaitable[collections.abc.Hashable]]
|
|
77
91
|
] = None,
|
|
92
|
+
name: typing.Optional[str] = None,
|
|
93
|
+
*,
|
|
94
|
+
load_context_overrides: typing.Optional[modal._load_context.LoadContext] = None,
|
|
78
95
|
): ...
|
|
79
96
|
|
|
80
97
|
_init: ___init_spec[typing_extensions.Self]
|
|
@@ -98,27 +115,44 @@ class Object:
|
|
|
98
115
|
@classmethod
|
|
99
116
|
def _from_loader(
|
|
100
117
|
cls,
|
|
101
|
-
load: collections.abc.Callable[
|
|
118
|
+
load: collections.abc.Callable[
|
|
119
|
+
[typing_extensions.Self, modal._resolver.Resolver, modal._load_context.LoadContext, typing.Optional[str]],
|
|
120
|
+
None,
|
|
121
|
+
],
|
|
102
122
|
rep: str,
|
|
103
123
|
is_another_app: bool = False,
|
|
104
124
|
preload: typing.Optional[
|
|
105
|
-
collections.abc.Callable[
|
|
125
|
+
collections.abc.Callable[
|
|
126
|
+
[
|
|
127
|
+
typing_extensions.Self,
|
|
128
|
+
modal._resolver.Resolver,
|
|
129
|
+
modal._load_context.LoadContext,
|
|
130
|
+
typing.Optional[str],
|
|
131
|
+
],
|
|
132
|
+
None,
|
|
133
|
+
]
|
|
106
134
|
] = None,
|
|
107
135
|
hydrate_lazily: bool = False,
|
|
108
136
|
deps: typing.Optional[collections.abc.Callable[..., collections.abc.Sequence[Object]]] = None,
|
|
109
137
|
deduplication_key: typing.Optional[collections.abc.Callable[[], collections.abc.Hashable]] = None,
|
|
138
|
+
name: typing.Optional[str] = None,
|
|
139
|
+
*,
|
|
140
|
+
load_context_overrides: modal._load_context.LoadContext,
|
|
110
141
|
): ...
|
|
111
142
|
@staticmethod
|
|
112
143
|
def _get_type_from_id(object_id: str) -> type[Object]: ...
|
|
113
144
|
@classmethod
|
|
114
145
|
def _is_id_type(cls, object_id) -> bool: ...
|
|
115
146
|
@classmethod
|
|
147
|
+
def _repr(cls, name: str, environment_name: typing.Optional[str] = None) -> str: ...
|
|
148
|
+
@classmethod
|
|
116
149
|
def _new_hydrated(
|
|
117
150
|
cls,
|
|
118
151
|
object_id: str,
|
|
119
152
|
client: modal.client.Client,
|
|
120
153
|
handle_metadata: typing.Optional[google.protobuf.message.Message],
|
|
121
154
|
is_another_app: bool = False,
|
|
155
|
+
rep: typing.Optional[str] = None,
|
|
122
156
|
) -> typing_extensions.Self: ...
|
|
123
157
|
def _hydrate_from_other(self, other: typing_extensions.Self): ...
|
|
124
158
|
def __repr__(self): ...
|