modAL 1.3.1.dev18__tar.gz → 1.3.1.dev20__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.3.1.dev18 → modal-1.3.1.dev20}/PKG-INFO +1 -1
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/_output.py +2 -2
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/cli/run.py +12 -6
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/client.pyi +2 -2
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/functions.pyi +6 -6
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/output.py +2 -2
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal.egg-info/PKG-INFO +1 -1
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal_version/__init__.py +1 -1
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/LICENSE +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/README.md +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/__init__.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/__main__.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/_billing.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/_clustered_functions.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/_clustered_functions.pyi +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/_container_entrypoint.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/_functions.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/_grpc_client.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/_ipython.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/_load_context.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/_location.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/_object.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/_partial_function.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/_pty.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/_resolver.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/_resources.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/_runtime/__init__.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/_runtime/asgi.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/_runtime/container_io_manager.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/_runtime/container_io_manager.pyi +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/_runtime/execution_context.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/_runtime/execution_context.pyi +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/_runtime/gpu_memory_snapshot.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/_runtime/telemetry.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/_runtime/user_code_event_loop.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/_runtime/user_code_imports.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/_serialization.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/_traceback.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/_tunnel.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/_tunnel.pyi +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/_type_manager.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/_utils/__init__.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/_utils/app_utils.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/_utils/async_utils.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/_utils/auth_token_manager.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/_utils/blob_utils.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/_utils/bytes_io_segment_payload.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/_utils/deprecation.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/_utils/docker_utils.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/_utils/function_utils.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/_utils/git_utils.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/_utils/grpc_testing.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/_utils/grpc_utils.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/_utils/hash_utils.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/_utils/http_utils.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/_utils/jwt_utils.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/_utils/logger.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/_utils/mount_utils.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/_utils/name_utils.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/_utils/package_utils.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/_utils/pattern_utils.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/_utils/rand_pb_testing.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/_utils/shell_utils.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/_utils/task_command_router_client.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/_utils/time_utils.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/_vendor/__init__.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/_vendor/a2wsgi_wsgi.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/_vendor/cloudpickle.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/_vendor/tblib.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/_watcher.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/app.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/app.pyi +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/billing.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/builder/2023.12.312.txt +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/builder/2023.12.txt +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/builder/2024.04.txt +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/builder/2024.10.txt +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/builder/2025.06.txt +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/builder/PREVIEW.txt +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/builder/README.md +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/builder/base-images.json +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/call_graph.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/cli/__init__.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/cli/_download.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/cli/_traceback.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/cli/app.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/cli/cluster.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/cli/config.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/cli/container.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/cli/dict.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/cli/entry_point.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/cli/environment.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/cli/import_refs.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/cli/launch.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/cli/network_file_system.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/cli/profile.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/cli/programs/__init__.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/cli/programs/run_jupyter.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/cli/programs/vscode.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/cli/queues.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/cli/secret.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/cli/shell.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/cli/token.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/cli/utils.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/cli/volume.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/client.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/cloud_bucket_mount.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/cloud_bucket_mount.pyi +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/cls.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/cls.pyi +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/config.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/container_process.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/container_process.pyi +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/dict.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/dict.pyi +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/environments.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/environments.pyi +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/exception.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/experimental/__init__.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/experimental/flash.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/experimental/flash.pyi +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/experimental/ipython.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/file_io.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/file_io.pyi +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/file_pattern_matcher.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/functions.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/gpu.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/image.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/image.pyi +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/io_streams.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/io_streams.pyi +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/mount.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/mount.pyi +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/network_file_system.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/network_file_system.pyi +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/object.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/object.pyi +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/parallel_map.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/parallel_map.pyi +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/partial_function.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/partial_function.pyi +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/proxy.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/proxy.pyi +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/py.typed +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/queue.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/queue.pyi +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/retries.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/runner.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/runner.pyi +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/running_app.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/sandbox.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/sandbox.pyi +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/schedule.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/scheduler_placement.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/secret.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/secret.pyi +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/serving.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/serving.pyi +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/snapshot.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/snapshot.pyi +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/stream_type.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/token_flow.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/token_flow.pyi +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/volume.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal/volume.pyi +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal.egg-info/SOURCES.txt +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal.egg-info/dependency_links.txt +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal.egg-info/entry_points.txt +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal.egg-info/requires.txt +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal.egg-info/top_level.txt +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal_docs/__init__.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal_docs/gen_cli_docs.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal_docs/gen_reference_docs.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal_docs/mdmd/__init__.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal_docs/mdmd/mdmd.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal_docs/mdmd/signatures.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal_proto/__init__.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal_proto/api.proto +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal_proto/api_grpc.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal_proto/api_pb2.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal_proto/api_pb2.pyi +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal_proto/api_pb2_grpc.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal_proto/api_pb2_grpc.pyi +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal_proto/modal_api_grpc.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal_proto/py.typed +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal_proto/task_command_router.proto +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal_proto/task_command_router_grpc.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal_proto/task_command_router_pb2.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal_proto/task_command_router_pb2.pyi +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal_proto/task_command_router_pb2_grpc.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal_proto/task_command_router_pb2_grpc.pyi +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/modal_version/__main__.py +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/pyproject.toml +0 -0
- {modal-1.3.1.dev18 → modal-1.3.1.dev20}/setup.cfg +0 -0
|
@@ -169,9 +169,9 @@ class OutputManager:
|
|
|
169
169
|
|
|
170
170
|
@classmethod
|
|
171
171
|
@contextlib.contextmanager
|
|
172
|
-
def enable_output(cls, show_progress: bool = True) -> Generator[None]:
|
|
172
|
+
def enable_output(cls, show_progress: bool = True, show_timestamps: bool = False) -> Generator[None]:
|
|
173
173
|
if show_progress:
|
|
174
|
-
cls._instance = OutputManager()
|
|
174
|
+
cls._instance = OutputManager(show_timestamps=show_timestamps)
|
|
175
175
|
try:
|
|
176
176
|
yield
|
|
177
177
|
finally:
|
|
@@ -185,7 +185,8 @@ def _make_click_function(app, signature: CliRunnableSignature, inner: Callable[[
|
|
|
185
185
|
_validate_interactive_quiet_params(ctx)
|
|
186
186
|
|
|
187
187
|
show_progress: bool = ctx.obj["show_progress"]
|
|
188
|
-
|
|
188
|
+
show_timestamps: bool = ctx.obj["show_timestamps"]
|
|
189
|
+
with enable_output(show_progress, show_timestamps=show_timestamps):
|
|
189
190
|
with run_app(
|
|
190
191
|
app,
|
|
191
192
|
detach=ctx.obj["detach"],
|
|
@@ -314,7 +315,8 @@ def _get_click_command_for_local_entrypoint(app: App, entrypoint: LocalEntrypoin
|
|
|
314
315
|
_validate_interactive_quiet_params(ctx)
|
|
315
316
|
|
|
316
317
|
show_progress: bool = ctx.obj["show_progress"]
|
|
317
|
-
|
|
318
|
+
show_timestamps: bool = ctx.obj["show_timestamps"]
|
|
319
|
+
with enable_output(show_progress, show_timestamps=show_timestamps):
|
|
318
320
|
with run_app(
|
|
319
321
|
app,
|
|
320
322
|
detach=ctx.obj["detach"],
|
|
@@ -404,8 +406,9 @@ class RunGroup(click.Group):
|
|
|
404
406
|
@click.option("-i", "--interactive", is_flag=True, help="Run the app in interactive mode.")
|
|
405
407
|
@click.option("-e", "--env", help=ENV_OPTION_HELP, default=None)
|
|
406
408
|
@click.option("-m", is_flag=True, help="Interpret argument as a Python module path instead of a file/script path")
|
|
409
|
+
@click.option("--timestamps", is_flag=True, help="Show timestamps for each log line.")
|
|
407
410
|
@click.pass_context
|
|
408
|
-
def run(ctx, write_result, detach, quiet, interactive, env, m):
|
|
411
|
+
def run(ctx, write_result, detach, quiet, interactive, env, m, timestamps):
|
|
409
412
|
"""Run a Modal function or local entrypoint.
|
|
410
413
|
|
|
411
414
|
`FUNC_REF` should be of the format `{file or module}::{function name}`.
|
|
@@ -442,6 +445,7 @@ def run(ctx, write_result, detach, quiet, interactive, env, m):
|
|
|
442
445
|
ctx.obj["detach"] = detach # if subcommand would be a click command...
|
|
443
446
|
ctx.obj["show_progress"] = False if quiet else True
|
|
444
447
|
ctx.obj["interactive"] = interactive
|
|
448
|
+
ctx.obj["show_timestamps"] = timestamps
|
|
445
449
|
|
|
446
450
|
|
|
447
451
|
def deploy(
|
|
@@ -453,6 +457,7 @@ def deploy(
|
|
|
453
457
|
use_module_mode: bool = typer.Option(
|
|
454
458
|
False, "-m", help="Interpret argument as a Python module path instead of a file/script path"
|
|
455
459
|
),
|
|
460
|
+
timestamps: bool = typer.Option(False, "--timestamps", help="Show timestamps for each log line."),
|
|
456
461
|
):
|
|
457
462
|
"""Deploy a Modal application.
|
|
458
463
|
|
|
@@ -477,11 +482,11 @@ def deploy(
|
|
|
477
482
|
"modal deploy ... --name=some-name"
|
|
478
483
|
)
|
|
479
484
|
|
|
480
|
-
with enable_output():
|
|
485
|
+
with enable_output(show_timestamps=timestamps):
|
|
481
486
|
res = deploy_app(app, name=name, environment_name=env or "", tag=tag)
|
|
482
487
|
|
|
483
488
|
if stream_logs:
|
|
484
|
-
stream_app_logs(app_id=res.app_id, app_logs_url=res.app_logs_url)
|
|
489
|
+
stream_app_logs(app_id=res.app_id, app_logs_url=res.app_logs_url, show_timestamps=timestamps)
|
|
485
490
|
|
|
486
491
|
|
|
487
492
|
def serve(
|
|
@@ -491,6 +496,7 @@ def serve(
|
|
|
491
496
|
use_module_mode: bool = typer.Option(
|
|
492
497
|
False, "-m", help="Interpret argument as a Python module path instead of a file/script path"
|
|
493
498
|
),
|
|
499
|
+
timestamps: bool = typer.Option(False, "--timestamps", help="Show timestamps for each log line."),
|
|
494
500
|
):
|
|
495
501
|
"""Run a web endpoint(s) associated with a Modal app and hot-reload code.
|
|
496
502
|
|
|
@@ -512,7 +518,7 @@ def serve(
|
|
|
512
518
|
if app.description is None:
|
|
513
519
|
app.set_description(_get_clean_app_description(app_ref))
|
|
514
520
|
|
|
515
|
-
with enable_output():
|
|
521
|
+
with enable_output(show_timestamps=timestamps):
|
|
516
522
|
with serve_app(app, import_ref, environment_name=env):
|
|
517
523
|
if timeout is None:
|
|
518
524
|
timeout = config["serve_timeout"]
|
|
@@ -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.3.1.
|
|
36
|
+
version: str = "1.3.1.dev20",
|
|
37
37
|
):
|
|
38
38
|
"""mdmd:hidden
|
|
39
39
|
The Modal client object is not intended to be instantiated directly by users.
|
|
@@ -163,7 +163,7 @@ class Client:
|
|
|
163
163
|
server_url: str,
|
|
164
164
|
client_type: int,
|
|
165
165
|
credentials: typing.Optional[tuple[str, str]],
|
|
166
|
-
version: str = "1.3.1.
|
|
166
|
+
version: str = "1.3.1.dev20",
|
|
167
167
|
):
|
|
168
168
|
"""mdmd:hidden
|
|
169
169
|
The Modal client object is not intended to be instantiated directly by users.
|
|
@@ -407,7 +407,7 @@ class Function(
|
|
|
407
407
|
|
|
408
408
|
_call_generator: ___call_generator_spec
|
|
409
409
|
|
|
410
|
-
class __remote_spec(typing_extensions.Protocol[
|
|
410
|
+
class __remote_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER]):
|
|
411
411
|
def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER:
|
|
412
412
|
"""Calls the function remotely, executing it with the given arguments and returning the execution's result."""
|
|
413
413
|
...
|
|
@@ -416,7 +416,7 @@ class Function(
|
|
|
416
416
|
"""Calls the function remotely, executing it with the given arguments and returning the execution's result."""
|
|
417
417
|
...
|
|
418
418
|
|
|
419
|
-
remote: __remote_spec[modal._functions.
|
|
419
|
+
remote: __remote_spec[modal._functions.ReturnType, modal._functions.P]
|
|
420
420
|
|
|
421
421
|
class __remote_gen_spec(typing_extensions.Protocol):
|
|
422
422
|
def __call__(self, /, *args, **kwargs) -> typing.Generator[typing.Any, None, None]:
|
|
@@ -443,7 +443,7 @@ class Function(
|
|
|
443
443
|
"""
|
|
444
444
|
...
|
|
445
445
|
|
|
446
|
-
class ___experimental_spawn_spec(typing_extensions.Protocol[
|
|
446
|
+
class ___experimental_spawn_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER]):
|
|
447
447
|
def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]:
|
|
448
448
|
"""[Experimental] Calls the function with the given arguments, without waiting for the results.
|
|
449
449
|
|
|
@@ -466,7 +466,7 @@ class Function(
|
|
|
466
466
|
"""
|
|
467
467
|
...
|
|
468
468
|
|
|
469
|
-
_experimental_spawn: ___experimental_spawn_spec[modal._functions.
|
|
469
|
+
_experimental_spawn: ___experimental_spawn_spec[modal._functions.ReturnType, modal._functions.P]
|
|
470
470
|
|
|
471
471
|
class ___spawn_map_inner_spec(typing_extensions.Protocol[P_INNER]):
|
|
472
472
|
def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> None: ...
|
|
@@ -474,7 +474,7 @@ class Function(
|
|
|
474
474
|
|
|
475
475
|
_spawn_map_inner: ___spawn_map_inner_spec[modal._functions.P]
|
|
476
476
|
|
|
477
|
-
class __spawn_spec(typing_extensions.Protocol[
|
|
477
|
+
class __spawn_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER]):
|
|
478
478
|
def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]:
|
|
479
479
|
"""Calls the function with the given arguments, without waiting for the results.
|
|
480
480
|
|
|
@@ -495,7 +495,7 @@ class Function(
|
|
|
495
495
|
"""
|
|
496
496
|
...
|
|
497
497
|
|
|
498
|
-
spawn: __spawn_spec[modal._functions.
|
|
498
|
+
spawn: __spawn_spec[modal._functions.ReturnType, modal._functions.P]
|
|
499
499
|
|
|
500
500
|
def get_raw_f(self) -> collections.abc.Callable[..., typing.Any]:
|
|
501
501
|
"""Return the inner Python object wrapped by this Modal Function."""
|
|
@@ -19,7 +19,7 @@ OUTPUT_ENABLED = False
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
@contextlib.contextmanager
|
|
22
|
-
def enable_output(show_progress: bool = True) -> Generator[None, None, None]:
|
|
22
|
+
def enable_output(show_progress: bool = True, show_timestamps: bool = False) -> Generator[None, None, None]:
|
|
23
23
|
"""Context manager that enable output when using the Python SDK.
|
|
24
24
|
|
|
25
25
|
This will print to stdout and stderr things such as
|
|
@@ -47,7 +47,7 @@ def enable_output(show_progress: bool = True) -> Generator[None, None, None]:
|
|
|
47
47
|
global OUTPUT_ENABLED
|
|
48
48
|
|
|
49
49
|
try:
|
|
50
|
-
with OutputManager.enable_output(show_progress):
|
|
50
|
+
with OutputManager.enable_output(show_progress, show_timestamps=show_timestamps):
|
|
51
51
|
OUTPUT_ENABLED = True
|
|
52
52
|
yield
|
|
53
53
|
finally:
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|