modal 0.62.115__py3-none-any.whl → 0.72.13__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/__init__.py +13 -9
- modal/__main__.py +41 -3
- modal/_clustered_functions.py +80 -0
- modal/_clustered_functions.pyi +22 -0
- modal/_container_entrypoint.py +402 -398
- modal/_ipython.py +3 -13
- modal/_location.py +17 -10
- modal/_output.py +243 -99
- modal/_pty.py +2 -2
- modal/_resolver.py +55 -60
- modal/_resources.py +26 -7
- modal/_runtime/__init__.py +1 -0
- modal/_runtime/asgi.py +519 -0
- modal/_runtime/container_io_manager.py +1025 -0
- modal/{execution_context.py → _runtime/execution_context.py} +11 -2
- modal/_runtime/telemetry.py +169 -0
- modal/_runtime/user_code_imports.py +356 -0
- modal/_serialization.py +123 -6
- modal/_traceback.py +47 -187
- modal/_tunnel.py +50 -14
- modal/_tunnel.pyi +19 -36
- modal/_utils/app_utils.py +3 -17
- modal/_utils/async_utils.py +386 -104
- modal/_utils/blob_utils.py +157 -186
- modal/_utils/bytes_io_segment_payload.py +97 -0
- modal/_utils/deprecation.py +89 -0
- modal/_utils/docker_utils.py +98 -0
- modal/_utils/function_utils.py +299 -98
- modal/_utils/grpc_testing.py +47 -34
- modal/_utils/grpc_utils.py +54 -21
- modal/_utils/hash_utils.py +51 -10
- modal/_utils/http_utils.py +39 -9
- modal/_utils/logger.py +2 -1
- modal/_utils/mount_utils.py +34 -16
- modal/_utils/name_utils.py +58 -0
- modal/_utils/package_utils.py +14 -1
- modal/_utils/pattern_utils.py +205 -0
- modal/_utils/rand_pb_testing.py +3 -3
- modal/_utils/shell_utils.py +15 -49
- modal/_vendor/a2wsgi_wsgi.py +62 -72
- modal/_vendor/cloudpickle.py +1 -1
- modal/_watcher.py +12 -10
- modal/app.py +561 -323
- modal/app.pyi +474 -262
- modal/call_graph.py +7 -6
- modal/cli/_download.py +22 -6
- modal/cli/_traceback.py +200 -0
- modal/cli/app.py +203 -42
- modal/cli/config.py +12 -5
- modal/cli/container.py +61 -13
- modal/cli/dict.py +128 -0
- modal/cli/entry_point.py +26 -13
- modal/cli/environment.py +40 -9
- modal/cli/import_refs.py +21 -48
- modal/cli/launch.py +28 -14
- modal/cli/network_file_system.py +57 -21
- modal/cli/profile.py +1 -1
- modal/cli/programs/run_jupyter.py +34 -9
- modal/cli/programs/vscode.py +58 -8
- modal/cli/queues.py +131 -0
- modal/cli/run.py +199 -96
- modal/cli/secret.py +5 -4
- modal/cli/token.py +7 -2
- modal/cli/utils.py +74 -8
- modal/cli/volume.py +97 -56
- modal/client.py +248 -144
- modal/client.pyi +156 -124
- modal/cloud_bucket_mount.py +43 -30
- modal/cloud_bucket_mount.pyi +32 -25
- modal/cls.py +528 -141
- modal/cls.pyi +189 -145
- modal/config.py +32 -15
- modal/container_process.py +177 -0
- modal/container_process.pyi +82 -0
- modal/dict.py +50 -54
- modal/dict.pyi +120 -164
- modal/environments.py +106 -5
- modal/environments.pyi +77 -25
- modal/exception.py +30 -43
- modal/experimental.py +62 -2
- modal/file_io.py +537 -0
- modal/file_io.pyi +235 -0
- modal/file_pattern_matcher.py +196 -0
- modal/functions.py +846 -428
- modal/functions.pyi +446 -387
- modal/gpu.py +57 -44
- modal/image.py +943 -417
- modal/image.pyi +584 -245
- modal/io_streams.py +434 -0
- modal/io_streams.pyi +122 -0
- modal/mount.py +223 -90
- modal/mount.pyi +241 -243
- modal/network_file_system.py +85 -86
- modal/network_file_system.pyi +151 -110
- modal/object.py +66 -36
- modal/object.pyi +166 -143
- modal/output.py +63 -0
- modal/parallel_map.py +73 -47
- modal/parallel_map.pyi +51 -63
- modal/partial_function.py +272 -107
- modal/partial_function.pyi +219 -120
- modal/proxy.py +15 -12
- modal/proxy.pyi +3 -8
- modal/queue.py +96 -72
- modal/queue.pyi +210 -135
- modal/requirements/2024.04.txt +2 -1
- modal/requirements/2024.10.txt +16 -0
- modal/requirements/README.md +21 -0
- modal/requirements/base-images.json +22 -0
- modal/retries.py +45 -4
- modal/runner.py +325 -203
- modal/runner.pyi +124 -110
- modal/running_app.py +27 -4
- modal/sandbox.py +509 -231
- modal/sandbox.pyi +396 -169
- modal/schedule.py +2 -2
- modal/scheduler_placement.py +20 -3
- modal/secret.py +41 -25
- modal/secret.pyi +62 -42
- modal/serving.py +39 -49
- modal/serving.pyi +37 -43
- modal/stream_type.py +15 -0
- modal/token_flow.py +5 -3
- modal/token_flow.pyi +37 -32
- modal/volume.py +123 -137
- modal/volume.pyi +228 -221
- {modal-0.62.115.dist-info → modal-0.72.13.dist-info}/METADATA +5 -5
- modal-0.72.13.dist-info/RECORD +174 -0
- {modal-0.62.115.dist-info → modal-0.72.13.dist-info}/top_level.txt +0 -1
- modal_docs/gen_reference_docs.py +3 -1
- modal_docs/mdmd/mdmd.py +0 -1
- modal_docs/mdmd/signatures.py +1 -2
- modal_global_objects/images/base_images.py +28 -0
- modal_global_objects/mounts/python_standalone.py +2 -2
- modal_proto/__init__.py +1 -1
- modal_proto/api.proto +1231 -531
- modal_proto/api_grpc.py +750 -430
- modal_proto/api_pb2.py +2102 -1176
- modal_proto/api_pb2.pyi +8859 -0
- modal_proto/api_pb2_grpc.py +1329 -675
- modal_proto/api_pb2_grpc.pyi +1416 -0
- modal_proto/modal_api_grpc.py +149 -0
- modal_proto/modal_options_grpc.py +3 -0
- modal_proto/options_pb2.pyi +20 -0
- modal_proto/options_pb2_grpc.pyi +7 -0
- modal_proto/py.typed +0 -0
- modal_version/__init__.py +1 -1
- modal_version/_version_generated.py +2 -2
- modal/_asgi.py +0 -370
- modal/_container_exec.py +0 -128
- modal/_container_io_manager.py +0 -646
- modal/_container_io_manager.pyi +0 -412
- modal/_sandbox_shell.py +0 -49
- modal/app_utils.py +0 -20
- modal/app_utils.pyi +0 -17
- modal/execution_context.pyi +0 -37
- modal/shared_volume.py +0 -23
- modal/shared_volume.pyi +0 -24
- modal-0.62.115.dist-info/RECORD +0 -207
- modal_global_objects/images/conda.py +0 -15
- modal_global_objects/images/debian_slim.py +0 -15
- modal_global_objects/images/micromamba.py +0 -15
- test/__init__.py +0 -1
- test/aio_test.py +0 -12
- test/async_utils_test.py +0 -279
- test/blob_test.py +0 -67
- test/cli_imports_test.py +0 -149
- test/cli_test.py +0 -674
- test/client_test.py +0 -203
- test/cloud_bucket_mount_test.py +0 -22
- test/cls_test.py +0 -636
- test/config_test.py +0 -149
- test/conftest.py +0 -1485
- test/container_app_test.py +0 -50
- test/container_test.py +0 -1405
- test/cpu_test.py +0 -23
- test/decorator_test.py +0 -85
- test/deprecation_test.py +0 -34
- test/dict_test.py +0 -51
- test/e2e_test.py +0 -68
- test/error_test.py +0 -7
- test/function_serialization_test.py +0 -32
- test/function_test.py +0 -791
- test/function_utils_test.py +0 -101
- test/gpu_test.py +0 -159
- test/grpc_utils_test.py +0 -82
- test/helpers.py +0 -47
- test/image_test.py +0 -814
- test/live_reload_test.py +0 -80
- test/lookup_test.py +0 -70
- test/mdmd_test.py +0 -329
- test/mount_test.py +0 -162
- test/mounted_files_test.py +0 -327
- test/network_file_system_test.py +0 -188
- test/notebook_test.py +0 -66
- test/object_test.py +0 -41
- test/package_utils_test.py +0 -25
- test/queue_test.py +0 -115
- test/resolver_test.py +0 -59
- test/retries_test.py +0 -67
- test/runner_test.py +0 -85
- test/sandbox_test.py +0 -191
- test/schedule_test.py +0 -15
- test/scheduler_placement_test.py +0 -57
- test/secret_test.py +0 -89
- test/serialization_test.py +0 -50
- test/stub_composition_test.py +0 -10
- test/stub_test.py +0 -361
- test/test_asgi_wrapper.py +0 -234
- test/token_flow_test.py +0 -18
- test/traceback_test.py +0 -135
- test/tunnel_test.py +0 -29
- test/utils_test.py +0 -88
- test/version_test.py +0 -14
- test/volume_test.py +0 -397
- test/watcher_test.py +0 -58
- test/webhook_test.py +0 -145
- {modal-0.62.115.dist-info → modal-0.72.13.dist-info}/LICENSE +0 -0
- {modal-0.62.115.dist-info → modal-0.72.13.dist-info}/WHEEL +0 -0
- {modal-0.62.115.dist-info → modal-0.72.13.dist-info}/entry_points.txt +0 -0
modal/app.pyi
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import
|
1
|
+
import collections.abc
|
2
2
|
import modal._utils.function_utils
|
3
3
|
import modal.client
|
4
4
|
import modal.cloud_bucket_mount
|
@@ -9,10 +9,10 @@ import modal.image
|
|
9
9
|
import modal.mount
|
10
10
|
import modal.network_file_system
|
11
11
|
import modal.object
|
12
|
+
import modal.partial_function
|
12
13
|
import modal.proxy
|
13
14
|
import modal.retries
|
14
15
|
import modal.running_app
|
15
|
-
import modal.sandbox
|
16
16
|
import modal.schedule
|
17
17
|
import modal.scheduler_placement
|
18
18
|
import modal.secret
|
@@ -27,325 +27,537 @@ class _LocalEntrypoint:
|
|
27
27
|
_info: modal._utils.function_utils.FunctionInfo
|
28
28
|
_app: _App
|
29
29
|
|
30
|
-
def __init__(self, info, app):
|
31
|
-
|
32
|
-
|
33
|
-
def __call__(self, *args, **kwargs):
|
34
|
-
...
|
35
|
-
|
30
|
+
def __init__(self, info: modal._utils.function_utils.FunctionInfo, app: _App) -> None: ...
|
31
|
+
def __call__(self, *args: typing.Any, **kwargs: typing.Any) -> typing.Any: ...
|
36
32
|
@property
|
37
|
-
def info(self) -> modal._utils.function_utils.FunctionInfo:
|
38
|
-
...
|
39
|
-
|
33
|
+
def info(self) -> modal._utils.function_utils.FunctionInfo: ...
|
40
34
|
@property
|
41
|
-
def app(self) -> _App:
|
42
|
-
...
|
43
|
-
|
35
|
+
def app(self) -> _App: ...
|
44
36
|
@property
|
45
|
-
def stub(self) -> _App:
|
46
|
-
...
|
47
|
-
|
37
|
+
def stub(self) -> _App: ...
|
48
38
|
|
49
39
|
class LocalEntrypoint:
|
50
40
|
_info: modal._utils.function_utils.FunctionInfo
|
51
41
|
_app: App
|
52
42
|
|
53
|
-
def __init__(self, info, app):
|
54
|
-
|
55
|
-
|
56
|
-
def __call__(self, *args, **kwargs):
|
57
|
-
...
|
58
|
-
|
43
|
+
def __init__(self, info: modal._utils.function_utils.FunctionInfo, app: App) -> None: ...
|
44
|
+
def __call__(self, *args: typing.Any, **kwargs: typing.Any) -> typing.Any: ...
|
59
45
|
@property
|
60
|
-
def info(self) -> modal._utils.function_utils.FunctionInfo:
|
61
|
-
...
|
62
|
-
|
46
|
+
def info(self) -> modal._utils.function_utils.FunctionInfo: ...
|
63
47
|
@property
|
64
|
-
def app(self) -> App:
|
65
|
-
...
|
66
|
-
|
48
|
+
def app(self) -> App: ...
|
67
49
|
@property
|
68
|
-
def stub(self) -> App:
|
69
|
-
...
|
50
|
+
def stub(self) -> App: ...
|
70
51
|
|
52
|
+
def check_sequence(items: typing.Sequence[typing.Any], item_type: type[typing.Any], error_msg: str) -> None: ...
|
71
53
|
|
72
|
-
|
73
|
-
...
|
54
|
+
CLS_T = typing.TypeVar("CLS_T", bound="type[typing.Any]")
|
74
55
|
|
56
|
+
P = typing_extensions.ParamSpec("P")
|
75
57
|
|
76
|
-
|
58
|
+
ReturnType = typing.TypeVar("ReturnType")
|
77
59
|
|
78
|
-
|
79
|
-
_name: typing.Union[str, None]
|
80
|
-
_description: typing.Union[str, None]
|
81
|
-
_indexed_objects: typing.Dict[str, modal.object._Object]
|
82
|
-
_function_mounts: typing.Dict[str, modal.mount._Mount]
|
83
|
-
_mounts: typing.Sequence[modal.mount._Mount]
|
84
|
-
_secrets: typing.Sequence[modal.secret._Secret]
|
85
|
-
_volumes: typing.Dict[typing.Union[str, pathlib.PurePosixPath], modal.volume._Volume]
|
86
|
-
_web_endpoints: typing.List[str]
|
87
|
-
_local_entrypoints: typing.Dict[str, _LocalEntrypoint]
|
88
|
-
_running_app: typing.Union[modal.running_app.RunningApp, None]
|
89
|
-
_client: typing.Union[modal.client._Client, None]
|
90
|
-
_all_apps: typing.ClassVar[typing.Dict[typing.Union[str, None], typing.List[_App]]]
|
60
|
+
OriginalReturnType = typing.TypeVar("OriginalReturnType")
|
91
61
|
|
92
|
-
|
93
|
-
|
62
|
+
class _FunctionDecoratorType:
|
63
|
+
@typing.overload
|
64
|
+
def __call__(
|
65
|
+
self, func: modal.partial_function.PartialFunction[P, ReturnType, OriginalReturnType]
|
66
|
+
) -> modal.functions.Function[P, ReturnType, OriginalReturnType]: ...
|
67
|
+
@typing.overload
|
68
|
+
def __call__(
|
69
|
+
self, func: typing.Callable[P, collections.abc.Coroutine[typing.Any, typing.Any, ReturnType]]
|
70
|
+
) -> modal.functions.Function[P, ReturnType, collections.abc.Coroutine[typing.Any, typing.Any, ReturnType]]: ...
|
71
|
+
@typing.overload
|
72
|
+
def __call__(self, func: typing.Callable[P, ReturnType]) -> modal.functions.Function[P, ReturnType, ReturnType]: ...
|
94
73
|
|
74
|
+
class _App:
|
75
|
+
_all_apps: typing.ClassVar[dict[typing.Optional[str], list[_App]]]
|
76
|
+
_container_app: typing.ClassVar[typing.Optional[_App]]
|
77
|
+
_name: typing.Optional[str]
|
78
|
+
_description: typing.Optional[str]
|
79
|
+
_functions: dict[str, modal.functions._Function]
|
80
|
+
_classes: dict[str, modal.cls._Cls]
|
81
|
+
_image: typing.Optional[modal.image._Image]
|
82
|
+
_mounts: collections.abc.Sequence[modal.mount._Mount]
|
83
|
+
_secrets: collections.abc.Sequence[modal.secret._Secret]
|
84
|
+
_volumes: dict[typing.Union[str, pathlib.PurePosixPath], modal.volume._Volume]
|
85
|
+
_web_endpoints: list[str]
|
86
|
+
_local_entrypoints: dict[str, _LocalEntrypoint]
|
87
|
+
_app_id: typing.Optional[str]
|
88
|
+
_running_app: typing.Optional[modal.running_app.RunningApp]
|
89
|
+
_client: typing.Optional[modal.client._Client]
|
90
|
+
|
91
|
+
def __init__(
|
92
|
+
self,
|
93
|
+
name: typing.Optional[str] = None,
|
94
|
+
*,
|
95
|
+
image: typing.Optional[modal.image._Image] = None,
|
96
|
+
mounts: collections.abc.Sequence[modal.mount._Mount] = [],
|
97
|
+
secrets: collections.abc.Sequence[modal.secret._Secret] = [],
|
98
|
+
volumes: dict[typing.Union[str, pathlib.PurePosixPath], modal.volume._Volume] = {},
|
99
|
+
) -> None: ...
|
95
100
|
@property
|
96
|
-
def name(self) -> typing.
|
97
|
-
...
|
98
|
-
|
101
|
+
def name(self) -> typing.Optional[str]: ...
|
99
102
|
@property
|
100
|
-
def is_interactive(self) -> bool:
|
101
|
-
...
|
102
|
-
|
103
|
+
def is_interactive(self) -> bool: ...
|
103
104
|
@property
|
104
|
-
def app_id(self) -> typing.
|
105
|
-
...
|
106
|
-
|
105
|
+
def app_id(self) -> typing.Optional[str]: ...
|
107
106
|
@property
|
108
|
-
def description(self) -> typing.
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
def
|
118
|
-
|
119
|
-
|
120
|
-
def
|
121
|
-
|
122
|
-
|
123
|
-
def __setitem__(self, tag: str, obj: modal.object._Object):
|
124
|
-
...
|
125
|
-
|
126
|
-
def __getattr__(self, tag: str) -> modal.object._Object:
|
127
|
-
...
|
128
|
-
|
129
|
-
def __setattr__(self, tag: str, obj: modal.object._Object):
|
130
|
-
...
|
131
|
-
|
107
|
+
def description(self) -> typing.Optional[str]: ...
|
108
|
+
@staticmethod
|
109
|
+
async def lookup(
|
110
|
+
name: str,
|
111
|
+
client: typing.Optional[modal.client._Client] = None,
|
112
|
+
environment_name: typing.Optional[str] = None,
|
113
|
+
create_if_missing: bool = False,
|
114
|
+
) -> _App: ...
|
115
|
+
def set_description(self, description: str): ...
|
116
|
+
def _validate_blueprint_value(self, key: str, value: typing.Any): ...
|
117
|
+
def __getitem__(self, tag: str): ...
|
118
|
+
def __setitem__(self, tag: str, obj: modal.object._Object): ...
|
119
|
+
def __getattr__(self, tag: str): ...
|
120
|
+
def __setattr__(self, tag: str, obj: modal.object._Object): ...
|
132
121
|
@property
|
133
|
-
def image(self) -> modal.image._Image:
|
134
|
-
...
|
135
|
-
|
122
|
+
def image(self) -> modal.image._Image: ...
|
136
123
|
@image.setter
|
137
|
-
def image(self, value):
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
def
|
150
|
-
|
151
|
-
|
152
|
-
def
|
153
|
-
|
154
|
-
|
155
|
-
def _get_watch_mounts(self):
|
156
|
-
...
|
157
|
-
|
158
|
-
def _add_function(self, function: modal.functions._Function):
|
159
|
-
...
|
160
|
-
|
161
|
-
def _init_container(self, client: modal.client._Client, running_app: modal.running_app.RunningApp):
|
162
|
-
...
|
163
|
-
|
124
|
+
def image(self, value): ...
|
125
|
+
def _uncreate_all_objects(self): ...
|
126
|
+
def _set_local_app(
|
127
|
+
self, client: modal.client._Client, running_app: modal.running_app.RunningApp
|
128
|
+
) -> typing.AsyncContextManager[None]: ...
|
129
|
+
def run(
|
130
|
+
self,
|
131
|
+
client: typing.Optional[modal.client._Client] = None,
|
132
|
+
show_progress: typing.Optional[bool] = None,
|
133
|
+
detach: bool = False,
|
134
|
+
interactive: bool = False,
|
135
|
+
) -> typing.AsyncContextManager[_App]: ...
|
136
|
+
def _get_default_image(self): ...
|
137
|
+
def _get_watch_mounts(self): ...
|
138
|
+
def _add_function(self, function: modal.functions._Function, is_web_endpoint: bool): ...
|
139
|
+
def _add_class(self, tag: str, cls: modal.cls._Cls): ...
|
140
|
+
def _init_container(self, client: modal.client._Client, running_app: modal.running_app.RunningApp): ...
|
164
141
|
@property
|
165
|
-
def registered_functions(self) ->
|
166
|
-
...
|
167
|
-
|
142
|
+
def registered_functions(self) -> dict[str, modal.functions._Function]: ...
|
168
143
|
@property
|
169
|
-
def registered_classes(self) ->
|
170
|
-
...
|
171
|
-
|
144
|
+
def registered_classes(self) -> dict[str, modal.functions._Function]: ...
|
172
145
|
@property
|
173
|
-
def registered_entrypoints(self) ->
|
174
|
-
...
|
175
|
-
|
146
|
+
def registered_entrypoints(self) -> dict[str, _LocalEntrypoint]: ...
|
176
147
|
@property
|
177
|
-
def indexed_objects(self) ->
|
178
|
-
...
|
179
|
-
|
148
|
+
def indexed_objects(self) -> dict[str, modal.object._Object]: ...
|
180
149
|
@property
|
181
|
-
def registered_web_endpoints(self) ->
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
150
|
+
def registered_web_endpoints(self) -> list[str]: ...
|
151
|
+
def local_entrypoint(
|
152
|
+
self, _warn_parentheses_missing: typing.Any = None, *, name: typing.Optional[str] = None
|
153
|
+
) -> typing.Callable[[typing.Callable[..., typing.Any]], _LocalEntrypoint]: ...
|
154
|
+
def function(
|
155
|
+
self,
|
156
|
+
_warn_parentheses_missing: typing.Any = None,
|
157
|
+
*,
|
158
|
+
image: typing.Optional[modal.image._Image] = None,
|
159
|
+
schedule: typing.Optional[modal.schedule.Schedule] = None,
|
160
|
+
secrets: collections.abc.Sequence[modal.secret._Secret] = (),
|
161
|
+
gpu: typing.Union[
|
162
|
+
None, bool, str, modal.gpu._GPUConfig, list[typing.Union[None, bool, str, modal.gpu._GPUConfig]]
|
163
|
+
] = None,
|
164
|
+
serialized: bool = False,
|
165
|
+
mounts: collections.abc.Sequence[modal.mount._Mount] = (),
|
166
|
+
network_file_systems: dict[
|
167
|
+
typing.Union[str, pathlib.PurePosixPath], modal.network_file_system._NetworkFileSystem
|
168
|
+
] = {},
|
169
|
+
volumes: dict[
|
170
|
+
typing.Union[str, pathlib.PurePosixPath],
|
171
|
+
typing.Union[modal.volume._Volume, modal.cloud_bucket_mount._CloudBucketMount],
|
172
|
+
] = {},
|
173
|
+
allow_cross_region_volumes: bool = False,
|
174
|
+
cpu: typing.Union[float, tuple[float, float], None] = None,
|
175
|
+
memory: typing.Union[int, tuple[int, int], None] = None,
|
176
|
+
ephemeral_disk: typing.Optional[int] = None,
|
177
|
+
proxy: typing.Optional[modal.proxy._Proxy] = None,
|
178
|
+
retries: typing.Union[int, modal.retries.Retries, None] = None,
|
179
|
+
concurrency_limit: typing.Optional[int] = None,
|
180
|
+
allow_concurrent_inputs: typing.Optional[int] = None,
|
181
|
+
container_idle_timeout: typing.Optional[int] = None,
|
182
|
+
timeout: typing.Optional[int] = None,
|
183
|
+
keep_warm: typing.Optional[int] = None,
|
184
|
+
name: typing.Optional[str] = None,
|
185
|
+
is_generator: typing.Optional[bool] = None,
|
186
|
+
cloud: typing.Optional[str] = None,
|
187
|
+
region: typing.Union[str, collections.abc.Sequence[str], None] = None,
|
188
|
+
enable_memory_snapshot: bool = False,
|
189
|
+
block_network: bool = False,
|
190
|
+
max_inputs: typing.Optional[int] = None,
|
191
|
+
i6pn: typing.Optional[bool] = None,
|
192
|
+
_experimental_scheduler_placement: typing.Optional[modal.scheduler_placement.SchedulerPlacement] = None,
|
193
|
+
_experimental_buffer_containers: typing.Optional[int] = None,
|
194
|
+
_experimental_proxy_ip: typing.Optional[str] = None,
|
195
|
+
_experimental_custom_scaling_factor: typing.Optional[float] = None,
|
196
|
+
) -> _FunctionDecoratorType: ...
|
197
|
+
@typing_extensions.dataclass_transform(
|
198
|
+
field_specifiers=(modal.cls.parameter,),
|
199
|
+
kw_only_default=True,
|
200
|
+
)
|
201
|
+
def cls(
|
202
|
+
self,
|
203
|
+
_warn_parentheses_missing: typing.Optional[bool] = None,
|
204
|
+
*,
|
205
|
+
image: typing.Optional[modal.image._Image] = None,
|
206
|
+
secrets: collections.abc.Sequence[modal.secret._Secret] = (),
|
207
|
+
gpu: typing.Union[
|
208
|
+
None, bool, str, modal.gpu._GPUConfig, list[typing.Union[None, bool, str, modal.gpu._GPUConfig]]
|
209
|
+
] = None,
|
210
|
+
serialized: bool = False,
|
211
|
+
mounts: collections.abc.Sequence[modal.mount._Mount] = (),
|
212
|
+
network_file_systems: dict[
|
213
|
+
typing.Union[str, pathlib.PurePosixPath], modal.network_file_system._NetworkFileSystem
|
214
|
+
] = {},
|
215
|
+
volumes: dict[
|
216
|
+
typing.Union[str, pathlib.PurePosixPath],
|
217
|
+
typing.Union[modal.volume._Volume, modal.cloud_bucket_mount._CloudBucketMount],
|
218
|
+
] = {},
|
219
|
+
allow_cross_region_volumes: bool = False,
|
220
|
+
cpu: typing.Union[float, tuple[float, float], None] = None,
|
221
|
+
memory: typing.Union[int, tuple[int, int], None] = None,
|
222
|
+
ephemeral_disk: typing.Optional[int] = None,
|
223
|
+
proxy: typing.Optional[modal.proxy._Proxy] = None,
|
224
|
+
retries: typing.Union[int, modal.retries.Retries, None] = None,
|
225
|
+
concurrency_limit: typing.Optional[int] = None,
|
226
|
+
allow_concurrent_inputs: typing.Optional[int] = None,
|
227
|
+
container_idle_timeout: typing.Optional[int] = None,
|
228
|
+
timeout: typing.Optional[int] = None,
|
229
|
+
keep_warm: typing.Optional[int] = None,
|
230
|
+
cloud: typing.Optional[str] = None,
|
231
|
+
region: typing.Union[str, collections.abc.Sequence[str], None] = None,
|
232
|
+
enable_memory_snapshot: bool = False,
|
233
|
+
block_network: bool = False,
|
234
|
+
max_inputs: typing.Optional[int] = None,
|
235
|
+
_experimental_scheduler_placement: typing.Optional[modal.scheduler_placement.SchedulerPlacement] = None,
|
236
|
+
_experimental_buffer_containers: typing.Optional[int] = None,
|
237
|
+
_experimental_proxy_ip: typing.Optional[str] = None,
|
238
|
+
_experimental_custom_scaling_factor: typing.Optional[float] = None,
|
239
|
+
) -> typing.Callable[[CLS_T], CLS_T]: ...
|
240
|
+
async def spawn_sandbox(
|
241
|
+
self,
|
242
|
+
*entrypoint_args: str,
|
243
|
+
image: typing.Optional[modal.image._Image] = None,
|
244
|
+
mounts: collections.abc.Sequence[modal.mount._Mount] = (),
|
245
|
+
secrets: collections.abc.Sequence[modal.secret._Secret] = (),
|
246
|
+
network_file_systems: dict[
|
247
|
+
typing.Union[str, pathlib.PurePosixPath], modal.network_file_system._NetworkFileSystem
|
248
|
+
] = {},
|
249
|
+
timeout: typing.Optional[int] = None,
|
250
|
+
workdir: typing.Optional[str] = None,
|
251
|
+
gpu: typing.Union[None, bool, str, modal.gpu._GPUConfig] = None,
|
252
|
+
cloud: typing.Optional[str] = None,
|
253
|
+
region: typing.Union[str, collections.abc.Sequence[str], None] = None,
|
254
|
+
cpu: typing.Union[float, tuple[float, float], None] = None,
|
255
|
+
memory: typing.Union[int, tuple[int, int], None] = None,
|
256
|
+
block_network: bool = False,
|
257
|
+
volumes: dict[
|
258
|
+
typing.Union[str, pathlib.PurePosixPath],
|
259
|
+
typing.Union[modal.volume._Volume, modal.cloud_bucket_mount._CloudBucketMount],
|
260
|
+
] = {},
|
261
|
+
pty_info: typing.Optional[modal_proto.api_pb2.PTYInfo] = None,
|
262
|
+
_experimental_scheduler_placement: typing.Optional[modal.scheduler_placement.SchedulerPlacement] = None,
|
263
|
+
) -> None: ...
|
264
|
+
def include(self, /, other_app: _App): ...
|
265
|
+
def _logs(
|
266
|
+
self, client: typing.Optional[modal.client._Client] = None
|
267
|
+
) -> collections.abc.AsyncGenerator[str, None]: ...
|
268
|
+
@classmethod
|
269
|
+
def _get_container_app(cls) -> typing.Optional[_App]: ...
|
270
|
+
@classmethod
|
271
|
+
def _reset_container_app(cls): ...
|
199
272
|
|
200
273
|
class App:
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
274
|
+
_all_apps: typing.ClassVar[dict[typing.Optional[str], list[App]]]
|
275
|
+
_container_app: typing.ClassVar[typing.Optional[App]]
|
276
|
+
_name: typing.Optional[str]
|
277
|
+
_description: typing.Optional[str]
|
278
|
+
_functions: dict[str, modal.functions.Function]
|
279
|
+
_classes: dict[str, modal.cls.Cls]
|
280
|
+
_image: typing.Optional[modal.image.Image]
|
281
|
+
_mounts: collections.abc.Sequence[modal.mount.Mount]
|
282
|
+
_secrets: collections.abc.Sequence[modal.secret.Secret]
|
283
|
+
_volumes: dict[typing.Union[str, pathlib.PurePosixPath], modal.volume.Volume]
|
284
|
+
_web_endpoints: list[str]
|
285
|
+
_local_entrypoints: dict[str, LocalEntrypoint]
|
286
|
+
_app_id: typing.Optional[str]
|
287
|
+
_running_app: typing.Optional[modal.running_app.RunningApp]
|
288
|
+
_client: typing.Optional[modal.client.Client]
|
289
|
+
|
290
|
+
def __init__(
|
291
|
+
self,
|
292
|
+
name: typing.Optional[str] = None,
|
293
|
+
*,
|
294
|
+
image: typing.Optional[modal.image.Image] = None,
|
295
|
+
mounts: collections.abc.Sequence[modal.mount.Mount] = [],
|
296
|
+
secrets: collections.abc.Sequence[modal.secret.Secret] = [],
|
297
|
+
volumes: dict[typing.Union[str, pathlib.PurePosixPath], modal.volume.Volume] = {},
|
298
|
+
) -> None: ...
|
217
299
|
@property
|
218
|
-
def name(self) -> typing.
|
219
|
-
...
|
220
|
-
|
300
|
+
def name(self) -> typing.Optional[str]: ...
|
221
301
|
@property
|
222
|
-
def is_interactive(self) -> bool:
|
223
|
-
...
|
224
|
-
|
302
|
+
def is_interactive(self) -> bool: ...
|
225
303
|
@property
|
226
|
-
def app_id(self) -> typing.
|
227
|
-
...
|
228
|
-
|
304
|
+
def app_id(self) -> typing.Optional[str]: ...
|
229
305
|
@property
|
230
|
-
def description(self) -> typing.
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
...
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
def
|
252
|
-
|
253
|
-
|
306
|
+
def description(self) -> typing.Optional[str]: ...
|
307
|
+
|
308
|
+
class __lookup_spec(typing_extensions.Protocol):
|
309
|
+
def __call__(
|
310
|
+
self,
|
311
|
+
name: str,
|
312
|
+
client: typing.Optional[modal.client.Client] = None,
|
313
|
+
environment_name: typing.Optional[str] = None,
|
314
|
+
create_if_missing: bool = False,
|
315
|
+
) -> App: ...
|
316
|
+
async def aio(
|
317
|
+
self,
|
318
|
+
name: str,
|
319
|
+
client: typing.Optional[modal.client.Client] = None,
|
320
|
+
environment_name: typing.Optional[str] = None,
|
321
|
+
create_if_missing: bool = False,
|
322
|
+
) -> App: ...
|
323
|
+
|
324
|
+
lookup: __lookup_spec
|
325
|
+
|
326
|
+
def set_description(self, description: str): ...
|
327
|
+
def _validate_blueprint_value(self, key: str, value: typing.Any): ...
|
328
|
+
def __getitem__(self, tag: str): ...
|
329
|
+
def __setitem__(self, tag: str, obj: modal.object.Object): ...
|
330
|
+
def __getattr__(self, tag: str): ...
|
331
|
+
def __setattr__(self, tag: str, obj: modal.object.Object): ...
|
254
332
|
@property
|
255
|
-
def image(self) -> modal.image.Image:
|
256
|
-
...
|
257
|
-
|
333
|
+
def image(self) -> modal.image.Image: ...
|
258
334
|
@image.setter
|
259
|
-
def image(self, value):
|
260
|
-
|
261
|
-
|
262
|
-
def _uncreate_all_objects(self):
|
263
|
-
...
|
264
|
-
|
265
|
-
def is_inside(self, image: typing.Union[modal.image.Image, None] = None):
|
266
|
-
...
|
335
|
+
def image(self, value): ...
|
336
|
+
def _uncreate_all_objects(self): ...
|
267
337
|
|
268
338
|
class ___set_local_app_spec(typing_extensions.Protocol):
|
269
|
-
def __call__(
|
270
|
-
|
271
|
-
|
272
|
-
def aio(
|
273
|
-
|
339
|
+
def __call__(
|
340
|
+
self, client: modal.client.Client, running_app: modal.running_app.RunningApp
|
341
|
+
) -> synchronicity.combined_types.AsyncAndBlockingContextManager[None]: ...
|
342
|
+
def aio(
|
343
|
+
self, client: modal.client.Client, running_app: modal.running_app.RunningApp
|
344
|
+
) -> typing.AsyncContextManager[None]: ...
|
274
345
|
|
275
346
|
_set_local_app: ___set_local_app_spec
|
276
347
|
|
277
348
|
class __run_spec(typing_extensions.Protocol):
|
278
|
-
def __call__(
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
349
|
+
def __call__(
|
350
|
+
self,
|
351
|
+
client: typing.Optional[modal.client.Client] = None,
|
352
|
+
show_progress: typing.Optional[bool] = None,
|
353
|
+
detach: bool = False,
|
354
|
+
interactive: bool = False,
|
355
|
+
) -> synchronicity.combined_types.AsyncAndBlockingContextManager[App]: ...
|
356
|
+
def aio(
|
357
|
+
self,
|
358
|
+
client: typing.Optional[modal.client.Client] = None,
|
359
|
+
show_progress: typing.Optional[bool] = None,
|
360
|
+
detach: bool = False,
|
361
|
+
interactive: bool = False,
|
362
|
+
) -> typing.AsyncContextManager[App]: ...
|
283
363
|
|
284
364
|
run: __run_spec
|
285
365
|
|
286
|
-
def _get_default_image(self):
|
287
|
-
|
288
|
-
|
289
|
-
def
|
290
|
-
|
291
|
-
|
292
|
-
def _add_function(self, function: modal.functions.Function):
|
293
|
-
...
|
294
|
-
|
295
|
-
def _init_container(self, client: modal.client.Client, running_app: modal.running_app.RunningApp):
|
296
|
-
...
|
297
|
-
|
366
|
+
def _get_default_image(self): ...
|
367
|
+
def _get_watch_mounts(self): ...
|
368
|
+
def _add_function(self, function: modal.functions.Function, is_web_endpoint: bool): ...
|
369
|
+
def _add_class(self, tag: str, cls: modal.cls.Cls): ...
|
370
|
+
def _init_container(self, client: modal.client.Client, running_app: modal.running_app.RunningApp): ...
|
298
371
|
@property
|
299
|
-
def registered_functions(self) ->
|
300
|
-
...
|
301
|
-
|
372
|
+
def registered_functions(self) -> dict[str, modal.functions.Function]: ...
|
302
373
|
@property
|
303
|
-
def registered_classes(self) ->
|
304
|
-
...
|
305
|
-
|
374
|
+
def registered_classes(self) -> dict[str, modal.functions.Function]: ...
|
306
375
|
@property
|
307
|
-
def registered_entrypoints(self) ->
|
308
|
-
...
|
309
|
-
|
376
|
+
def registered_entrypoints(self) -> dict[str, LocalEntrypoint]: ...
|
310
377
|
@property
|
311
|
-
def indexed_objects(self) ->
|
312
|
-
...
|
313
|
-
|
378
|
+
def indexed_objects(self) -> dict[str, modal.object.Object]: ...
|
314
379
|
@property
|
315
|
-
def registered_web_endpoints(self) ->
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
380
|
+
def registered_web_endpoints(self) -> list[str]: ...
|
381
|
+
def local_entrypoint(
|
382
|
+
self, _warn_parentheses_missing: typing.Any = None, *, name: typing.Optional[str] = None
|
383
|
+
) -> typing.Callable[[typing.Callable[..., typing.Any]], LocalEntrypoint]: ...
|
384
|
+
def function(
|
385
|
+
self,
|
386
|
+
_warn_parentheses_missing: typing.Any = None,
|
387
|
+
*,
|
388
|
+
image: typing.Optional[modal.image.Image] = None,
|
389
|
+
schedule: typing.Optional[modal.schedule.Schedule] = None,
|
390
|
+
secrets: collections.abc.Sequence[modal.secret.Secret] = (),
|
391
|
+
gpu: typing.Union[
|
392
|
+
None, bool, str, modal.gpu._GPUConfig, list[typing.Union[None, bool, str, modal.gpu._GPUConfig]]
|
393
|
+
] = None,
|
394
|
+
serialized: bool = False,
|
395
|
+
mounts: collections.abc.Sequence[modal.mount.Mount] = (),
|
396
|
+
network_file_systems: dict[
|
397
|
+
typing.Union[str, pathlib.PurePosixPath], modal.network_file_system.NetworkFileSystem
|
398
|
+
] = {},
|
399
|
+
volumes: dict[
|
400
|
+
typing.Union[str, pathlib.PurePosixPath],
|
401
|
+
typing.Union[modal.volume.Volume, modal.cloud_bucket_mount.CloudBucketMount],
|
402
|
+
] = {},
|
403
|
+
allow_cross_region_volumes: bool = False,
|
404
|
+
cpu: typing.Union[float, tuple[float, float], None] = None,
|
405
|
+
memory: typing.Union[int, tuple[int, int], None] = None,
|
406
|
+
ephemeral_disk: typing.Optional[int] = None,
|
407
|
+
proxy: typing.Optional[modal.proxy.Proxy] = None,
|
408
|
+
retries: typing.Union[int, modal.retries.Retries, None] = None,
|
409
|
+
concurrency_limit: typing.Optional[int] = None,
|
410
|
+
allow_concurrent_inputs: typing.Optional[int] = None,
|
411
|
+
container_idle_timeout: typing.Optional[int] = None,
|
412
|
+
timeout: typing.Optional[int] = None,
|
413
|
+
keep_warm: typing.Optional[int] = None,
|
414
|
+
name: typing.Optional[str] = None,
|
415
|
+
is_generator: typing.Optional[bool] = None,
|
416
|
+
cloud: typing.Optional[str] = None,
|
417
|
+
region: typing.Union[str, collections.abc.Sequence[str], None] = None,
|
418
|
+
enable_memory_snapshot: bool = False,
|
419
|
+
block_network: bool = False,
|
420
|
+
max_inputs: typing.Optional[int] = None,
|
421
|
+
i6pn: typing.Optional[bool] = None,
|
422
|
+
_experimental_scheduler_placement: typing.Optional[modal.scheduler_placement.SchedulerPlacement] = None,
|
423
|
+
_experimental_buffer_containers: typing.Optional[int] = None,
|
424
|
+
_experimental_proxy_ip: typing.Optional[str] = None,
|
425
|
+
_experimental_custom_scaling_factor: typing.Optional[float] = None,
|
426
|
+
) -> _FunctionDecoratorType: ...
|
427
|
+
@typing_extensions.dataclass_transform(
|
428
|
+
field_specifiers=(modal.cls.parameter,),
|
429
|
+
kw_only_default=True,
|
430
|
+
)
|
431
|
+
def cls(
|
432
|
+
self,
|
433
|
+
_warn_parentheses_missing: typing.Optional[bool] = None,
|
434
|
+
*,
|
435
|
+
image: typing.Optional[modal.image.Image] = None,
|
436
|
+
secrets: collections.abc.Sequence[modal.secret.Secret] = (),
|
437
|
+
gpu: typing.Union[
|
438
|
+
None, bool, str, modal.gpu._GPUConfig, list[typing.Union[None, bool, str, modal.gpu._GPUConfig]]
|
439
|
+
] = None,
|
440
|
+
serialized: bool = False,
|
441
|
+
mounts: collections.abc.Sequence[modal.mount.Mount] = (),
|
442
|
+
network_file_systems: dict[
|
443
|
+
typing.Union[str, pathlib.PurePosixPath], modal.network_file_system.NetworkFileSystem
|
444
|
+
] = {},
|
445
|
+
volumes: dict[
|
446
|
+
typing.Union[str, pathlib.PurePosixPath],
|
447
|
+
typing.Union[modal.volume.Volume, modal.cloud_bucket_mount.CloudBucketMount],
|
448
|
+
] = {},
|
449
|
+
allow_cross_region_volumes: bool = False,
|
450
|
+
cpu: typing.Union[float, tuple[float, float], None] = None,
|
451
|
+
memory: typing.Union[int, tuple[int, int], None] = None,
|
452
|
+
ephemeral_disk: typing.Optional[int] = None,
|
453
|
+
proxy: typing.Optional[modal.proxy.Proxy] = None,
|
454
|
+
retries: typing.Union[int, modal.retries.Retries, None] = None,
|
455
|
+
concurrency_limit: typing.Optional[int] = None,
|
456
|
+
allow_concurrent_inputs: typing.Optional[int] = None,
|
457
|
+
container_idle_timeout: typing.Optional[int] = None,
|
458
|
+
timeout: typing.Optional[int] = None,
|
459
|
+
keep_warm: typing.Optional[int] = None,
|
460
|
+
cloud: typing.Optional[str] = None,
|
461
|
+
region: typing.Union[str, collections.abc.Sequence[str], None] = None,
|
462
|
+
enable_memory_snapshot: bool = False,
|
463
|
+
block_network: bool = False,
|
464
|
+
max_inputs: typing.Optional[int] = None,
|
465
|
+
_experimental_scheduler_placement: typing.Optional[modal.scheduler_placement.SchedulerPlacement] = None,
|
466
|
+
_experimental_buffer_containers: typing.Optional[int] = None,
|
467
|
+
_experimental_proxy_ip: typing.Optional[str] = None,
|
468
|
+
_experimental_custom_scaling_factor: typing.Optional[float] = None,
|
469
|
+
) -> typing.Callable[[CLS_T], CLS_T]: ...
|
326
470
|
|
327
471
|
class __spawn_sandbox_spec(typing_extensions.Protocol):
|
328
|
-
def __call__(
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
472
|
+
def __call__(
|
473
|
+
self,
|
474
|
+
*entrypoint_args: str,
|
475
|
+
image: typing.Optional[modal.image.Image] = None,
|
476
|
+
mounts: collections.abc.Sequence[modal.mount.Mount] = (),
|
477
|
+
secrets: collections.abc.Sequence[modal.secret.Secret] = (),
|
478
|
+
network_file_systems: dict[
|
479
|
+
typing.Union[str, pathlib.PurePosixPath], modal.network_file_system.NetworkFileSystem
|
480
|
+
] = {},
|
481
|
+
timeout: typing.Optional[int] = None,
|
482
|
+
workdir: typing.Optional[str] = None,
|
483
|
+
gpu: typing.Union[None, bool, str, modal.gpu._GPUConfig] = None,
|
484
|
+
cloud: typing.Optional[str] = None,
|
485
|
+
region: typing.Union[str, collections.abc.Sequence[str], None] = None,
|
486
|
+
cpu: typing.Union[float, tuple[float, float], None] = None,
|
487
|
+
memory: typing.Union[int, tuple[int, int], None] = None,
|
488
|
+
block_network: bool = False,
|
489
|
+
volumes: dict[
|
490
|
+
typing.Union[str, pathlib.PurePosixPath],
|
491
|
+
typing.Union[modal.volume.Volume, modal.cloud_bucket_mount.CloudBucketMount],
|
492
|
+
] = {},
|
493
|
+
pty_info: typing.Optional[modal_proto.api_pb2.PTYInfo] = None,
|
494
|
+
_experimental_scheduler_placement: typing.Optional[modal.scheduler_placement.SchedulerPlacement] = None,
|
495
|
+
) -> None: ...
|
496
|
+
async def aio(
|
497
|
+
self,
|
498
|
+
*entrypoint_args: str,
|
499
|
+
image: typing.Optional[modal.image.Image] = None,
|
500
|
+
mounts: collections.abc.Sequence[modal.mount.Mount] = (),
|
501
|
+
secrets: collections.abc.Sequence[modal.secret.Secret] = (),
|
502
|
+
network_file_systems: dict[
|
503
|
+
typing.Union[str, pathlib.PurePosixPath], modal.network_file_system.NetworkFileSystem
|
504
|
+
] = {},
|
505
|
+
timeout: typing.Optional[int] = None,
|
506
|
+
workdir: typing.Optional[str] = None,
|
507
|
+
gpu: typing.Union[None, bool, str, modal.gpu._GPUConfig] = None,
|
508
|
+
cloud: typing.Optional[str] = None,
|
509
|
+
region: typing.Union[str, collections.abc.Sequence[str], None] = None,
|
510
|
+
cpu: typing.Union[float, tuple[float, float], None] = None,
|
511
|
+
memory: typing.Union[int, tuple[int, int], None] = None,
|
512
|
+
block_network: bool = False,
|
513
|
+
volumes: dict[
|
514
|
+
typing.Union[str, pathlib.PurePosixPath],
|
515
|
+
typing.Union[modal.volume.Volume, modal.cloud_bucket_mount.CloudBucketMount],
|
516
|
+
] = {},
|
517
|
+
pty_info: typing.Optional[modal_proto.api_pb2.PTYInfo] = None,
|
518
|
+
_experimental_scheduler_placement: typing.Optional[modal.scheduler_placement.SchedulerPlacement] = None,
|
519
|
+
) -> None: ...
|
333
520
|
|
334
521
|
spawn_sandbox: __spawn_sandbox_spec
|
335
522
|
|
336
|
-
def include(self, other_app: App):
|
337
|
-
|
523
|
+
def include(self, /, other_app: App): ...
|
524
|
+
|
525
|
+
class ___logs_spec(typing_extensions.Protocol):
|
526
|
+
def __call__(
|
527
|
+
self, client: typing.Optional[modal.client.Client] = None
|
528
|
+
) -> typing.Generator[str, None, None]: ...
|
529
|
+
def aio(
|
530
|
+
self, client: typing.Optional[modal.client.Client] = None
|
531
|
+
) -> collections.abc.AsyncGenerator[str, None]: ...
|
338
532
|
|
533
|
+
_logs: ___logs_spec
|
534
|
+
|
535
|
+
@classmethod
|
536
|
+
def _get_container_app(cls) -> typing.Optional[App]: ...
|
537
|
+
@classmethod
|
538
|
+
def _reset_container_app(cls): ...
|
339
539
|
|
340
540
|
class _Stub(_App):
|
341
541
|
@staticmethod
|
342
|
-
def __new__(
|
343
|
-
|
344
|
-
|
542
|
+
def __new__(
|
543
|
+
cls,
|
544
|
+
name: typing.Optional[str] = None,
|
545
|
+
*,
|
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
|
+
volumes: dict[typing.Union[str, pathlib.PurePosixPath], modal.volume._Volume] = {},
|
550
|
+
): ...
|
345
551
|
|
346
552
|
class Stub(App):
|
347
|
-
def __init__(
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
553
|
+
def __init__(
|
554
|
+
self,
|
555
|
+
name: typing.Optional[str] = None,
|
556
|
+
*,
|
557
|
+
image: typing.Optional[modal.image.Image] = None,
|
558
|
+
mounts: collections.abc.Sequence[modal.mount.Mount] = [],
|
559
|
+
secrets: collections.abc.Sequence[modal.secret.Secret] = [],
|
560
|
+
volumes: dict[typing.Union[str, pathlib.PurePosixPath], modal.volume.Volume] = {},
|
561
|
+
) -> None: ...
|
562
|
+
|
563
|
+
_default_image: modal.image._Image
|