modal 1.1.4.dev17__tar.gz → 1.1.4.dev19__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.
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/PKG-INFO +1 -1
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/_functions.py +8 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/client.pyi +2 -2
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/cls.py +6 -1
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/cls.pyi +16 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/functions.pyi +11 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/parallel_map.py +15 -4
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/parallel_map.pyi +1 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal.egg-info/PKG-INFO +1 -1
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal_version/__init__.py +1 -1
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/LICENSE +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/README.md +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/__init__.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/__main__.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/_clustered_functions.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/_clustered_functions.pyi +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/_container_entrypoint.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/_ipython.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/_location.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/_object.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/_output.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/_partial_function.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/_pty.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/_resolver.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/_resources.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/_runtime/__init__.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/_runtime/asgi.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/_runtime/container_io_manager.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/_runtime/container_io_manager.pyi +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/_runtime/execution_context.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/_runtime/execution_context.pyi +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/_runtime/gpu_memory_snapshot.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/_runtime/telemetry.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/_runtime/user_code_imports.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/_serialization.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/_traceback.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/_tunnel.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/_tunnel.pyi +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/_type_manager.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/_utils/__init__.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/_utils/app_utils.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/_utils/async_utils.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/_utils/auth_token_manager.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/_utils/blob_utils.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/_utils/bytes_io_segment_payload.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/_utils/deprecation.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/_utils/docker_utils.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/_utils/function_utils.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/_utils/git_utils.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/_utils/grpc_testing.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/_utils/grpc_utils.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/_utils/hash_utils.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/_utils/http_utils.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/_utils/jwt_utils.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/_utils/logger.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/_utils/mount_utils.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/_utils/name_utils.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/_utils/package_utils.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/_utils/pattern_utils.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/_utils/rand_pb_testing.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/_utils/shell_utils.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/_utils/time_utils.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/_vendor/__init__.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/_vendor/a2wsgi_wsgi.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/_vendor/cloudpickle.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/_vendor/tblib.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/_watcher.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/app.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/app.pyi +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/builder/2023.12.312.txt +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/builder/2023.12.txt +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/builder/2024.04.txt +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/builder/2024.10.txt +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/builder/2025.06.txt +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/builder/PREVIEW.txt +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/builder/README.md +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/builder/base-images.json +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/call_graph.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/cli/__init__.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/cli/_download.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/cli/_traceback.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/cli/app.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/cli/cluster.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/cli/config.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/cli/container.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/cli/dict.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/cli/entry_point.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/cli/environment.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/cli/import_refs.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/cli/launch.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/cli/network_file_system.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/cli/profile.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/cli/programs/__init__.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/cli/programs/launch_instance_ssh.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/cli/programs/run_jupyter.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/cli/programs/run_marimo.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/cli/programs/vscode.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/cli/queues.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/cli/run.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/cli/secret.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/cli/token.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/cli/utils.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/cli/volume.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/client.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/cloud_bucket_mount.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/cloud_bucket_mount.pyi +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/config.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/container_process.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/container_process.pyi +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/dict.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/dict.pyi +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/environments.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/environments.pyi +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/exception.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/experimental/__init__.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/experimental/flash.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/experimental/flash.pyi +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/experimental/ipython.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/file_io.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/file_io.pyi +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/file_pattern_matcher.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/functions.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/gpu.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/image.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/image.pyi +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/io_streams.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/io_streams.pyi +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/mount.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/mount.pyi +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/network_file_system.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/network_file_system.pyi +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/object.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/object.pyi +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/output.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/partial_function.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/partial_function.pyi +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/proxy.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/proxy.pyi +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/py.typed +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/queue.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/queue.pyi +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/retries.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/runner.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/runner.pyi +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/running_app.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/sandbox.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/sandbox.pyi +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/schedule.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/scheduler_placement.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/secret.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/secret.pyi +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/serving.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/serving.pyi +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/snapshot.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/snapshot.pyi +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/stream_type.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/token_flow.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/token_flow.pyi +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/volume.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal/volume.pyi +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal.egg-info/SOURCES.txt +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal.egg-info/dependency_links.txt +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal.egg-info/entry_points.txt +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal.egg-info/requires.txt +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal.egg-info/top_level.txt +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal_docs/__init__.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal_docs/gen_cli_docs.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal_docs/gen_reference_docs.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal_docs/mdmd/__init__.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal_docs/mdmd/mdmd.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal_docs/mdmd/signatures.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal_proto/__init__.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal_proto/api.proto +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal_proto/api_grpc.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal_proto/api_pb2.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal_proto/api_pb2.pyi +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal_proto/api_pb2_grpc.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal_proto/api_pb2_grpc.pyi +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal_proto/modal_api_grpc.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal_proto/modal_options_grpc.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal_proto/options.proto +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal_proto/options_grpc.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal_proto/options_pb2.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal_proto/options_pb2.pyi +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal_proto/options_pb2_grpc.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal_proto/options_pb2_grpc.pyi +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal_proto/py.typed +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/modal_version/__main__.py +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/pyproject.toml +0 -0
- {modal-1.1.4.dev17 → modal-1.1.4.dev19}/setup.cfg +0 -0
@@ -1471,6 +1471,7 @@ class _Function(typing.Generic[P, ReturnType, OriginalReturnType], _Object, type
|
|
1471
1471
|
self._info = None
|
1472
1472
|
self._serve_mounts = frozenset()
|
1473
1473
|
self._metadata = None
|
1474
|
+
self._experimental_flash_urls = None
|
1474
1475
|
|
1475
1476
|
def _hydrate_metadata(self, metadata: Optional[Message]):
|
1476
1477
|
# Overridden concrete implementation of base class method
|
@@ -1498,6 +1499,7 @@ class _Function(typing.Generic[P, ReturnType, OriginalReturnType], _Object, type
|
|
1498
1499
|
self._max_object_size_bytes = (
|
1499
1500
|
metadata.max_object_size_bytes if metadata.HasField("max_object_size_bytes") else MAX_OBJECT_SIZE_BYTES
|
1500
1501
|
)
|
1502
|
+
self._experimental_flash_urls = metadata._experimental_flash_urls
|
1501
1503
|
|
1502
1504
|
def _get_metadata(self):
|
1503
1505
|
# Overridden concrete implementation of base class method
|
@@ -1515,6 +1517,7 @@ class _Function(typing.Generic[P, ReturnType, OriginalReturnType], _Object, type
|
|
1515
1517
|
input_plane_url=self._input_plane_url,
|
1516
1518
|
input_plane_region=self._input_plane_region,
|
1517
1519
|
max_object_size_bytes=self._max_object_size_bytes,
|
1520
|
+
_experimental_flash_urls=self._experimental_flash_urls,
|
1518
1521
|
)
|
1519
1522
|
|
1520
1523
|
def _check_no_web_url(self, fn_name: str):
|
@@ -1545,6 +1548,11 @@ Use the `Function.get_web_url()` method instead.
|
|
1545
1548
|
"""URL of a Function running as a web endpoint."""
|
1546
1549
|
return self._web_url
|
1547
1550
|
|
1551
|
+
@live_method
|
1552
|
+
async def _experimental_get_flash_urls(self) -> Optional[list[str]]:
|
1553
|
+
"""URL of the flash service for the function."""
|
1554
|
+
return list(self._experimental_flash_urls) if self._experimental_flash_urls else None
|
1555
|
+
|
1548
1556
|
@property
|
1549
1557
|
async def is_generator(self) -> bool:
|
1550
1558
|
"""mdmd:hidden"""
|
@@ -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.4.
|
36
|
+
version: str = "1.1.4.dev19",
|
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.4.
|
167
|
+
version: str = "1.1.4.dev19",
|
168
168
|
):
|
169
169
|
"""mdmd:hidden
|
170
170
|
The Modal client object is not intended to be instantiated directly by users.
|
@@ -12,7 +12,7 @@ from grpclib import GRPCError, Status
|
|
12
12
|
from modal_proto import api_pb2
|
13
13
|
|
14
14
|
from ._functions import _Function, _parse_retries
|
15
|
-
from ._object import _Object
|
15
|
+
from ._object import _Object, live_method
|
16
16
|
from ._partial_function import (
|
17
17
|
_find_callables_for_obj,
|
18
18
|
_find_partial_methods_for_user_cls,
|
@@ -510,6 +510,11 @@ class _Cls(_Object, type_prefix="cs"):
|
|
510
510
|
# returns method names for a *local* class only for now (used by cli)
|
511
511
|
return self._method_partials.keys()
|
512
512
|
|
513
|
+
@live_method
|
514
|
+
async def _experimental_get_flash_urls(self) -> Optional[list[str]]:
|
515
|
+
"""URL of the flash service for the class."""
|
516
|
+
return await self._get_class_service_function()._experimental_get_flash_urls()
|
517
|
+
|
513
518
|
def _hydrate_metadata(self, metadata: Message):
|
514
519
|
assert isinstance(metadata, api_pb2.ClassHandleMetadata)
|
515
520
|
class_service_function = self._get_class_service_function()
|
@@ -354,6 +354,10 @@ class _Cls(modal._object._Object):
|
|
354
354
|
def _get_name(self) -> str: ...
|
355
355
|
def _get_class_service_function(self) -> modal._functions._Function: ...
|
356
356
|
def _get_method_names(self) -> collections.abc.Collection[str]: ...
|
357
|
+
async def _experimental_get_flash_urls(self) -> typing.Optional[list[str]]:
|
358
|
+
"""URL of the flash service for the class."""
|
359
|
+
...
|
360
|
+
|
357
361
|
def _hydrate_metadata(self, metadata: google.protobuf.message.Message): ...
|
358
362
|
@staticmethod
|
359
363
|
def validate_construction_mechanism(user_cls):
|
@@ -520,6 +524,18 @@ class Cls(modal.object.Object):
|
|
520
524
|
def _get_name(self) -> str: ...
|
521
525
|
def _get_class_service_function(self) -> modal.functions.Function: ...
|
522
526
|
def _get_method_names(self) -> collections.abc.Collection[str]: ...
|
527
|
+
|
528
|
+
class ___experimental_get_flash_urls_spec(typing_extensions.Protocol[SUPERSELF]):
|
529
|
+
def __call__(self, /) -> typing.Optional[list[str]]:
|
530
|
+
"""URL of the flash service for the class."""
|
531
|
+
...
|
532
|
+
|
533
|
+
async def aio(self, /) -> typing.Optional[list[str]]:
|
534
|
+
"""URL of the flash service for the class."""
|
535
|
+
...
|
536
|
+
|
537
|
+
_experimental_get_flash_urls: ___experimental_get_flash_urls_spec[typing_extensions.Self]
|
538
|
+
|
523
539
|
def _hydrate_metadata(self, metadata: google.protobuf.message.Message): ...
|
524
540
|
@staticmethod
|
525
541
|
def validate_construction_mechanism(user_cls):
|
@@ -359,6 +359,17 @@ class Function(
|
|
359
359
|
|
360
360
|
get_web_url: __get_web_url_spec[typing_extensions.Self]
|
361
361
|
|
362
|
+
class ___experimental_get_flash_urls_spec(typing_extensions.Protocol[SUPERSELF]):
|
363
|
+
def __call__(self, /) -> typing.Optional[list[str]]:
|
364
|
+
"""URL of the flash service for the function."""
|
365
|
+
...
|
366
|
+
|
367
|
+
async def aio(self, /) -> typing.Optional[list[str]]:
|
368
|
+
"""URL of the flash service for the function."""
|
369
|
+
...
|
370
|
+
|
371
|
+
_experimental_get_flash_urls: ___experimental_get_flash_urls_spec[typing_extensions.Self]
|
372
|
+
|
362
373
|
@property
|
363
374
|
def is_generator(self) -> bool:
|
364
375
|
"""mdmd:hidden"""
|
@@ -79,8 +79,10 @@ class _OutputValue:
|
|
79
79
|
|
80
80
|
MAX_INPUTS_OUTSTANDING_DEFAULT = 1000
|
81
81
|
|
82
|
-
#
|
82
|
+
# Maximum number of inputs to send to the server per FunctionPutInputs request
|
83
83
|
MAP_INVOCATION_CHUNK_SIZE = 49
|
84
|
+
SPAWN_MAP_INVOCATION_CHUNK_SIZE = 512
|
85
|
+
|
84
86
|
|
85
87
|
if typing.TYPE_CHECKING:
|
86
88
|
import modal.functions
|
@@ -159,6 +161,7 @@ class InputPumper:
|
|
159
161
|
input_queue: asyncio.Queue,
|
160
162
|
function: "modal.functions._Function",
|
161
163
|
function_call_id: str,
|
164
|
+
max_batch_size: int,
|
162
165
|
map_items_manager: Optional["_MapItemsManager"] = None,
|
163
166
|
):
|
164
167
|
self.client = client
|
@@ -167,10 +170,11 @@ class InputPumper:
|
|
167
170
|
self.input_queue = input_queue
|
168
171
|
self.inputs_sent = 0
|
169
172
|
self.function_call_id = function_call_id
|
173
|
+
self.max_batch_size = max_batch_size
|
170
174
|
|
171
175
|
async def pump_inputs(self):
|
172
176
|
assert self.client.stub
|
173
|
-
async for items in queue_batch_iterator(self.input_queue, max_batch_size=
|
177
|
+
async for items in queue_batch_iterator(self.input_queue, max_batch_size=self.max_batch_size):
|
174
178
|
# Add items to the manager. Their state will be SENDING.
|
175
179
|
if self.map_items_manager is not None:
|
176
180
|
await self.map_items_manager.add_items(items)
|
@@ -234,6 +238,7 @@ class SyncInputPumper(InputPumper):
|
|
234
238
|
input_queue=input_queue,
|
235
239
|
function=function,
|
236
240
|
function_call_id=function_call_id,
|
241
|
+
max_batch_size=MAP_INVOCATION_CHUNK_SIZE,
|
237
242
|
map_items_manager=map_items_manager,
|
238
243
|
)
|
239
244
|
self.retry_queue = retry_queue
|
@@ -241,7 +246,7 @@ class SyncInputPumper(InputPumper):
|
|
241
246
|
self.function_call_jwt = function_call_jwt
|
242
247
|
|
243
248
|
async def retry_inputs(self):
|
244
|
-
async for retriable_idxs in queue_batch_iterator(self.retry_queue, max_batch_size=
|
249
|
+
async for retriable_idxs in queue_batch_iterator(self.retry_queue, max_batch_size=self.max_batch_size):
|
245
250
|
# For each index, use the context in the manager to create a FunctionRetryInputsItem.
|
246
251
|
# This will also update the context state to RETRYING.
|
247
252
|
inputs: list[api_pb2.FunctionRetryInputsItem] = await self.map_items_manager.prepare_items_for_retry(
|
@@ -269,7 +274,13 @@ class AsyncInputPumper(InputPumper):
|
|
269
274
|
function: "modal.functions._Function",
|
270
275
|
function_call_id: str,
|
271
276
|
):
|
272
|
-
super().__init__(
|
277
|
+
super().__init__(
|
278
|
+
client,
|
279
|
+
input_queue=input_queue,
|
280
|
+
function=function,
|
281
|
+
function_call_id=function_call_id,
|
282
|
+
max_batch_size=SPAWN_MAP_INVOCATION_CHUNK_SIZE,
|
283
|
+
)
|
273
284
|
|
274
285
|
async def pump_inputs(self):
|
275
286
|
async for _ in super().pump_inputs():
|
@@ -89,6 +89,7 @@ class InputPumper:
|
|
89
89
|
input_queue: asyncio.queues.Queue,
|
90
90
|
function: modal._functions._Function,
|
91
91
|
function_call_id: str,
|
92
|
+
max_batch_size: int,
|
92
93
|
map_items_manager: typing.Optional[_MapItemsManager] = None,
|
93
94
|
):
|
94
95
|
"""Initialize self. See help(type(self)) for accurate signature."""
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|