modal 0.73.148__py3-none-any.whl → 0.73.150__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/_partial_function.py +3 -0
- modal/client.pyi +2 -2
- modal/functions.pyi +6 -6
- {modal-0.73.148.dist-info → modal-0.73.150.dist-info}/METADATA +1 -1
- {modal-0.73.148.dist-info → modal-0.73.150.dist-info}/RECORD +17 -17
- modal_proto/api.proto +66 -0
- modal_proto/api_grpc.py +16 -0
- modal_proto/api_pb2.py +132 -79
- modal_proto/api_pb2.pyi +129 -0
- modal_proto/api_pb2_grpc.py +33 -0
- modal_proto/api_pb2_grpc.pyi +10 -0
- modal_proto/modal_api_grpc.py +1 -0
- modal_version/_version_generated.py +1 -1
- {modal-0.73.148.dist-info → modal-0.73.150.dist-info}/LICENSE +0 -0
- {modal-0.73.148.dist-info → modal-0.73.150.dist-info}/WHEEL +0 -0
- {modal-0.73.148.dist-info → modal-0.73.150.dist-info}/entry_points.txt +0 -0
- {modal-0.73.148.dist-info → modal-0.73.150.dist-info}/top_level.txt +0 -0
modal/_partial_function.py
CHANGED
modal/client.pyi
CHANGED
@@ -31,7 +31,7 @@ class _Client:
|
|
31
31
|
server_url: str,
|
32
32
|
client_type: int,
|
33
33
|
credentials: typing.Optional[tuple[str, str]],
|
34
|
-
version: str = "0.73.
|
34
|
+
version: str = "0.73.150",
|
35
35
|
): ...
|
36
36
|
def is_closed(self) -> bool: ...
|
37
37
|
@property
|
@@ -93,7 +93,7 @@ class Client:
|
|
93
93
|
server_url: str,
|
94
94
|
client_type: int,
|
95
95
|
credentials: typing.Optional[tuple[str, str]],
|
96
|
-
version: str = "0.73.
|
96
|
+
version: str = "0.73.150",
|
97
97
|
): ...
|
98
98
|
def is_closed(self) -> bool: ...
|
99
99
|
@property
|
modal/functions.pyi
CHANGED
@@ -199,11 +199,11 @@ class Function(
|
|
199
199
|
|
200
200
|
_call_generator_nowait: ___call_generator_nowait_spec[typing_extensions.Self]
|
201
201
|
|
202
|
-
class __remote_spec(typing_extensions.Protocol[
|
202
|
+
class __remote_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER, SUPERSELF]):
|
203
203
|
def __call__(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER: ...
|
204
204
|
async def aio(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER: ...
|
205
205
|
|
206
|
-
remote: __remote_spec[modal._functions.
|
206
|
+
remote: __remote_spec[modal._functions.ReturnType, modal._functions.P, typing_extensions.Self]
|
207
207
|
|
208
208
|
class __remote_gen_spec(typing_extensions.Protocol[SUPERSELF]):
|
209
209
|
def __call__(self, *args, **kwargs) -> typing.Generator[typing.Any, None, None]: ...
|
@@ -218,19 +218,19 @@ class Function(
|
|
218
218
|
self, *args: modal._functions.P.args, **kwargs: modal._functions.P.kwargs
|
219
219
|
) -> modal._functions.OriginalReturnType: ...
|
220
220
|
|
221
|
-
class ___experimental_spawn_spec(typing_extensions.Protocol[
|
221
|
+
class ___experimental_spawn_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER, SUPERSELF]):
|
222
222
|
def __call__(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
|
223
223
|
async def aio(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
|
224
224
|
|
225
225
|
_experimental_spawn: ___experimental_spawn_spec[
|
226
|
-
modal._functions.
|
226
|
+
modal._functions.ReturnType, modal._functions.P, typing_extensions.Self
|
227
227
|
]
|
228
228
|
|
229
|
-
class __spawn_spec(typing_extensions.Protocol[
|
229
|
+
class __spawn_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER, SUPERSELF]):
|
230
230
|
def __call__(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
|
231
231
|
async def aio(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
|
232
232
|
|
233
|
-
spawn: __spawn_spec[modal._functions.
|
233
|
+
spawn: __spawn_spec[modal._functions.ReturnType, modal._functions.P, typing_extensions.Self]
|
234
234
|
|
235
235
|
def get_raw_f(self) -> collections.abc.Callable[..., typing.Any]: ...
|
236
236
|
|
@@ -8,7 +8,7 @@ modal/_ipython.py,sha256=TW1fkVOmZL3YYqdS2YlM1hqpf654Yf8ZyybHdBnlhSw,301
|
|
8
8
|
modal/_location.py,sha256=joiX-0ZeutEUDTrrqLF1GHXCdVLF-rHzstocbMcd_-k,366
|
9
9
|
modal/_object.py,sha256=JBIECWdfpRKCaCxVWZbC3Q1kF5Whk_EKvY9f4Y6AFyg,11446
|
10
10
|
modal/_output.py,sha256=Z0nngPh2mKHMQc4MQ92YjVPc3ewOLa3I4dFBlL9nvQY,25656
|
11
|
-
modal/_partial_function.py,sha256=
|
11
|
+
modal/_partial_function.py,sha256=8mmd5lvjZaC7qi0KAnLR1H590MlxNslAE2_Kr9biJUA,39704
|
12
12
|
modal/_proxy_tunnel.py,sha256=gnKyCfmVB7x2d1A6c-JDysNIP3kEFxmXzhcXhPrzPn0,1906
|
13
13
|
modal/_pty.py,sha256=JZfPDDpzqICZqtyPI_oMJf_9w-p_lLNuzHhwhodUXio,1329
|
14
14
|
modal/_resolver.py,sha256=RtoXoYzSllPlFu0D1vel_FWiEmDO7RyToiC2bxeN8ZY,6917
|
@@ -23,7 +23,7 @@ modal/app.py,sha256=w00bV9cjABAsS2ExE7zb1jY6Q_snXYmdKa3xRFg8iXA,47428
|
|
23
23
|
modal/app.pyi,sha256=pUEqciyGZ446sc_QoG8XcQ_oc6oU-U4dqjkxjhgOX98,26968
|
24
24
|
modal/call_graph.py,sha256=1g2DGcMIJvRy-xKicuf63IVE98gJSnQsr8R_NVMptNc,2581
|
25
25
|
modal/client.py,sha256=j9D3hNis1lfhnz9lVFGgJgowbH3PaGUzNKgHPWYG778,15372
|
26
|
-
modal/client.pyi,sha256=
|
26
|
+
modal/client.pyi,sha256=7uZv9uWQf4FIvAK5rTuUNBrYYa2l_S-nGgvxH6ttlVI,7661
|
27
27
|
modal/cloud_bucket_mount.py,sha256=YOe9nnvSr4ZbeCn587d7_VhE9IioZYRvF9VYQTQux08,5914
|
28
28
|
modal/cloud_bucket_mount.pyi,sha256=30T3K1a89l6wzmEJ_J9iWv9SknoGqaZDx59Xs-ZQcmk,1607
|
29
29
|
modal/cls.py,sha256=6MZYzhOcsCG7uWKk_zv_Q7fDcn5dkmK0M4QVRrpfF3Q,31769
|
@@ -40,7 +40,7 @@ modal/file_io.py,sha256=lcMs_E9Xfm0YX1t9U2wNIBPnqHRxmImqjLW1GHqVmyg,20945
|
|
40
40
|
modal/file_io.pyi,sha256=NTRft1tbPSWf9TlWVeZmTlgB5AZ_Zhu2srWIrWr7brk,9445
|
41
41
|
modal/file_pattern_matcher.py,sha256=trosX-Bp7dOubudN1bLLhRAoidWy1TcoaR4Pv8CedWw,6497
|
42
42
|
modal/functions.py,sha256=kcNHvqeGBxPI7Cgd57NIBBghkfbeFJzXO44WW0jSmao,325
|
43
|
-
modal/functions.pyi,sha256=
|
43
|
+
modal/functions.pyi,sha256=0Au1n37DimTZVvxCIR7HWALuNGxfJ_fcNR-or37eo5k,14438
|
44
44
|
modal/gpu.py,sha256=Kbhs_u49FaC2Zi0TjCdrpstpRtT5eZgecynmQi5IZVE,6752
|
45
45
|
modal/image.py,sha256=HtkKomhX4inozqSRi7lf5Vt9IEqCnVHn5bEo59hD64A,92835
|
46
46
|
modal/image.pyi,sha256=iWclz2rxaP-LSsYMgU0X3ZcN5mEFvpyKzIPKJbohmsg,25591
|
@@ -153,13 +153,13 @@ modal_docs/mdmd/__init__.py,sha256=svYKtV8HDwDCN86zbdWqyq5T8sMdGDj0PVlzc2tIxDM,2
|
|
153
153
|
modal_docs/mdmd/mdmd.py,sha256=Irx49MCCTlBOP4FBdLR--JrpA3-WhsVeriq0LGgsRic,6232
|
154
154
|
modal_docs/mdmd/signatures.py,sha256=XJaZrK7Mdepk5fdX51A8uENiLFNil85Ud0d4MH8H5f0,3218
|
155
155
|
modal_proto/__init__.py,sha256=MIEP8jhXUeGq_eCjYFcqN5b1bxBM4fdk0VESpjWR0fc,28
|
156
|
-
modal_proto/api.proto,sha256=
|
157
|
-
modal_proto/api_grpc.py,sha256=
|
158
|
-
modal_proto/api_pb2.py,sha256=
|
159
|
-
modal_proto/api_pb2.pyi,sha256=
|
160
|
-
modal_proto/api_pb2_grpc.py,sha256=
|
161
|
-
modal_proto/api_pb2_grpc.pyi,sha256=
|
162
|
-
modal_proto/modal_api_grpc.py,sha256=
|
156
|
+
modal_proto/api.proto,sha256=KLgOS8GclVSbeNOJcxC2Vyzbns2BHt9AdvQrXBEltvA,90668
|
157
|
+
modal_proto/api_grpc.py,sha256=9Rs0JyHcz_DSjVKhdtMbDuNt6qDkrE2718KsyA3QL4c,110702
|
158
|
+
modal_proto/api_pb2.py,sha256=rl4rGn-Q_AS-Kn_F_T3df0_Lx2rvJMajdcpTkewJ0Ag,320170
|
159
|
+
modal_proto/api_pb2.pyi,sha256=QLmFaTak-GwdKUhGQGk-DudI3cV7PdluTWSnvxlgobo,434662
|
160
|
+
modal_proto/api_pb2_grpc.py,sha256=olXvs6OQvy7pqvHP9bkSWC_DdIv0iO38xRlmkLo-ai8,239213
|
161
|
+
modal_proto/api_pb2_grpc.pyi,sha256=ybhcN2nwFBIPd4Z4kkMOv-M8Ejidz93Bl4zScLpYcK0,55706
|
162
|
+
modal_proto/modal_api_grpc.py,sha256=43ujbC_a8YAjuhtEvS-O-5lNpkG5d0K0ZIlryJ4weT4,14766
|
163
163
|
modal_proto/modal_options_grpc.py,sha256=qJ1cuwA54oRqrdTyPTbvfhFZYd9HhJKK5UCwt523r3Y,120
|
164
164
|
modal_proto/options.proto,sha256=a-siq4swVbZPfaFRXAipRZzGP2bq8OsdUvjlyzAeodQ,488
|
165
165
|
modal_proto/options_grpc.py,sha256=M18X3d-8F_cNYSVM3I25dUTO5rZ0rd-vCCfynfh13Nc,125
|
@@ -170,10 +170,10 @@ modal_proto/options_pb2_grpc.pyi,sha256=CImmhxHsYnF09iENPoe8S4J-n93jtgUYD2JPAc0y
|
|
170
170
|
modal_proto/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
171
171
|
modal_version/__init__.py,sha256=wiJQ53c-OMs0Xf1UeXOxQ7FwlV1VzIjnX6o-pRYZ_Pk,470
|
172
172
|
modal_version/__main__.py,sha256=2FO0yYQQwDTh6udt1h-cBnGd1c4ZyHnHSI4BksxzVac,105
|
173
|
-
modal_version/_version_generated.py,sha256=
|
174
|
-
modal-0.73.
|
175
|
-
modal-0.73.
|
176
|
-
modal-0.73.
|
177
|
-
modal-0.73.
|
178
|
-
modal-0.73.
|
179
|
-
modal-0.73.
|
173
|
+
modal_version/_version_generated.py,sha256=b_9tYBKQ8OVORw51ouAMn3uT9_gfkq2Vrg3B7PU_BQw,150
|
174
|
+
modal-0.73.150.dist-info/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
|
175
|
+
modal-0.73.150.dist-info/METADATA,sha256=ePf8YfB9Bp8xAIz5Mjv9GwuZpwsQnBC_wnNqL3u-AY8,2453
|
176
|
+
modal-0.73.150.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
|
177
|
+
modal-0.73.150.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
|
178
|
+
modal-0.73.150.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
|
179
|
+
modal-0.73.150.dist-info/RECORD,,
|
modal_proto/api.proto
CHANGED
@@ -2879,6 +2879,71 @@ message VolumeMount {
|
|
2879
2879
|
bool read_only = 4;
|
2880
2880
|
}
|
2881
2881
|
|
2882
|
+
message VolumePutFiles2Request {
|
2883
|
+
// List of files, sorted lexicographically by `path`.
|
2884
|
+
repeated File files = 1;
|
2885
|
+
|
2886
|
+
// The last time the client called `VolumePutFiles2` for this file, it was
|
2887
|
+
// told that some blocks were missing. This field contains information
|
2888
|
+
// about the client having uploaded those missing blocks.
|
2889
|
+
repeated NewBlock new_blocks = 2;
|
2890
|
+
|
2891
|
+
// If set to true, prevent overwriting existing files. (Note that we don't
|
2892
|
+
// allow overwriting existing directories with uploaded files regardless.)
|
2893
|
+
bool disallow_overwrite_existing_files = 3;
|
2894
|
+
|
2895
|
+
message File {
|
2896
|
+
// Destination path of the file to be uploaded, including any parent dirs
|
2897
|
+
// etc.; for example "foo/bar/baz.txt"
|
2898
|
+
string path = 1;
|
2899
|
+
|
2900
|
+
// The total size of the file, in bytes.
|
2901
|
+
uint64 size = 2;
|
2902
|
+
|
2903
|
+
// SHA-256 checksum of each 8MiB block of the file's contents, in binary
|
2904
|
+
// (ie 32 raw bytes) format for compactness.
|
2905
|
+
repeated bytes blocks_sha256 = 3;
|
2906
|
+
}
|
2907
|
+
|
2908
|
+
message NewBlock {
|
2909
|
+
// Index of the file in the `files` field.
|
2910
|
+
uint64 file_index = 1;
|
2911
|
+
|
2912
|
+
// The index of the block in `files[file_index].blocks_sha256`.
|
2913
|
+
uint64 block_index = 2;
|
2914
|
+
|
2915
|
+
// The raw bytes of the body that was returned from the HTTP PUT request
|
2916
|
+
// when the client made a request for the `put_url` returned in the
|
2917
|
+
// previous `VolumePutFiles2Response`.
|
2918
|
+
bytes put_response = 3;
|
2919
|
+
}
|
2920
|
+
}
|
2921
|
+
|
2922
|
+
message VolumePutFiles2Response {
|
2923
|
+
// Blocks that are currently missing in the volume, because the file did not
|
2924
|
+
// exist, or because the block checksum from `blocks_sha256` in the request
|
2925
|
+
// did not match the current contents of the file.
|
2926
|
+
//
|
2927
|
+
// Values will be returned sorted by `(file_index, block_index)`.
|
2928
|
+
//
|
2929
|
+
// If this field is empty, it means that the files were uploaded successfully
|
2930
|
+
// and/or that the request was an idempotent no-op.
|
2931
|
+
repeated MissingBlock missing_blocks = 1;
|
2932
|
+
|
2933
|
+
message MissingBlock {
|
2934
|
+
// Index of the file in the original `files` field of the request.
|
2935
|
+
uint64 file_index = 1;
|
2936
|
+
|
2937
|
+
// The index of the block in the original
|
2938
|
+
// `files[file_index].blocks_sha256`.
|
2939
|
+
uint64 block_index = 2;
|
2940
|
+
|
2941
|
+
// Make a HTTP PUT request to this endpoint with the blocks' contents as
|
2942
|
+
// the body.
|
2943
|
+
string put_url = 3;
|
2944
|
+
}
|
2945
|
+
}
|
2946
|
+
|
2882
2947
|
message VolumePutFilesRequest {
|
2883
2948
|
string volume_id = 1;
|
2884
2949
|
// TODO(staffan): This is obviously unfortunately named, but provides what we need - consider renaming.
|
@@ -3120,6 +3185,7 @@ service ModalClient {
|
|
3120
3185
|
rpc VolumeList(VolumeListRequest) returns (VolumeListResponse);
|
3121
3186
|
rpc VolumeListFiles(VolumeListFilesRequest) returns (stream VolumeListFilesResponse);
|
3122
3187
|
rpc VolumePutFiles(VolumePutFilesRequest) returns (google.protobuf.Empty);
|
3188
|
+
rpc VolumePutFiles2(VolumePutFiles2Request) returns (VolumePutFiles2Response);
|
3123
3189
|
rpc VolumeReload(VolumeReloadRequest) returns (google.protobuf.Empty);
|
3124
3190
|
rpc VolumeRemoveFile(VolumeRemoveFileRequest) returns (google.protobuf.Empty);
|
3125
3191
|
rpc VolumeRename(VolumeRenameRequest) returns (google.protobuf.Empty);
|
modal_proto/api_grpc.py
CHANGED
@@ -574,6 +574,10 @@ class ModalClientBase(abc.ABC):
|
|
574
574
|
async def VolumePutFiles(self, stream: 'grpclib.server.Stream[modal_proto.api_pb2.VolumePutFilesRequest, google.protobuf.empty_pb2.Empty]') -> None:
|
575
575
|
pass
|
576
576
|
|
577
|
+
@abc.abstractmethod
|
578
|
+
async def VolumePutFiles2(self, stream: 'grpclib.server.Stream[modal_proto.api_pb2.VolumePutFiles2Request, modal_proto.api_pb2.VolumePutFiles2Response]') -> None:
|
579
|
+
pass
|
580
|
+
|
577
581
|
@abc.abstractmethod
|
578
582
|
async def VolumeReload(self, stream: 'grpclib.server.Stream[modal_proto.api_pb2.VolumeReloadRequest, google.protobuf.empty_pb2.Empty]') -> None:
|
579
583
|
pass
|
@@ -1426,6 +1430,12 @@ class ModalClientBase(abc.ABC):
|
|
1426
1430
|
modal_proto.api_pb2.VolumePutFilesRequest,
|
1427
1431
|
google.protobuf.empty_pb2.Empty,
|
1428
1432
|
),
|
1433
|
+
'/modal.client.ModalClient/VolumePutFiles2': grpclib.const.Handler(
|
1434
|
+
self.VolumePutFiles2,
|
1435
|
+
grpclib.const.Cardinality.UNARY_UNARY,
|
1436
|
+
modal_proto.api_pb2.VolumePutFiles2Request,
|
1437
|
+
modal_proto.api_pb2.VolumePutFiles2Response,
|
1438
|
+
),
|
1429
1439
|
'/modal.client.ModalClient/VolumeReload': grpclib.const.Handler(
|
1430
1440
|
self.VolumeReload,
|
1431
1441
|
grpclib.const.Cardinality.UNARY_UNARY,
|
@@ -2290,6 +2300,12 @@ class ModalClientStub:
|
|
2290
2300
|
modal_proto.api_pb2.VolumePutFilesRequest,
|
2291
2301
|
google.protobuf.empty_pb2.Empty,
|
2292
2302
|
)
|
2303
|
+
self.VolumePutFiles2 = grpclib.client.UnaryUnaryMethod(
|
2304
|
+
channel,
|
2305
|
+
'/modal.client.ModalClient/VolumePutFiles2',
|
2306
|
+
modal_proto.api_pb2.VolumePutFiles2Request,
|
2307
|
+
modal_proto.api_pb2.VolumePutFiles2Response,
|
2308
|
+
)
|
2293
2309
|
self.VolumeReload = grpclib.client.UnaryUnaryMethod(
|
2294
2310
|
channel,
|
2295
2311
|
'/modal.client.ModalClient/VolumeReload',
|