modal 1.1.5.dev24__tar.gz → 1.1.5.dev26__tar.gz
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-1.1.5.dev24 → modal-1.1.5.dev26}/PKG-INFO +1 -1
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/client.pyi +2 -2
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/functions.pyi +6 -6
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/image.py +62 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/image.pyi +163 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal.egg-info/PKG-INFO +1 -1
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal_proto/api.proto +22 -1
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal_proto/api_pb2.py +902 -869
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal_proto/api_pb2.pyi +78 -1
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal_version/__init__.py +1 -1
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/LICENSE +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/README.md +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/__init__.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/__main__.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/_clustered_functions.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/_clustered_functions.pyi +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/_container_entrypoint.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/_functions.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/_ipython.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/_location.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/_object.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/_output.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/_partial_function.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/_pty.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/_resolver.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/_resources.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/_runtime/__init__.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/_runtime/asgi.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/_runtime/container_io_manager.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/_runtime/container_io_manager.pyi +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/_runtime/execution_context.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/_runtime/execution_context.pyi +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/_runtime/gpu_memory_snapshot.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/_runtime/telemetry.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/_runtime/user_code_imports.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/_serialization.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/_traceback.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/_tunnel.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/_tunnel.pyi +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/_type_manager.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/_utils/__init__.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/_utils/app_utils.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/_utils/async_utils.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/_utils/auth_token_manager.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/_utils/blob_utils.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/_utils/bytes_io_segment_payload.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/_utils/deprecation.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/_utils/docker_utils.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/_utils/function_utils.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/_utils/git_utils.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/_utils/grpc_testing.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/_utils/grpc_utils.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/_utils/hash_utils.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/_utils/http_utils.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/_utils/jwt_utils.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/_utils/logger.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/_utils/mount_utils.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/_utils/name_utils.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/_utils/package_utils.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/_utils/pattern_utils.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/_utils/rand_pb_testing.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/_utils/shell_utils.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/_utils/time_utils.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/_vendor/__init__.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/_vendor/a2wsgi_wsgi.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/_vendor/cloudpickle.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/_vendor/tblib.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/_watcher.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/app.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/app.pyi +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/builder/2023.12.312.txt +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/builder/2023.12.txt +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/builder/2024.04.txt +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/builder/2024.10.txt +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/builder/2025.06.txt +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/builder/PREVIEW.txt +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/builder/README.md +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/builder/base-images.json +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/call_graph.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/cli/__init__.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/cli/_download.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/cli/_traceback.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/cli/app.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/cli/cluster.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/cli/config.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/cli/container.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/cli/dict.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/cli/entry_point.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/cli/environment.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/cli/import_refs.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/cli/launch.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/cli/network_file_system.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/cli/profile.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/cli/programs/__init__.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/cli/programs/launch_instance_ssh.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/cli/programs/run_jupyter.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/cli/programs/run_marimo.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/cli/programs/vscode.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/cli/queues.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/cli/run.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/cli/secret.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/cli/token.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/cli/utils.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/cli/volume.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/client.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/cloud_bucket_mount.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/cloud_bucket_mount.pyi +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/cls.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/cls.pyi +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/config.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/container_process.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/container_process.pyi +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/dict.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/dict.pyi +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/environments.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/environments.pyi +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/exception.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/experimental/__init__.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/experimental/flash.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/experimental/flash.pyi +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/experimental/ipython.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/file_io.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/file_io.pyi +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/file_pattern_matcher.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/functions.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/gpu.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/io_streams.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/io_streams.pyi +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/mount.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/mount.pyi +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/network_file_system.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/network_file_system.pyi +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/object.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/object.pyi +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/output.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/parallel_map.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/parallel_map.pyi +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/partial_function.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/partial_function.pyi +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/proxy.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/proxy.pyi +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/py.typed +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/queue.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/queue.pyi +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/retries.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/runner.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/runner.pyi +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/running_app.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/sandbox.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/sandbox.pyi +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/schedule.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/scheduler_placement.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/secret.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/secret.pyi +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/serving.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/serving.pyi +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/snapshot.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/snapshot.pyi +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/stream_type.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/token_flow.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/token_flow.pyi +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/volume.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal/volume.pyi +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal.egg-info/SOURCES.txt +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal.egg-info/dependency_links.txt +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal.egg-info/entry_points.txt +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal.egg-info/requires.txt +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal.egg-info/top_level.txt +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal_docs/__init__.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal_docs/gen_cli_docs.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal_docs/gen_reference_docs.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal_docs/mdmd/__init__.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal_docs/mdmd/mdmd.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal_docs/mdmd/signatures.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal_proto/__init__.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal_proto/api_grpc.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal_proto/api_pb2_grpc.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal_proto/api_pb2_grpc.pyi +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal_proto/modal_api_grpc.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal_proto/modal_options_grpc.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal_proto/options.proto +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal_proto/options_grpc.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal_proto/options_pb2.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal_proto/options_pb2.pyi +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal_proto/options_pb2_grpc.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal_proto/options_pb2_grpc.pyi +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal_proto/py.typed +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/modal_version/__main__.py +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/pyproject.toml +0 -0
- {modal-1.1.5.dev24 → modal-1.1.5.dev26}/setup.cfg +0 -0
|
@@ -33,7 +33,7 @@ class _Client:
|
|
|
33
33
|
server_url: str,
|
|
34
34
|
client_type: int,
|
|
35
35
|
credentials: typing.Optional[tuple[str, str]],
|
|
36
|
-
version: str = "1.1.5.
|
|
36
|
+
version: str = "1.1.5.dev26",
|
|
37
37
|
):
|
|
38
38
|
"""mdmd:hidden
|
|
39
39
|
The Modal client object is not intended to be instantiated directly by users.
|
|
@@ -164,7 +164,7 @@ class Client:
|
|
|
164
164
|
server_url: str,
|
|
165
165
|
client_type: int,
|
|
166
166
|
credentials: typing.Optional[tuple[str, str]],
|
|
167
|
-
version: str = "1.1.5.
|
|
167
|
+
version: str = "1.1.5.dev26",
|
|
168
168
|
):
|
|
169
169
|
"""mdmd:hidden
|
|
170
170
|
The Modal client object is not intended to be instantiated directly by users.
|
|
@@ -449,7 +449,7 @@ class Function(
|
|
|
449
449
|
|
|
450
450
|
_call_generator: ___call_generator_spec[typing_extensions.Self]
|
|
451
451
|
|
|
452
|
-
class __remote_spec(typing_extensions.Protocol[
|
|
452
|
+
class __remote_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
|
|
453
453
|
def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER:
|
|
454
454
|
"""Calls the function remotely, executing it with the given arguments and returning the execution's result."""
|
|
455
455
|
...
|
|
@@ -458,7 +458,7 @@ class Function(
|
|
|
458
458
|
"""Calls the function remotely, executing it with the given arguments and returning the execution's result."""
|
|
459
459
|
...
|
|
460
460
|
|
|
461
|
-
remote: __remote_spec[modal._functions.
|
|
461
|
+
remote: __remote_spec[modal._functions.P, modal._functions.ReturnType, typing_extensions.Self]
|
|
462
462
|
|
|
463
463
|
class __remote_gen_spec(typing_extensions.Protocol[SUPERSELF]):
|
|
464
464
|
def __call__(self, /, *args, **kwargs) -> typing.Generator[typing.Any, None, None]:
|
|
@@ -485,7 +485,7 @@ class Function(
|
|
|
485
485
|
"""
|
|
486
486
|
...
|
|
487
487
|
|
|
488
|
-
class ___experimental_spawn_spec(typing_extensions.Protocol[
|
|
488
|
+
class ___experimental_spawn_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
|
|
489
489
|
def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]:
|
|
490
490
|
"""[Experimental] Calls the function with the given arguments, without waiting for the results.
|
|
491
491
|
|
|
@@ -509,7 +509,7 @@ class Function(
|
|
|
509
509
|
...
|
|
510
510
|
|
|
511
511
|
_experimental_spawn: ___experimental_spawn_spec[
|
|
512
|
-
modal._functions.
|
|
512
|
+
modal._functions.P, modal._functions.ReturnType, typing_extensions.Self
|
|
513
513
|
]
|
|
514
514
|
|
|
515
515
|
class ___spawn_map_inner_spec(typing_extensions.Protocol[P_INNER, SUPERSELF]):
|
|
@@ -518,7 +518,7 @@ class Function(
|
|
|
518
518
|
|
|
519
519
|
_spawn_map_inner: ___spawn_map_inner_spec[modal._functions.P, typing_extensions.Self]
|
|
520
520
|
|
|
521
|
-
class __spawn_spec(typing_extensions.Protocol[
|
|
521
|
+
class __spawn_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
|
|
522
522
|
def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]:
|
|
523
523
|
"""Calls the function with the given arguments, without waiting for the results.
|
|
524
524
|
|
|
@@ -539,7 +539,7 @@ class Function(
|
|
|
539
539
|
"""
|
|
540
540
|
...
|
|
541
541
|
|
|
542
|
-
spawn: __spawn_spec[modal._functions.
|
|
542
|
+
spawn: __spawn_spec[modal._functions.P, modal._functions.ReturnType, typing_extensions.Self]
|
|
543
543
|
|
|
544
544
|
def get_raw_f(self) -> collections.abc.Callable[..., typing.Any]:
|
|
545
545
|
"""Return the inner Python object wrapped by this Modal Function."""
|
|
@@ -868,6 +868,68 @@ class _Image(_Object, type_prefix="im"):
|
|
|
868
868
|
|
|
869
869
|
return obj
|
|
870
870
|
|
|
871
|
+
async def build(self, app: "modal.app._App") -> "_Image":
|
|
872
|
+
"""Eagerly build an image.
|
|
873
|
+
|
|
874
|
+
If your image was previously built, then this method will not rebuild your image
|
|
875
|
+
and your cached image is returned.
|
|
876
|
+
|
|
877
|
+
**Examples**
|
|
878
|
+
|
|
879
|
+
```python
|
|
880
|
+
image = modal.Image.debian_slim().uv_pip_install("scipy", "numpy")
|
|
881
|
+
|
|
882
|
+
app = modal.App("build-image")
|
|
883
|
+
with modal.enable_output(), app.run():
|
|
884
|
+
image.build(app)
|
|
885
|
+
|
|
886
|
+
# Save the image id
|
|
887
|
+
my_image_id = image.object_id
|
|
888
|
+
|
|
889
|
+
# Reference the image with the id or uses it another context.
|
|
890
|
+
built_image = modal.Image.from_id(my_image_id)
|
|
891
|
+
```
|
|
892
|
+
|
|
893
|
+
Alternatively, you can pre-build a image and use it in a sandbox.
|
|
894
|
+
|
|
895
|
+
```python notest
|
|
896
|
+
app = modal.App.lookup("sandbox-example")
|
|
897
|
+
|
|
898
|
+
with modal.enable_output():
|
|
899
|
+
image = modal.Image.debian_slim().uv_pip_install("scipy")
|
|
900
|
+
image.build(app)
|
|
901
|
+
|
|
902
|
+
sb = modal.Sandbox.create("python", "-c", "import scipy; print(scipy)", app=app, image=image)
|
|
903
|
+
print(sb.stdout.read())
|
|
904
|
+
sb.terminate()
|
|
905
|
+
```
|
|
906
|
+
|
|
907
|
+
**Note**
|
|
908
|
+
|
|
909
|
+
For defining Modal functions, images are built automatically when deploying or running an App.
|
|
910
|
+
You do not need to built the image explicitly:
|
|
911
|
+
|
|
912
|
+
```python notest
|
|
913
|
+
app = modal.App()
|
|
914
|
+
image = modal.Image.debian_slim()
|
|
915
|
+
|
|
916
|
+
# No need to explicitly build the image for defining a function.
|
|
917
|
+
@app.function(image=image)
|
|
918
|
+
def f():
|
|
919
|
+
...
|
|
920
|
+
```
|
|
921
|
+
|
|
922
|
+
"""
|
|
923
|
+
if app.app_id is None:
|
|
924
|
+
raise InvalidError("App has not been initialized yet. Use the content manager `app.run()` or `App.lookup`")
|
|
925
|
+
|
|
926
|
+
app_id = app.app_id
|
|
927
|
+
app_client = app._client or await _Client.from_env()
|
|
928
|
+
|
|
929
|
+
resolver = Resolver(app_client, app_id=app_id)
|
|
930
|
+
await resolver.load(self)
|
|
931
|
+
return self
|
|
932
|
+
|
|
871
933
|
def pip_install(
|
|
872
934
|
self,
|
|
873
935
|
*packages: Union[str, list[str]], # A list of Python packages, eg. ["numpy", "matplotlib>=3.5.0"]
|
|
@@ -2,6 +2,7 @@ import collections.abc
|
|
|
2
2
|
import google.protobuf.message
|
|
3
3
|
import modal._functions
|
|
4
4
|
import modal._object
|
|
5
|
+
import modal.app
|
|
5
6
|
import modal.client
|
|
6
7
|
import modal.cloud_bucket_mount
|
|
7
8
|
import modal.functions
|
|
@@ -318,6 +319,59 @@ class _Image(modal._object._Object):
|
|
|
318
319
|
"""
|
|
319
320
|
...
|
|
320
321
|
|
|
322
|
+
async def build(self, app: modal.app._App) -> _Image:
|
|
323
|
+
"""Eagerly build an image.
|
|
324
|
+
|
|
325
|
+
If your image was previously built, then this method will not rebuild your image
|
|
326
|
+
and your cached image is returned.
|
|
327
|
+
|
|
328
|
+
**Examples**
|
|
329
|
+
|
|
330
|
+
```python
|
|
331
|
+
image = modal.Image.debian_slim().uv_pip_install("scipy", "numpy")
|
|
332
|
+
|
|
333
|
+
app = modal.App("build-image")
|
|
334
|
+
with modal.enable_output(), app.run():
|
|
335
|
+
image.build(app)
|
|
336
|
+
|
|
337
|
+
# Save the image id
|
|
338
|
+
my_image_id = image.object_id
|
|
339
|
+
|
|
340
|
+
# Reference the image with the id or uses it another context.
|
|
341
|
+
built_image = modal.Image.from_id(my_image_id)
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
Alternatively, you can pre-build a image and use it in a sandbox.
|
|
345
|
+
|
|
346
|
+
```python notest
|
|
347
|
+
app = modal.App.lookup("sandbox-example")
|
|
348
|
+
|
|
349
|
+
with modal.enable_output():
|
|
350
|
+
image = modal.Image.debian_slim().uv_pip_install("scipy")
|
|
351
|
+
image.build(app)
|
|
352
|
+
|
|
353
|
+
sb = modal.Sandbox.create("python", "-c", "import scipy; print(scipy)", app=app, image=image)
|
|
354
|
+
print(sb.stdout.read())
|
|
355
|
+
sb.terminate()
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
**Note**
|
|
359
|
+
|
|
360
|
+
For defining Modal functions, images are built automatically when deploying or running an App.
|
|
361
|
+
You do not need to built the image explicitly:
|
|
362
|
+
|
|
363
|
+
```python notest
|
|
364
|
+
app = modal.App()
|
|
365
|
+
image = modal.Image.debian_slim()
|
|
366
|
+
|
|
367
|
+
# No need to explicitly build the image for defining a function.
|
|
368
|
+
@app.function(image=image)
|
|
369
|
+
def f():
|
|
370
|
+
...
|
|
371
|
+
```
|
|
372
|
+
"""
|
|
373
|
+
...
|
|
374
|
+
|
|
321
375
|
def pip_install(
|
|
322
376
|
self,
|
|
323
377
|
*packages: typing.Union[str, list[str]],
|
|
@@ -1182,6 +1236,115 @@ class Image(modal.object.Object):
|
|
|
1182
1236
|
|
|
1183
1237
|
from_id: __from_id_spec
|
|
1184
1238
|
|
|
1239
|
+
class __build_spec(typing_extensions.Protocol[SUPERSELF]):
|
|
1240
|
+
def __call__(self, /, app: modal.app.App) -> Image:
|
|
1241
|
+
"""Eagerly build an image.
|
|
1242
|
+
|
|
1243
|
+
If your image was previously built, then this method will not rebuild your image
|
|
1244
|
+
and your cached image is returned.
|
|
1245
|
+
|
|
1246
|
+
**Examples**
|
|
1247
|
+
|
|
1248
|
+
```python
|
|
1249
|
+
image = modal.Image.debian_slim().uv_pip_install("scipy", "numpy")
|
|
1250
|
+
|
|
1251
|
+
app = modal.App("build-image")
|
|
1252
|
+
with modal.enable_output(), app.run():
|
|
1253
|
+
image.build(app)
|
|
1254
|
+
|
|
1255
|
+
# Save the image id
|
|
1256
|
+
my_image_id = image.object_id
|
|
1257
|
+
|
|
1258
|
+
# Reference the image with the id or uses it another context.
|
|
1259
|
+
built_image = modal.Image.from_id(my_image_id)
|
|
1260
|
+
```
|
|
1261
|
+
|
|
1262
|
+
Alternatively, you can pre-build a image and use it in a sandbox.
|
|
1263
|
+
|
|
1264
|
+
```python notest
|
|
1265
|
+
app = modal.App.lookup("sandbox-example")
|
|
1266
|
+
|
|
1267
|
+
with modal.enable_output():
|
|
1268
|
+
image = modal.Image.debian_slim().uv_pip_install("scipy")
|
|
1269
|
+
image.build(app)
|
|
1270
|
+
|
|
1271
|
+
sb = modal.Sandbox.create("python", "-c", "import scipy; print(scipy)", app=app, image=image)
|
|
1272
|
+
print(sb.stdout.read())
|
|
1273
|
+
sb.terminate()
|
|
1274
|
+
```
|
|
1275
|
+
|
|
1276
|
+
**Note**
|
|
1277
|
+
|
|
1278
|
+
For defining Modal functions, images are built automatically when deploying or running an App.
|
|
1279
|
+
You do not need to built the image explicitly:
|
|
1280
|
+
|
|
1281
|
+
```python notest
|
|
1282
|
+
app = modal.App()
|
|
1283
|
+
image = modal.Image.debian_slim()
|
|
1284
|
+
|
|
1285
|
+
# No need to explicitly build the image for defining a function.
|
|
1286
|
+
@app.function(image=image)
|
|
1287
|
+
def f():
|
|
1288
|
+
...
|
|
1289
|
+
```
|
|
1290
|
+
"""
|
|
1291
|
+
...
|
|
1292
|
+
|
|
1293
|
+
async def aio(self, /, app: modal.app.App) -> Image:
|
|
1294
|
+
"""Eagerly build an image.
|
|
1295
|
+
|
|
1296
|
+
If your image was previously built, then this method will not rebuild your image
|
|
1297
|
+
and your cached image is returned.
|
|
1298
|
+
|
|
1299
|
+
**Examples**
|
|
1300
|
+
|
|
1301
|
+
```python
|
|
1302
|
+
image = modal.Image.debian_slim().uv_pip_install("scipy", "numpy")
|
|
1303
|
+
|
|
1304
|
+
app = modal.App("build-image")
|
|
1305
|
+
with modal.enable_output(), app.run():
|
|
1306
|
+
image.build(app)
|
|
1307
|
+
|
|
1308
|
+
# Save the image id
|
|
1309
|
+
my_image_id = image.object_id
|
|
1310
|
+
|
|
1311
|
+
# Reference the image with the id or uses it another context.
|
|
1312
|
+
built_image = modal.Image.from_id(my_image_id)
|
|
1313
|
+
```
|
|
1314
|
+
|
|
1315
|
+
Alternatively, you can pre-build a image and use it in a sandbox.
|
|
1316
|
+
|
|
1317
|
+
```python notest
|
|
1318
|
+
app = modal.App.lookup("sandbox-example")
|
|
1319
|
+
|
|
1320
|
+
with modal.enable_output():
|
|
1321
|
+
image = modal.Image.debian_slim().uv_pip_install("scipy")
|
|
1322
|
+
image.build(app)
|
|
1323
|
+
|
|
1324
|
+
sb = modal.Sandbox.create("python", "-c", "import scipy; print(scipy)", app=app, image=image)
|
|
1325
|
+
print(sb.stdout.read())
|
|
1326
|
+
sb.terminate()
|
|
1327
|
+
```
|
|
1328
|
+
|
|
1329
|
+
**Note**
|
|
1330
|
+
|
|
1331
|
+
For defining Modal functions, images are built automatically when deploying or running an App.
|
|
1332
|
+
You do not need to built the image explicitly:
|
|
1333
|
+
|
|
1334
|
+
```python notest
|
|
1335
|
+
app = modal.App()
|
|
1336
|
+
image = modal.Image.debian_slim()
|
|
1337
|
+
|
|
1338
|
+
# No need to explicitly build the image for defining a function.
|
|
1339
|
+
@app.function(image=image)
|
|
1340
|
+
def f():
|
|
1341
|
+
...
|
|
1342
|
+
```
|
|
1343
|
+
"""
|
|
1344
|
+
...
|
|
1345
|
+
|
|
1346
|
+
build: __build_spec[typing_extensions.Self]
|
|
1347
|
+
|
|
1185
1348
|
def pip_install(
|
|
1186
1349
|
self,
|
|
1187
1350
|
*packages: typing.Union[str, list[str]],
|
|
@@ -628,11 +628,26 @@ message AuthTokenGetResponse {
|
|
|
628
628
|
string token = 1;
|
|
629
629
|
}
|
|
630
630
|
|
|
631
|
+
// Message representing the current (coalesced) state of the autoscaler configuration
|
|
632
|
+
// As well as the different sources that were used to create it.
|
|
633
|
+
message AutoscalerConfiguration {
|
|
634
|
+
// The settings that are currently in effect.
|
|
635
|
+
AutoscalerSettings settings = 1;
|
|
636
|
+
// For tracking the source of the overridden value; keys correspond to fields in `settings`.
|
|
637
|
+
map<string, UserActionInfo> override_events = 2;
|
|
638
|
+
// The default settings that are used when no static settings are provided and no overrides are in effect.
|
|
639
|
+
AutoscalerSettings default_settings = 3;
|
|
640
|
+
// The static settings that were used to initialize the configuration.
|
|
641
|
+
AutoscalerSettings static_settings = 4;
|
|
642
|
+
// The merge of all overrides that were used to create the current configuration.
|
|
643
|
+
AutoscalerSettings override_settings = 5;
|
|
644
|
+
}
|
|
645
|
+
|
|
631
646
|
message AutoscalerSettings {
|
|
632
647
|
// A collection of user-configurable settings for Function autoscaling
|
|
633
648
|
// These are used for static configuration and for dynamic autoscaler updates
|
|
634
649
|
|
|
635
|
-
// Minimum containers when scale-to-zero is not
|
|
650
|
+
// Minimum containers when scale-to-zero is not desired; pka "keep_warm" or "warm_pool_size"
|
|
636
651
|
optional uint32 min_containers = 1;
|
|
637
652
|
// Limit on the number of containers that can be running for each Function; pka "concurrency_limit"
|
|
638
653
|
optional uint32 max_containers = 2;
|
|
@@ -3217,6 +3232,12 @@ message UploadUrlList {
|
|
|
3217
3232
|
repeated string items = 1;
|
|
3218
3233
|
}
|
|
3219
3234
|
|
|
3235
|
+
// Used for capturing context about an action performed by a user
|
|
3236
|
+
message UserActionInfo {
|
|
3237
|
+
string user_id = 1;
|
|
3238
|
+
double timestamp = 2;
|
|
3239
|
+
}
|
|
3240
|
+
|
|
3220
3241
|
message VolumeCommitRequest {
|
|
3221
3242
|
// NOTE(staffan): Mounting a volume in multiple locations is not supported, so volume_id alone uniquely identifies
|
|
3222
3243
|
// a volume mount.
|