modal 0.67.1__py3-none-any.whl → 0.67.33__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/_clustered_functions.py +2 -2
- modal/_clustered_functions.pyi +2 -2
- modal/_container_entrypoint.py +8 -5
- modal/_output.py +29 -28
- modal/_pty.py +2 -2
- modal/_resolver.py +6 -5
- modal/_resources.py +3 -3
- modal/_runtime/asgi.py +46 -6
- modal/_runtime/container_io_manager.py +22 -26
- modal/_runtime/execution_context.py +2 -2
- modal/_runtime/telemetry.py +1 -2
- modal/_runtime/user_code_imports.py +12 -14
- modal/_serialization.py +3 -7
- modal/_traceback.py +5 -5
- modal/_tunnel.py +5 -4
- modal/_tunnel.pyi +2 -2
- modal/_utils/async_utils.py +53 -17
- modal/_utils/blob_utils.py +22 -7
- modal/_utils/function_utils.py +20 -10
- modal/_utils/grpc_testing.py +7 -6
- modal/_utils/grpc_utils.py +2 -3
- modal/_utils/hash_utils.py +2 -2
- modal/_utils/mount_utils.py +5 -4
- modal/_utils/package_utils.py +2 -3
- modal/_utils/pattern_matcher.py +6 -6
- modal/_utils/rand_pb_testing.py +3 -3
- modal/_utils/shell_utils.py +2 -1
- modal/_vendor/a2wsgi_wsgi.py +62 -72
- modal/_vendor/cloudpickle.py +1 -1
- modal/_watcher.py +8 -7
- modal/app.py +68 -62
- modal/app.pyi +104 -99
- modal/call_graph.py +6 -6
- modal/cli/_download.py +3 -2
- modal/cli/_traceback.py +4 -4
- modal/cli/app.py +4 -4
- modal/cli/container.py +4 -4
- modal/cli/dict.py +1 -1
- modal/cli/environment.py +2 -3
- modal/cli/import_refs.py +1 -1
- modal/cli/launch.py +2 -2
- modal/cli/network_file_system.py +1 -1
- modal/cli/profile.py +1 -1
- modal/cli/programs/run_jupyter.py +2 -2
- modal/cli/programs/vscode.py +3 -3
- modal/cli/queues.py +1 -1
- modal/cli/run.py +6 -6
- modal/cli/secret.py +3 -3
- modal/cli/utils.py +2 -1
- modal/cli/volume.py +3 -3
- modal/client.py +6 -11
- modal/client.pyi +18 -27
- modal/cloud_bucket_mount.py +3 -3
- modal/cloud_bucket_mount.pyi +2 -2
- modal/cls.py +100 -47
- modal/cls.pyi +40 -40
- modal/config.py +3 -2
- modal/container_process.py +6 -2
- modal/dict.py +6 -3
- modal/dict.pyi +10 -9
- modal/environments.py +3 -3
- modal/environments.pyi +3 -3
- modal/exception.py +2 -3
- modal/functions.py +112 -104
- modal/functions.pyi +77 -58
- modal/image.py +59 -57
- modal/image.pyi +104 -103
- modal/io_streams.py +20 -12
- modal/io_streams.pyi +24 -14
- modal/mount.py +24 -24
- modal/mount.pyi +28 -29
- modal/network_file_system.py +14 -11
- modal/network_file_system.pyi +12 -11
- modal/object.py +9 -8
- modal/object.pyi +47 -34
- modal/output.py +2 -1
- modal/parallel_map.py +4 -4
- modal/partial_function.py +10 -14
- modal/partial_function.pyi +17 -18
- modal/queue.py +11 -8
- modal/queue.pyi +23 -22
- modal/retries.py +38 -0
- modal/runner.py +8 -7
- modal/runner.pyi +8 -14
- modal/running_app.py +3 -3
- modal/sandbox.py +20 -13
- modal/sandbox.pyi +73 -72
- modal/scheduler_placement.py +2 -1
- modal/secret.py +7 -7
- modal/secret.pyi +12 -12
- modal/serving.py +4 -3
- modal/serving.pyi +5 -4
- modal/token_flow.py +3 -2
- modal/token_flow.pyi +3 -3
- modal/volume.py +16 -23
- modal/volume.pyi +17 -16
- {modal-0.67.1.dist-info → modal-0.67.33.dist-info}/METADATA +2 -2
- modal-0.67.33.dist-info/RECORD +168 -0
- modal_docs/mdmd/signatures.py +1 -2
- modal_global_objects/mounts/python_standalone.py +1 -1
- modal_proto/api.proto +15 -0
- modal_proto/api_grpc.py +32 -0
- modal_proto/api_pb2.py +674 -654
- modal_proto/api_pb2.pyi +45 -1
- modal_proto/api_pb2_grpc.py +66 -0
- modal_proto/api_pb2_grpc.pyi +20 -0
- modal_proto/modal_api_grpc.py +2 -0
- modal_version/_version_generated.py +1 -1
- modal-0.67.1.dist-info/RECORD +0 -168
- {modal-0.67.1.dist-info → modal-0.67.33.dist-info}/LICENSE +0 -0
- {modal-0.67.1.dist-info → modal-0.67.33.dist-info}/WHEEL +0 -0
- {modal-0.67.1.dist-info → modal-0.67.33.dist-info}/entry_points.txt +0 -0
- {modal-0.67.1.dist-info → modal-0.67.33.dist-info}/top_level.txt +0 -0
modal_docs/mdmd/signatures.py
CHANGED
@@ -4,12 +4,11 @@ import inspect
|
|
4
4
|
import re
|
5
5
|
import textwrap
|
6
6
|
import warnings
|
7
|
-
from typing import Tuple
|
8
7
|
|
9
8
|
from synchronicity.synchronizer import FunctionWithAio
|
10
9
|
|
11
10
|
|
12
|
-
def _signature_from_ast(func) ->
|
11
|
+
def _signature_from_ast(func) -> tuple[str, str]:
|
13
12
|
"""Get function signature, including decorators and comments, from source code
|
14
13
|
|
15
14
|
Traverses functools.wraps-wrappings to get source of underlying function.
|
@@ -17,7 +17,7 @@ def publish_python_standalone_mount(client, version: str) -> None:
|
|
17
17
|
release, full_version = PYTHON_STANDALONE_VERSIONS[version]
|
18
18
|
|
19
19
|
libc = "gnu"
|
20
|
-
arch = "
|
20
|
+
arch = "x86_64_v3"
|
21
21
|
url = (
|
22
22
|
"https://github.com/indygreg/python-build-standalone/releases/download"
|
23
23
|
+ f"/{release}/cpython-{full_version}+{release}-{arch}-unknown-linux-gnu-install_only.tar.gz"
|
modal_proto/api.proto
CHANGED
@@ -589,6 +589,7 @@ message CheckpointInfo {
|
|
589
589
|
string runtime_fingerprint = 4;
|
590
590
|
int64 size = 5;
|
591
591
|
bool checksum_is_file_index = 6;
|
592
|
+
string original_task_id = 7;
|
592
593
|
}
|
593
594
|
|
594
595
|
message ClassCreateRequest {
|
@@ -2146,6 +2147,18 @@ message SandboxListResponse {
|
|
2146
2147
|
repeated SandboxInfo sandboxes = 1;
|
2147
2148
|
}
|
2148
2149
|
|
2150
|
+
message SandboxSnapshotFsRequest {
|
2151
|
+
string sandbox_id = 1;
|
2152
|
+
float timeout = 2;
|
2153
|
+
}
|
2154
|
+
|
2155
|
+
message SandboxSnapshotFsResponse {
|
2156
|
+
string image_id = 1;
|
2157
|
+
GenericResult result = 2;
|
2158
|
+
// Metadata may be empty since we may skip it for performance reasons.
|
2159
|
+
ImageMetadata image_metadata = 3;
|
2160
|
+
}
|
2161
|
+
|
2149
2162
|
message SandboxStdinWriteRequest {
|
2150
2163
|
string sandbox_id = 1;
|
2151
2164
|
bytes input = 2;
|
@@ -2662,6 +2675,7 @@ service ModalClient {
|
|
2662
2675
|
rpc ContainerFilesystemExec(ContainerFilesystemExecRequest) returns (ContainerFilesystemExecResponse);
|
2663
2676
|
rpc ContainerFilesystemExecGetOutput(ContainerFilesystemExecGetOutputRequest) returns (stream FilesystemRuntimeOutputBatch);
|
2664
2677
|
rpc ContainerHeartbeat(ContainerHeartbeatRequest) returns (ContainerHeartbeatResponse);
|
2678
|
+
rpc ContainerHello(google.protobuf.Empty) returns (google.protobuf.Empty);
|
2665
2679
|
rpc ContainerLog(ContainerLogRequest) returns (google.protobuf.Empty);
|
2666
2680
|
rpc ContainerStop(ContainerStopRequest) returns (ContainerStopResponse);
|
2667
2681
|
|
@@ -2745,6 +2759,7 @@ service ModalClient {
|
|
2745
2759
|
rpc SandboxGetTaskId(SandboxGetTaskIdRequest) returns (SandboxGetTaskIdResponse); // needed for modal container exec
|
2746
2760
|
rpc SandboxGetTunnels(SandboxGetTunnelsRequest) returns (SandboxGetTunnelsResponse);
|
2747
2761
|
rpc SandboxList(SandboxListRequest) returns (SandboxListResponse);
|
2762
|
+
rpc SandboxSnapshotFs(SandboxSnapshotFsRequest) returns (SandboxSnapshotFsResponse);
|
2748
2763
|
rpc SandboxStdinWrite(SandboxStdinWriteRequest) returns (SandboxStdinWriteResponse);
|
2749
2764
|
rpc SandboxTagsSet(SandboxTagsSetRequest) returns (google.protobuf.Empty);
|
2750
2765
|
rpc SandboxTerminate(SandboxTerminateRequest) returns (SandboxTerminateResponse);
|
modal_proto/api_grpc.py
CHANGED
@@ -129,6 +129,10 @@ class ModalClientBase(abc.ABC):
|
|
129
129
|
async def ContainerHeartbeat(self, stream: 'grpclib.server.Stream[modal_proto.api_pb2.ContainerHeartbeatRequest, modal_proto.api_pb2.ContainerHeartbeatResponse]') -> None:
|
130
130
|
pass
|
131
131
|
|
132
|
+
@abc.abstractmethod
|
133
|
+
async def ContainerHello(self, stream: 'grpclib.server.Stream[google.protobuf.empty_pb2.Empty, google.protobuf.empty_pb2.Empty]') -> None:
|
134
|
+
pass
|
135
|
+
|
132
136
|
@abc.abstractmethod
|
133
137
|
async def ContainerLog(self, stream: 'grpclib.server.Stream[modal_proto.api_pb2.ContainerLogRequest, google.protobuf.empty_pb2.Empty]') -> None:
|
134
138
|
pass
|
@@ -389,6 +393,10 @@ class ModalClientBase(abc.ABC):
|
|
389
393
|
async def SandboxList(self, stream: 'grpclib.server.Stream[modal_proto.api_pb2.SandboxListRequest, modal_proto.api_pb2.SandboxListResponse]') -> None:
|
390
394
|
pass
|
391
395
|
|
396
|
+
@abc.abstractmethod
|
397
|
+
async def SandboxSnapshotFs(self, stream: 'grpclib.server.Stream[modal_proto.api_pb2.SandboxSnapshotFsRequest, modal_proto.api_pb2.SandboxSnapshotFsResponse]') -> None:
|
398
|
+
pass
|
399
|
+
|
392
400
|
@abc.abstractmethod
|
393
401
|
async def SandboxStdinWrite(self, stream: 'grpclib.server.Stream[modal_proto.api_pb2.SandboxStdinWriteRequest, modal_proto.api_pb2.SandboxStdinWriteResponse]') -> None:
|
394
402
|
pass
|
@@ -703,6 +711,12 @@ class ModalClientBase(abc.ABC):
|
|
703
711
|
modal_proto.api_pb2.ContainerHeartbeatRequest,
|
704
712
|
modal_proto.api_pb2.ContainerHeartbeatResponse,
|
705
713
|
),
|
714
|
+
'/modal.client.ModalClient/ContainerHello': grpclib.const.Handler(
|
715
|
+
self.ContainerHello,
|
716
|
+
grpclib.const.Cardinality.UNARY_UNARY,
|
717
|
+
google.protobuf.empty_pb2.Empty,
|
718
|
+
google.protobuf.empty_pb2.Empty,
|
719
|
+
),
|
706
720
|
'/modal.client.ModalClient/ContainerLog': grpclib.const.Handler(
|
707
721
|
self.ContainerLog,
|
708
722
|
grpclib.const.Cardinality.UNARY_UNARY,
|
@@ -1093,6 +1107,12 @@ class ModalClientBase(abc.ABC):
|
|
1093
1107
|
modal_proto.api_pb2.SandboxListRequest,
|
1094
1108
|
modal_proto.api_pb2.SandboxListResponse,
|
1095
1109
|
),
|
1110
|
+
'/modal.client.ModalClient/SandboxSnapshotFs': grpclib.const.Handler(
|
1111
|
+
self.SandboxSnapshotFs,
|
1112
|
+
grpclib.const.Cardinality.UNARY_UNARY,
|
1113
|
+
modal_proto.api_pb2.SandboxSnapshotFsRequest,
|
1114
|
+
modal_proto.api_pb2.SandboxSnapshotFsResponse,
|
1115
|
+
),
|
1096
1116
|
'/modal.client.ModalClient/SandboxStdinWrite': grpclib.const.Handler(
|
1097
1117
|
self.SandboxStdinWrite,
|
1098
1118
|
grpclib.const.Cardinality.UNARY_UNARY,
|
@@ -1483,6 +1503,12 @@ class ModalClientStub:
|
|
1483
1503
|
modal_proto.api_pb2.ContainerHeartbeatRequest,
|
1484
1504
|
modal_proto.api_pb2.ContainerHeartbeatResponse,
|
1485
1505
|
)
|
1506
|
+
self.ContainerHello = grpclib.client.UnaryUnaryMethod(
|
1507
|
+
channel,
|
1508
|
+
'/modal.client.ModalClient/ContainerHello',
|
1509
|
+
google.protobuf.empty_pb2.Empty,
|
1510
|
+
google.protobuf.empty_pb2.Empty,
|
1511
|
+
)
|
1486
1512
|
self.ContainerLog = grpclib.client.UnaryUnaryMethod(
|
1487
1513
|
channel,
|
1488
1514
|
'/modal.client.ModalClient/ContainerLog',
|
@@ -1873,6 +1899,12 @@ class ModalClientStub:
|
|
1873
1899
|
modal_proto.api_pb2.SandboxListRequest,
|
1874
1900
|
modal_proto.api_pb2.SandboxListResponse,
|
1875
1901
|
)
|
1902
|
+
self.SandboxSnapshotFs = grpclib.client.UnaryUnaryMethod(
|
1903
|
+
channel,
|
1904
|
+
'/modal.client.ModalClient/SandboxSnapshotFs',
|
1905
|
+
modal_proto.api_pb2.SandboxSnapshotFsRequest,
|
1906
|
+
modal_proto.api_pb2.SandboxSnapshotFsResponse,
|
1907
|
+
)
|
1876
1908
|
self.SandboxStdinWrite = grpclib.client.UnaryUnaryMethod(
|
1877
1909
|
channel,
|
1878
1910
|
'/modal.client.ModalClient/SandboxStdinWrite',
|