modal 1.1.5.dev26__py3-none-any.whl → 1.1.5.dev28__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.
Potentially problematic release.
This version of modal might be problematic. Click here for more details.
- modal/_functions.py +29 -2
- modal/cli/environment.py +1 -1
- modal/client.pyi +2 -2
- {modal-1.1.5.dev26.dist-info → modal-1.1.5.dev28.dist-info}/METADATA +1 -1
- {modal-1.1.5.dev26.dist-info → modal-1.1.5.dev28.dist-info}/RECORD +13 -13
- modal_proto/api.proto +11 -0
- modal_proto/api_pb2.py +643 -642
- modal_proto/api_pb2.pyi +48 -5
- modal_version/__init__.py +1 -1
- {modal-1.1.5.dev26.dist-info → modal-1.1.5.dev28.dist-info}/WHEEL +0 -0
- {modal-1.1.5.dev26.dist-info → modal-1.1.5.dev28.dist-info}/entry_points.txt +0 -0
- {modal-1.1.5.dev26.dist-info → modal-1.1.5.dev28.dist-info}/licenses/LICENSE +0 -0
- {modal-1.1.5.dev26.dist-info → modal-1.1.5.dev28.dist-info}/top_level.txt +0 -0
modal/_functions.py
CHANGED
|
@@ -831,17 +831,23 @@ class _Function(typing.Generic[P, ReturnType, OriginalReturnType], _Object, type
|
|
|
831
831
|
for method_name, partial_function in interface_methods.items():
|
|
832
832
|
function_type = get_function_type(partial_function.params.is_generator)
|
|
833
833
|
function_name = f"{info.user_cls.__name__}.{method_name}"
|
|
834
|
+
is_web_endpoint = partial_function._is_web_endpoint()
|
|
834
835
|
method_schema = get_callable_schema(
|
|
835
836
|
partial_function._get_raw_f(),
|
|
836
|
-
is_web_endpoint=
|
|
837
|
+
is_web_endpoint=is_web_endpoint,
|
|
837
838
|
ignore_first_argument=True,
|
|
838
839
|
)
|
|
839
|
-
|
|
840
840
|
method_definition = api_pb2.MethodDefinition(
|
|
841
841
|
webhook_config=partial_function.params.webhook_config,
|
|
842
842
|
function_type=function_type,
|
|
843
843
|
function_name=function_name,
|
|
844
844
|
function_schema=method_schema,
|
|
845
|
+
supported_input_formats=[api_pb2.DATA_FORMAT_ASGI]
|
|
846
|
+
if is_web_endpoint
|
|
847
|
+
else [api_pb2.DATA_FORMAT_PICKLE],
|
|
848
|
+
supported_output_formats=[api_pb2.DATA_FORMAT_ASGI]
|
|
849
|
+
if is_web_endpoint
|
|
850
|
+
else [api_pb2.DATA_FORMAT_PICKLE],
|
|
845
851
|
)
|
|
846
852
|
method_definitions[method_name] = method_definition
|
|
847
853
|
|
|
@@ -865,6 +871,18 @@ class _Function(typing.Generic[P, ReturnType, OriginalReturnType], _Object, type
|
|
|
865
871
|
|
|
866
872
|
return deps
|
|
867
873
|
|
|
874
|
+
if info.is_service_class():
|
|
875
|
+
# classes don't have data formats themselves - methods do
|
|
876
|
+
supported_input_formats = []
|
|
877
|
+
supported_output_formats = []
|
|
878
|
+
elif webhook_config is not None:
|
|
879
|
+
supported_input_formats = [api_pb2.DATA_FORMAT_ASGI]
|
|
880
|
+
supported_output_formats = [api_pb2.DATA_FORMAT_ASGI]
|
|
881
|
+
else:
|
|
882
|
+
# TODO: add CBOR support
|
|
883
|
+
supported_input_formats = [api_pb2.DATA_FORMAT_PICKLE]
|
|
884
|
+
supported_output_formats = [api_pb2.DATA_FORMAT_PICKLE]
|
|
885
|
+
|
|
868
886
|
async def _preload(self: _Function, resolver: Resolver, existing_object_id: Optional[str]):
|
|
869
887
|
assert resolver.client and resolver.client.stub
|
|
870
888
|
|
|
@@ -877,6 +895,8 @@ class _Function(typing.Generic[P, ReturnType, OriginalReturnType], _Object, type
|
|
|
877
895
|
function_schema=get_callable_schema(info.raw_f, is_web_endpoint=bool(webhook_config))
|
|
878
896
|
if info.raw_f
|
|
879
897
|
else None,
|
|
898
|
+
supported_input_formats=supported_input_formats,
|
|
899
|
+
supported_output_formats=supported_output_formats,
|
|
880
900
|
)
|
|
881
901
|
if method_definitions:
|
|
882
902
|
for method_name, method_definition in method_definitions.items():
|
|
@@ -955,6 +975,7 @@ class _Function(typing.Generic[P, ReturnType, OriginalReturnType], _Object, type
|
|
|
955
975
|
function_schema = (
|
|
956
976
|
get_callable_schema(info.raw_f, is_web_endpoint=bool(webhook_config)) if info.raw_f else None
|
|
957
977
|
)
|
|
978
|
+
|
|
958
979
|
# Create function remotely
|
|
959
980
|
function_definition = api_pb2.Function(
|
|
960
981
|
module_name=info.module_name or "",
|
|
@@ -1016,6 +1037,8 @@ class _Function(typing.Generic[P, ReturnType, OriginalReturnType], _Object, type
|
|
|
1016
1037
|
task_idle_timeout_secs=scaledown_window or 0,
|
|
1017
1038
|
# ---
|
|
1018
1039
|
function_schema=function_schema,
|
|
1040
|
+
supported_input_formats=supported_input_formats,
|
|
1041
|
+
supported_output_formats=supported_output_formats,
|
|
1019
1042
|
)
|
|
1020
1043
|
|
|
1021
1044
|
if isinstance(gpu, list):
|
|
@@ -1051,6 +1074,8 @@ class _Function(typing.Generic[P, ReturnType, OriginalReturnType], _Object, type
|
|
|
1051
1074
|
runtime_perf_record=function_definition.runtime_perf_record,
|
|
1052
1075
|
function_schema=function_schema,
|
|
1053
1076
|
untrusted=function_definition.untrusted,
|
|
1077
|
+
supported_input_formats=supported_input_formats,
|
|
1078
|
+
supported_output_formats=supported_output_formats,
|
|
1054
1079
|
)
|
|
1055
1080
|
|
|
1056
1081
|
ranked_functions = []
|
|
@@ -1529,6 +1554,8 @@ class _Function(typing.Generic[P, ReturnType, OriginalReturnType], _Object, type
|
|
|
1529
1554
|
input_plane_region=self._input_plane_region,
|
|
1530
1555
|
max_object_size_bytes=self._max_object_size_bytes,
|
|
1531
1556
|
_experimental_flash_urls=self._experimental_flash_urls,
|
|
1557
|
+
supported_input_formats=self._metadata.supported_input_formats if self._metadata else [],
|
|
1558
|
+
supported_output_formats=self._metadata.supported_output_formats if self._metadata else [],
|
|
1532
1559
|
)
|
|
1533
1560
|
|
|
1534
1561
|
def _check_no_web_url(self, fn_name: str):
|
modal/cli/environment.py
CHANGED
|
@@ -86,7 +86,7 @@ def delete(
|
|
|
86
86
|
typer.confirm(
|
|
87
87
|
(
|
|
88
88
|
f"Are you sure you want to irrevocably delete the environment '{name}' and"
|
|
89
|
-
" all its associated
|
|
89
|
+
" all its associated Apps, Secrets, Volumes, Dicts and Queues?"
|
|
90
90
|
),
|
|
91
91
|
default=False,
|
|
92
92
|
abort=True,
|
modal/client.pyi
CHANGED
|
@@ -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.dev28",
|
|
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.dev28",
|
|
168
168
|
):
|
|
169
169
|
"""mdmd:hidden
|
|
170
170
|
The Modal client object is not intended to be instantiated directly by users.
|
|
@@ -3,7 +3,7 @@ modal/__main__.py,sha256=45H-GtwzaDfN-1nP4_HYvzN3s7AG_HXR4-ynrsjO_OI,2803
|
|
|
3
3
|
modal/_clustered_functions.py,sha256=Sy4Sf_17EO8OL-FUe8LYcm4hrqLyQFCssNhr3p0SroU,3013
|
|
4
4
|
modal/_clustered_functions.pyi,sha256=JmYwAGOLEnD5AF-gYF9O5tu-SgGjeoJz-X1j48b1Ijg,1157
|
|
5
5
|
modal/_container_entrypoint.py,sha256=fLluT_sU34vGPCTG1Q58VI1RvxF5n7vQzCVCsL-MMk8,29033
|
|
6
|
-
modal/_functions.py,sha256=
|
|
6
|
+
modal/_functions.py,sha256=3dP1qYtZhHJNvAam31i-3hkJLcNOuZ7yB6q16qWLhXE,91335
|
|
7
7
|
modal/_ipython.py,sha256=TW1fkVOmZL3YYqdS2YlM1hqpf654Yf8ZyybHdBnlhSw,301
|
|
8
8
|
modal/_location.py,sha256=joiX-0ZeutEUDTrrqLF1GHXCdVLF-rHzstocbMcd_-k,366
|
|
9
9
|
modal/_object.py,sha256=gwsLdXb-Ecd8nH8LVCo8oVZPzzdyo9BrN1DjgQmsSuM,11967
|
|
@@ -22,7 +22,7 @@ modal/app.py,sha256=OBFaL-8KVMtBMEmspHA76LvblPdnSgdoGioLkQBjhdQ,48851
|
|
|
22
22
|
modal/app.pyi,sha256=Cqk3pOeEEroCLejj3yJ3XHDqt0rMzeSA295gMKEx6Ww,43955
|
|
23
23
|
modal/call_graph.py,sha256=1g2DGcMIJvRy-xKicuf63IVE98gJSnQsr8R_NVMptNc,2581
|
|
24
24
|
modal/client.py,sha256=kyAIVB3Ay-XKJizQ_1ufUFB__EagV0MLmHJpyYyJ7J0,18636
|
|
25
|
-
modal/client.pyi,sha256=
|
|
25
|
+
modal/client.pyi,sha256=ERPexcP0zfYYciLWDMLica2fbkF93eS3sFmiUipYC0E,15831
|
|
26
26
|
modal/cloud_bucket_mount.py,sha256=YOe9nnvSr4ZbeCn587d7_VhE9IioZYRvF9VYQTQux08,5914
|
|
27
27
|
modal/cloud_bucket_mount.pyi,sha256=-qSfYAQvIoO_l2wsCCGTG5ZUwQieNKXdAO00yP1-LYU,7394
|
|
28
28
|
modal/cls.py,sha256=qb9h_ZKiz2q7fwKQ-5bdkz1x3tdu6sIm-UI09aQjPPc,41101
|
|
@@ -133,7 +133,7 @@ modal/cli/config.py,sha256=lhp2Pq4RbTDhaZJ-ZJvhrMqJj8c-WjuRX6gjE3TrvXc,1691
|
|
|
133
133
|
modal/cli/container.py,sha256=9Ti-TIZ6vjDSmn9mk9h6SRwyhkQjtwirBN18LjpLyvE,3719
|
|
134
134
|
modal/cli/dict.py,sha256=YAJtiv41YcCd5Fqam3hXCNTs4Y0yOgGR_i6RfQNSAFM,4572
|
|
135
135
|
modal/cli/entry_point.py,sha256=F06p54rPOs1xAUeYW76RaimFOgLW_I17RCvNwfZRqPc,4747
|
|
136
|
-
modal/cli/environment.py,sha256=
|
|
136
|
+
modal/cli/environment.py,sha256=QD1el4c1ALlTU5aN3e67SQt2E5sH7gPdXlBf9VHW2yI,4358
|
|
137
137
|
modal/cli/import_refs.py,sha256=X59Z5JwgliRO6C-cIFto2Pr7o3SwlZMKQPKA0aI4ZK4,13927
|
|
138
138
|
modal/cli/launch.py,sha256=VARim2SCzgtI1ZuxQ6JgTTtvFwGA5czCwQZQHWC8Zcc,6498
|
|
139
139
|
modal/cli/network_file_system.py,sha256=I9IqTpVfk32uKYwGd8LTldkQx6UKYrQYNZ26q7Ab5Oo,8126
|
|
@@ -153,7 +153,7 @@ modal/experimental/__init__.py,sha256=fCqzo_f3vcY750vHtd7CtLs5dvdM_C0ZLLGb3zXuK9
|
|
|
153
153
|
modal/experimental/flash.py,sha256=7qRAL2Nrwbb60YKobcnpM0zJ8vw4xGJqabLPFgEzMZE,28295
|
|
154
154
|
modal/experimental/flash.pyi,sha256=R9VV0UDotiY9BRUjacB-xI4qhR3yBymAvEZFRFHztLs,15143
|
|
155
155
|
modal/experimental/ipython.py,sha256=TrCfmol9LGsRZMeDoeMPx3Hv3BFqQhYnmD_iH0pqdhk,2904
|
|
156
|
-
modal-1.1.5.
|
|
156
|
+
modal-1.1.5.dev28.dist-info/licenses/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
|
|
157
157
|
modal_docs/__init__.py,sha256=svYKtV8HDwDCN86zbdWqyq5T8sMdGDj0PVlzc2tIxDM,28
|
|
158
158
|
modal_docs/gen_cli_docs.py,sha256=c1yfBS_x--gL5bs0N4ihMwqwX8l3IBWSkBAKNNIi6bQ,3801
|
|
159
159
|
modal_docs/gen_reference_docs.py,sha256=d_CQUGQ0rfw28u75I2mov9AlS773z9rG40-yq5o7g2U,6359
|
|
@@ -161,10 +161,10 @@ modal_docs/mdmd/__init__.py,sha256=svYKtV8HDwDCN86zbdWqyq5T8sMdGDj0PVlzc2tIxDM,2
|
|
|
161
161
|
modal_docs/mdmd/mdmd.py,sha256=tUTImNd4UMFk1opkaw8J672gX8AkBO5gbY2S_NMxsxs,7140
|
|
162
162
|
modal_docs/mdmd/signatures.py,sha256=XJaZrK7Mdepk5fdX51A8uENiLFNil85Ud0d4MH8H5f0,3218
|
|
163
163
|
modal_proto/__init__.py,sha256=MIEP8jhXUeGq_eCjYFcqN5b1bxBM4fdk0VESpjWR0fc,28
|
|
164
|
-
modal_proto/api.proto,sha256=
|
|
164
|
+
modal_proto/api.proto,sha256=ErkLFUHFijjHu2YmfCf97HlNINhJbyAc3ZDL0aklrcQ,107845
|
|
165
165
|
modal_proto/api_grpc.py,sha256=aGfpsti-PnCuhHhvm-c8fSJyOkU4TWc8x8ydNkBrlec,130453
|
|
166
|
-
modal_proto/api_pb2.py,sha256=
|
|
167
|
-
modal_proto/api_pb2.pyi,sha256=
|
|
166
|
+
modal_proto/api_pb2.py,sha256=Z7ECidhHjE362FACziTcoog_grxi1jMqEkkGZMoqUkE,375848
|
|
167
|
+
modal_proto/api_pb2.pyi,sha256=eCZ1CgfewHEzGnFlSyZjhEnxBwlj7skIfD0Xg1aQB0M,520494
|
|
168
168
|
modal_proto/api_pb2_grpc.py,sha256=6QxudogSTZsePhr-pgXB8gIQdr4mkQ9yDKAhBH0G8lQ,281250
|
|
169
169
|
modal_proto/api_pb2_grpc.pyi,sha256=_jvw6GQVcGKDdxH0pLBDkIX3cQp9xaNYPSRoAq4McSg,65882
|
|
170
170
|
modal_proto/modal_api_grpc.py,sha256=A2Lpntle2d4zsBSpCQ-oR839lUppW0npyGlxEoGYCuM,19679
|
|
@@ -176,10 +176,10 @@ modal_proto/options_pb2.pyi,sha256=l7DBrbLO7q3Ir-XDkWsajm0d0TQqqrfuX54i4BMpdQg,1
|
|
|
176
176
|
modal_proto/options_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDCNMhZD2VXqocC9l_gk,159
|
|
177
177
|
modal_proto/options_pb2_grpc.pyi,sha256=CImmhxHsYnF09iENPoe8S4J-n93jtgUYD2JPAc0yJSI,247
|
|
178
178
|
modal_proto/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
179
|
-
modal_version/__init__.py,sha256=
|
|
179
|
+
modal_version/__init__.py,sha256=39FvBUX7rltkfsID9MRHvaN3xXyv-XWbhyyHhg-9bkA,121
|
|
180
180
|
modal_version/__main__.py,sha256=2FO0yYQQwDTh6udt1h-cBnGd1c4ZyHnHSI4BksxzVac,105
|
|
181
|
-
modal-1.1.5.
|
|
182
|
-
modal-1.1.5.
|
|
183
|
-
modal-1.1.5.
|
|
184
|
-
modal-1.1.5.
|
|
185
|
-
modal-1.1.5.
|
|
181
|
+
modal-1.1.5.dev28.dist-info/METADATA,sha256=rP1W0rysDyvMLQtlKiHDGJchV4FcgD4vg1uIGPxgA3Q,2460
|
|
182
|
+
modal-1.1.5.dev28.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
|
|
183
|
+
modal-1.1.5.dev28.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
|
|
184
|
+
modal-1.1.5.dev28.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
|
|
185
|
+
modal-1.1.5.dev28.dist-info/RECORD,,
|
modal_proto/api.proto
CHANGED
|
@@ -111,6 +111,7 @@ enum DataFormat {
|
|
|
111
111
|
DATA_FORMAT_PICKLE = 1; // Cloudpickle
|
|
112
112
|
DATA_FORMAT_ASGI = 2; // "Asgi" protobuf message
|
|
113
113
|
DATA_FORMAT_GENERATOR_DONE = 3; // "GeneratorDone" protobuf message
|
|
114
|
+
DATA_FORMAT_CBOR = 4;
|
|
114
115
|
}
|
|
115
116
|
|
|
116
117
|
enum DeploymentNamespace {
|
|
@@ -1504,6 +1505,8 @@ message Function {
|
|
|
1504
1505
|
bool enable_gpu_snapshot = 85; // GPU memory snapshotting (alpha)
|
|
1505
1506
|
|
|
1506
1507
|
uint32 startup_timeout_secs = 86;
|
|
1508
|
+
repeated DataFormat supported_input_formats = 87; // can be used as inputs
|
|
1509
|
+
repeated DataFormat supported_output_formats = 88;
|
|
1507
1510
|
}
|
|
1508
1511
|
|
|
1509
1512
|
message FunctionAsyncInvokeRequest {
|
|
@@ -1679,6 +1682,8 @@ message FunctionData {
|
|
|
1679
1682
|
string flash_service_label = 35;
|
|
1680
1683
|
|
|
1681
1684
|
uint32 startup_timeout_secs = 36;
|
|
1685
|
+
repeated DataFormat supported_input_formats = 37;
|
|
1686
|
+
repeated DataFormat supported_output_formats = 38;
|
|
1682
1687
|
}
|
|
1683
1688
|
|
|
1684
1689
|
message FunctionExtended {
|
|
@@ -1828,6 +1833,8 @@ message FunctionHandleMetadata {
|
|
|
1828
1833
|
// Use optional to ensure unset values default to None instead of 0
|
|
1829
1834
|
optional uint64 max_object_size_bytes = 48;
|
|
1830
1835
|
repeated string _experimental_flash_urls = 49; // (Optional) urls for flash services
|
|
1836
|
+
repeated DataFormat supported_input_formats = 50;
|
|
1837
|
+
repeated DataFormat supported_output_formats = 51;
|
|
1831
1838
|
}
|
|
1832
1839
|
|
|
1833
1840
|
message FunctionInput {
|
|
@@ -1892,6 +1899,8 @@ message FunctionPrecreateRequest {
|
|
|
1892
1899
|
// Mapping of method names to method definitions, only non-empty for class service functions
|
|
1893
1900
|
map<string, MethodDefinition> method_definitions = 8;
|
|
1894
1901
|
FunctionSchema function_schema = 9;
|
|
1902
|
+
repeated DataFormat supported_input_formats = 10;
|
|
1903
|
+
repeated DataFormat supported_output_formats = 11;
|
|
1895
1904
|
}
|
|
1896
1905
|
|
|
1897
1906
|
message FunctionPrecreateResponse {
|
|
@@ -2230,6 +2239,8 @@ message MethodDefinition {
|
|
|
2230
2239
|
WebUrlInfo web_url_info = 5;
|
|
2231
2240
|
repeated CustomDomainInfo custom_domain_info = 6;
|
|
2232
2241
|
FunctionSchema function_schema = 7;
|
|
2242
|
+
repeated DataFormat supported_input_formats = 8;
|
|
2243
|
+
repeated DataFormat supported_output_formats = 9;
|
|
2233
2244
|
}
|
|
2234
2245
|
|
|
2235
2246
|
message MountFile {
|