modal 1.1.5.dev25__py3-none-any.whl → 1.1.5.dev27__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 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=partial_function._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/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.dev25",
36
+ version: str = "1.1.5.dev27",
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.dev25",
167
+ version: str = "1.1.5.dev27",
168
168
  ):
169
169
  """mdmd:hidden
170
170
  The Modal client object is not intended to be instantiated directly by users.
modal/image.py CHANGED
@@ -868,6 +868,68 @@ class _Image(_Object, type_prefix="im"):
868
868
 
869
869
  return obj
870
870
 
871
+ async def build(self, app: "modal.app._App") -> "_Image":
872
+ """Eagerly build an image.
873
+
874
+ If your image was previously built, then this method will not rebuild your image
875
+ and your cached image is returned.
876
+
877
+ **Examples**
878
+
879
+ ```python
880
+ image = modal.Image.debian_slim().uv_pip_install("scipy", "numpy")
881
+
882
+ app = modal.App("build-image")
883
+ with modal.enable_output(), app.run():
884
+ image.build(app)
885
+
886
+ # Save the image id
887
+ my_image_id = image.object_id
888
+
889
+ # Reference the image with the id or uses it another context.
890
+ built_image = modal.Image.from_id(my_image_id)
891
+ ```
892
+
893
+ Alternatively, you can pre-build a image and use it in a sandbox.
894
+
895
+ ```python notest
896
+ app = modal.App.lookup("sandbox-example")
897
+
898
+ with modal.enable_output():
899
+ image = modal.Image.debian_slim().uv_pip_install("scipy")
900
+ image.build(app)
901
+
902
+ sb = modal.Sandbox.create("python", "-c", "import scipy; print(scipy)", app=app, image=image)
903
+ print(sb.stdout.read())
904
+ sb.terminate()
905
+ ```
906
+
907
+ **Note**
908
+
909
+ For defining Modal functions, images are built automatically when deploying or running an App.
910
+ You do not need to built the image explicitly:
911
+
912
+ ```python notest
913
+ app = modal.App()
914
+ image = modal.Image.debian_slim()
915
+
916
+ # No need to explicitly build the image for defining a function.
917
+ @app.function(image=image)
918
+ def f():
919
+ ...
920
+ ```
921
+
922
+ """
923
+ if app.app_id is None:
924
+ raise InvalidError("App has not been initialized yet. Use the content manager `app.run()` or `App.lookup`")
925
+
926
+ app_id = app.app_id
927
+ app_client = app._client or await _Client.from_env()
928
+
929
+ resolver = Resolver(app_client, app_id=app_id)
930
+ await resolver.load(self)
931
+ return self
932
+
871
933
  def pip_install(
872
934
  self,
873
935
  *packages: Union[str, list[str]], # A list of Python packages, eg. ["numpy", "matplotlib>=3.5.0"]
modal/image.pyi CHANGED
@@ -2,6 +2,7 @@ import collections.abc
2
2
  import google.protobuf.message
3
3
  import modal._functions
4
4
  import modal._object
5
+ import modal.app
5
6
  import modal.client
6
7
  import modal.cloud_bucket_mount
7
8
  import modal.functions
@@ -318,6 +319,59 @@ class _Image(modal._object._Object):
318
319
  """
319
320
  ...
320
321
 
322
+ async def build(self, app: modal.app._App) -> _Image:
323
+ """Eagerly build an image.
324
+
325
+ If your image was previously built, then this method will not rebuild your image
326
+ and your cached image is returned.
327
+
328
+ **Examples**
329
+
330
+ ```python
331
+ image = modal.Image.debian_slim().uv_pip_install("scipy", "numpy")
332
+
333
+ app = modal.App("build-image")
334
+ with modal.enable_output(), app.run():
335
+ image.build(app)
336
+
337
+ # Save the image id
338
+ my_image_id = image.object_id
339
+
340
+ # Reference the image with the id or uses it another context.
341
+ built_image = modal.Image.from_id(my_image_id)
342
+ ```
343
+
344
+ Alternatively, you can pre-build a image and use it in a sandbox.
345
+
346
+ ```python notest
347
+ app = modal.App.lookup("sandbox-example")
348
+
349
+ with modal.enable_output():
350
+ image = modal.Image.debian_slim().uv_pip_install("scipy")
351
+ image.build(app)
352
+
353
+ sb = modal.Sandbox.create("python", "-c", "import scipy; print(scipy)", app=app, image=image)
354
+ print(sb.stdout.read())
355
+ sb.terminate()
356
+ ```
357
+
358
+ **Note**
359
+
360
+ For defining Modal functions, images are built automatically when deploying or running an App.
361
+ You do not need to built the image explicitly:
362
+
363
+ ```python notest
364
+ app = modal.App()
365
+ image = modal.Image.debian_slim()
366
+
367
+ # No need to explicitly build the image for defining a function.
368
+ @app.function(image=image)
369
+ def f():
370
+ ...
371
+ ```
372
+ """
373
+ ...
374
+
321
375
  def pip_install(
322
376
  self,
323
377
  *packages: typing.Union[str, list[str]],
@@ -1182,6 +1236,115 @@ class Image(modal.object.Object):
1182
1236
 
1183
1237
  from_id: __from_id_spec
1184
1238
 
1239
+ class __build_spec(typing_extensions.Protocol[SUPERSELF]):
1240
+ def __call__(self, /, app: modal.app.App) -> Image:
1241
+ """Eagerly build an image.
1242
+
1243
+ If your image was previously built, then this method will not rebuild your image
1244
+ and your cached image is returned.
1245
+
1246
+ **Examples**
1247
+
1248
+ ```python
1249
+ image = modal.Image.debian_slim().uv_pip_install("scipy", "numpy")
1250
+
1251
+ app = modal.App("build-image")
1252
+ with modal.enable_output(), app.run():
1253
+ image.build(app)
1254
+
1255
+ # Save the image id
1256
+ my_image_id = image.object_id
1257
+
1258
+ # Reference the image with the id or uses it another context.
1259
+ built_image = modal.Image.from_id(my_image_id)
1260
+ ```
1261
+
1262
+ Alternatively, you can pre-build a image and use it in a sandbox.
1263
+
1264
+ ```python notest
1265
+ app = modal.App.lookup("sandbox-example")
1266
+
1267
+ with modal.enable_output():
1268
+ image = modal.Image.debian_slim().uv_pip_install("scipy")
1269
+ image.build(app)
1270
+
1271
+ sb = modal.Sandbox.create("python", "-c", "import scipy; print(scipy)", app=app, image=image)
1272
+ print(sb.stdout.read())
1273
+ sb.terminate()
1274
+ ```
1275
+
1276
+ **Note**
1277
+
1278
+ For defining Modal functions, images are built automatically when deploying or running an App.
1279
+ You do not need to built the image explicitly:
1280
+
1281
+ ```python notest
1282
+ app = modal.App()
1283
+ image = modal.Image.debian_slim()
1284
+
1285
+ # No need to explicitly build the image for defining a function.
1286
+ @app.function(image=image)
1287
+ def f():
1288
+ ...
1289
+ ```
1290
+ """
1291
+ ...
1292
+
1293
+ async def aio(self, /, app: modal.app.App) -> Image:
1294
+ """Eagerly build an image.
1295
+
1296
+ If your image was previously built, then this method will not rebuild your image
1297
+ and your cached image is returned.
1298
+
1299
+ **Examples**
1300
+
1301
+ ```python
1302
+ image = modal.Image.debian_slim().uv_pip_install("scipy", "numpy")
1303
+
1304
+ app = modal.App("build-image")
1305
+ with modal.enable_output(), app.run():
1306
+ image.build(app)
1307
+
1308
+ # Save the image id
1309
+ my_image_id = image.object_id
1310
+
1311
+ # Reference the image with the id or uses it another context.
1312
+ built_image = modal.Image.from_id(my_image_id)
1313
+ ```
1314
+
1315
+ Alternatively, you can pre-build a image and use it in a sandbox.
1316
+
1317
+ ```python notest
1318
+ app = modal.App.lookup("sandbox-example")
1319
+
1320
+ with modal.enable_output():
1321
+ image = modal.Image.debian_slim().uv_pip_install("scipy")
1322
+ image.build(app)
1323
+
1324
+ sb = modal.Sandbox.create("python", "-c", "import scipy; print(scipy)", app=app, image=image)
1325
+ print(sb.stdout.read())
1326
+ sb.terminate()
1327
+ ```
1328
+
1329
+ **Note**
1330
+
1331
+ For defining Modal functions, images are built automatically when deploying or running an App.
1332
+ You do not need to built the image explicitly:
1333
+
1334
+ ```python notest
1335
+ app = modal.App()
1336
+ image = modal.Image.debian_slim()
1337
+
1338
+ # No need to explicitly build the image for defining a function.
1339
+ @app.function(image=image)
1340
+ def f():
1341
+ ...
1342
+ ```
1343
+ """
1344
+ ...
1345
+
1346
+ build: __build_spec[typing_extensions.Self]
1347
+
1185
1348
  def pip_install(
1186
1349
  self,
1187
1350
  *packages: typing.Union[str, list[str]],
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: modal
3
- Version: 1.1.5.dev25
3
+ Version: 1.1.5.dev27
4
4
  Summary: Python client library for Modal
5
5
  Author-email: Modal Labs <support@modal.com>
6
6
  License: Apache-2.0
@@ -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=1ZG8TvI3TTByfzArrjSww6pQB1iH4be0I3yQfkMfgAY,89780
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=vkefOASnpZRE8T-EGMSJhS5Ng2EQ1uldJE7P2DGYheI,15831
25
+ modal/client.pyi,sha256=EU3qHAoaW25Fy4qZDwmSOzBdfg6xE45KylfBZqQCi-I,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
@@ -41,8 +41,8 @@ modal/file_pattern_matcher.py,sha256=A_Kdkej6q7YQyhM_2-BvpFmPqJ0oHb54B6yf9VqvPVE
41
41
  modal/functions.py,sha256=kcNHvqeGBxPI7Cgd57NIBBghkfbeFJzXO44WW0jSmao,325
42
42
  modal/functions.pyi,sha256=_xKitEUTNQStdZVtYBgWidtyHHsnjXUYgbirM0eMDyM,39558
43
43
  modal/gpu.py,sha256=Fe5ORvVPDIstSq1xjmM6OoNgLYFWvogP9r5BgmD3hYg,6769
44
- modal/image.py,sha256=wlOJ4bQxFLx2PlIIAmqZnFxFeERbZJGLYYWO7wlIZso,105969
45
- modal/image.pyi,sha256=iFC8W6bl3KH_w15pm7B_UqeeGJZ44X7v20Ue_FlxPxw,71695
44
+ modal/image.py,sha256=ioYIpKq4Fi1ojqdIyochyoRU1_Ncto_BSYLKzY88zuw,107883
45
+ modal/image.pyi,sha256=ZNp48mVPzcQ6XNvxin1iO5XrZ89vfEZvU1Bi-V57jq0,76835
46
46
  modal/io_streams.py,sha256=hZOVc5beOAm8S_VQQmmKUbk_BJ9OltN83RY0yMPqUDo,16545
47
47
  modal/io_streams.pyi,sha256=aOun_jUFKHSJyUY6-7gKvNoxzcULsa8_hxdtEO7v-gk,13980
48
48
  modal/mount.py,sha256=3WpYaaCBGLyawW2uhQzB4jXRBQEsuuRMxnCFsXSa9_k,37470
@@ -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.dev25.dist-info/licenses/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
156
+ modal-1.1.5.dev27.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=gHMg2m42_AWoz1cyLFtkIkuCZq1zZS1eD-G8-S7OtjM,107273
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=toZb4hKO6C-20AiXATPULVd2C5FjPWN3YB4-p_0fCWQ,374934
167
- modal_proto/api_pb2.pyi,sha256=OshgJzsbZZ6SaxFv7AbTxYDr9PS14rzRbiSs3S7ucHA,516654
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=up2Yl70_orOAkIt8-seLx2WzJoh4xxep0MgfN7-nPvE,121
179
+ modal_version/__init__.py,sha256=UvJrjWlkCwJjf5Q-eRULC3zEIjje_G-QPd6u_Q008ks,121
180
180
  modal_version/__main__.py,sha256=2FO0yYQQwDTh6udt1h-cBnGd1c4ZyHnHSI4BksxzVac,105
181
- modal-1.1.5.dev25.dist-info/METADATA,sha256=4uJTMD2003YFpKzq7tXZct5JXSBdq8-WgjUkVNxOekI,2460
182
- modal-1.1.5.dev25.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
183
- modal-1.1.5.dev25.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
184
- modal-1.1.5.dev25.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
185
- modal-1.1.5.dev25.dist-info/RECORD,,
181
+ modal-1.1.5.dev27.dist-info/METADATA,sha256=OPsXvl3h38PvAmGW0p9Wn6igR4pkpFZktyMmcf4ajks,2460
182
+ modal-1.1.5.dev27.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
183
+ modal-1.1.5.dev27.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
184
+ modal-1.1.5.dev27.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
185
+ modal-1.1.5.dev27.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 {