modal 1.1.1.dev10__py3-none-any.whl → 1.1.1.dev11__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/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.1.dev10",
36
+ version: str = "1.1.1.dev11",
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.1.1.dev10",
166
+ version: str = "1.1.1.dev11",
167
167
  ):
168
168
  """mdmd:hidden
169
169
  The Modal client object is not intended to be instantiated directly by users.
modal/functions.pyi CHANGED
@@ -428,7 +428,7 @@ class Function(
428
428
 
429
429
  _call_generator: ___call_generator_spec[typing_extensions.Self]
430
430
 
431
- class __remote_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
431
+ class __remote_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER, SUPERSELF]):
432
432
  def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER:
433
433
  """Calls the function remotely, executing it with the given arguments and returning the execution's result."""
434
434
  ...
@@ -437,7 +437,7 @@ class Function(
437
437
  """Calls the function remotely, executing it with the given arguments and returning the execution's result."""
438
438
  ...
439
439
 
440
- remote: __remote_spec[modal._functions.P, modal._functions.ReturnType, typing_extensions.Self]
440
+ remote: __remote_spec[modal._functions.ReturnType, modal._functions.P, typing_extensions.Self]
441
441
 
442
442
  class __remote_gen_spec(typing_extensions.Protocol[SUPERSELF]):
443
443
  def __call__(self, /, *args, **kwargs) -> typing.Generator[typing.Any, None, None]:
@@ -464,7 +464,7 @@ class Function(
464
464
  """
465
465
  ...
466
466
 
467
- class ___experimental_spawn_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
467
+ class ___experimental_spawn_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER, SUPERSELF]):
468
468
  def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]:
469
469
  """[Experimental] Calls the function with the given arguments, without waiting for the results.
470
470
 
@@ -488,7 +488,7 @@ class Function(
488
488
  ...
489
489
 
490
490
  _experimental_spawn: ___experimental_spawn_spec[
491
- modal._functions.P, modal._functions.ReturnType, typing_extensions.Self
491
+ modal._functions.ReturnType, modal._functions.P, typing_extensions.Self
492
492
  ]
493
493
 
494
494
  class ___spawn_map_inner_spec(typing_extensions.Protocol[P_INNER, SUPERSELF]):
@@ -497,7 +497,7 @@ class Function(
497
497
 
498
498
  _spawn_map_inner: ___spawn_map_inner_spec[modal._functions.P, typing_extensions.Self]
499
499
 
500
- class __spawn_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
500
+ class __spawn_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER, SUPERSELF]):
501
501
  def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]:
502
502
  """Calls the function with the given arguments, without waiting for the results.
503
503
 
@@ -518,7 +518,7 @@ class Function(
518
518
  """
519
519
  ...
520
520
 
521
- spawn: __spawn_spec[modal._functions.P, modal._functions.ReturnType, typing_extensions.Self]
521
+ spawn: __spawn_spec[modal._functions.ReturnType, modal._functions.P, typing_extensions.Self]
522
522
 
523
523
  def get_raw_f(self) -> collections.abc.Callable[..., typing.Any]:
524
524
  """Return the inner Python object wrapped by this Modal Function."""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: modal
3
- Version: 1.1.1.dev10
3
+ Version: 1.1.1.dev11
4
4
  Summary: Python client library for Modal
5
5
  Author-email: Modal Labs <support@modal.com>
6
6
  License: Apache-2.0
@@ -22,7 +22,7 @@ modal/app.py,sha256=BBR2NmGzZbFGfhKAmtzllD0o4TbVDBbOEs0O2ysSdQo,48277
22
22
  modal/app.pyi,sha256=h6JtBA6a7wobdZAuS3QuXrWCUZqfyKPuGV3XdjCqT3k,43753
23
23
  modal/call_graph.py,sha256=1g2DGcMIJvRy-xKicuf63IVE98gJSnQsr8R_NVMptNc,2581
24
24
  modal/client.py,sha256=pBSZ7lv5dezIL9U9H4tpE0Yz6qA1n0NoNbnJ3KCQMMA,18252
25
- modal/client.pyi,sha256=KeyQ4EBjOjjQ4595mxR2Dyl-5bXuS9t-ixUEm4ehhzc,15390
25
+ modal/client.pyi,sha256=6XCqQQIWp-h6J59QPjDwBOKKVz3-LFlp1yOskRtdNDI,15390
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=7A0xGnugQzm8dOfnKMjLjtqekRlRtQ0jPFRYgq6xdUM,40018
@@ -39,7 +39,7 @@ modal/file_io.py,sha256=BVqAJ0sgPUfN8QsYztWiGB4j56he60TncM02KsylnCw,21449
39
39
  modal/file_io.pyi,sha256=cPT_hsplE5iLCXhYOLn1Sp9eDdk7DxdFmicQHanJZyg,15918
40
40
  modal/file_pattern_matcher.py,sha256=urAue8es8jxqX94k9EYoZxxhtfgOlsEES8lbFHOorzc,7734
41
41
  modal/functions.py,sha256=kcNHvqeGBxPI7Cgd57NIBBghkfbeFJzXO44WW0jSmao,325
42
- modal/functions.pyi,sha256=sht8252nY3f7y20vURdjz4R-NU0_EvHjHVl97PQ1t_4,34823
42
+ modal/functions.pyi,sha256=0P4f8ew79lf0lWXObYmNFxKoUPbWmoT0CD5IqGNKFhE,34823
43
43
  modal/gpu.py,sha256=Fe5ORvVPDIstSq1xjmM6OoNgLYFWvogP9r5BgmD3hYg,6769
44
44
  modal/image.py,sha256=0E3Tge4W3JLS-8dzFy1AVlkdccMhYs3TQkv5kQwv3G0,102368
45
45
  modal/image.pyi,sha256=s_AQaFoWmjLzffJGmiedFf9K1qQkedVIlsC6vRtlKS8,68161
@@ -151,7 +151,7 @@ modal/requirements/2025.06.txt,sha256=KxDaVTOwatHvboDo4lorlgJ7-n-MfAwbPwxJ0zcJqr
151
151
  modal/requirements/PREVIEW.txt,sha256=KxDaVTOwatHvboDo4lorlgJ7-n-MfAwbPwxJ0zcJqrs,312
152
152
  modal/requirements/README.md,sha256=9tK76KP0Uph7O0M5oUgsSwEZDj5y-dcUPsnpR0Sc-Ik,854
153
153
  modal/requirements/base-images.json,sha256=JYSDAgHTl-WrV_TZW5icY-IJEnbe2eQ4CZ_KN6EOZKU,1304
154
- modal-1.1.1.dev10.dist-info/licenses/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
154
+ modal-1.1.1.dev11.dist-info/licenses/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
155
155
  modal_docs/__init__.py,sha256=svYKtV8HDwDCN86zbdWqyq5T8sMdGDj0PVlzc2tIxDM,28
156
156
  modal_docs/gen_cli_docs.py,sha256=c1yfBS_x--gL5bs0N4ihMwqwX8l3IBWSkBAKNNIi6bQ,3801
157
157
  modal_docs/gen_reference_docs.py,sha256=d_CQUGQ0rfw28u75I2mov9AlS773z9rG40-yq5o7g2U,6359
@@ -159,13 +159,13 @@ modal_docs/mdmd/__init__.py,sha256=svYKtV8HDwDCN86zbdWqyq5T8sMdGDj0PVlzc2tIxDM,2
159
159
  modal_docs/mdmd/mdmd.py,sha256=eW5MzrEl7mSclDo4Uv64sQ1-4IyLggldbgUJdBVLDdI,6449
160
160
  modal_docs/mdmd/signatures.py,sha256=XJaZrK7Mdepk5fdX51A8uENiLFNil85Ud0d4MH8H5f0,3218
161
161
  modal_proto/__init__.py,sha256=MIEP8jhXUeGq_eCjYFcqN5b1bxBM4fdk0VESpjWR0fc,28
162
- modal_proto/api.proto,sha256=Do5Ytjhz27H3vkJs7Y8T_GbbX2sM_KqFPq5hBXBQmes,100042
163
- modal_proto/api_grpc.py,sha256=F7Hu-1Yg7p5a2SbKw9yR4AgpyU0ntvgZTaVbIJMR0DE,122366
164
- modal_proto/api_pb2.py,sha256=hBn8XwlwHyAyrVYQBxz6nt8iAv5hy8aegT_aMmHAtJk,351460
165
- modal_proto/api_pb2.pyi,sha256=AmmWyUYLudFvKml_rnAqXRcOaUCN_tQ2LHJUpF14e_k,480136
166
- modal_proto/api_pb2_grpc.py,sha256=pIFrNmCOgRRcIW8A1Ekja9Po6fHcsj54ExDZFzTpYe4,264347
167
- modal_proto/api_pb2_grpc.pyi,sha256=vtxrQ9xnQG6ZRXjp2uk43Mb7wV7F4qGYuVl5JUBc8jI,61968
168
- modal_proto/modal_api_grpc.py,sha256=Yl_fGbSIuX2FAEnURkYpKqshs7kbNqtz5HlTJEXkbhE,18487
162
+ modal_proto/api.proto,sha256=ffh0G4zLQTKLCT4lSTg8z_ndjIIdk_UuqtQCoTF2yO0,101413
163
+ modal_proto/api_grpc.py,sha256=AL8Z1zlvrsqrxXYEv_mKroJArPV7_8eQ2bMvvswDlTQ,123880
164
+ modal_proto/api_pb2.py,sha256=nDzUdLnJZusqy6WUMBxYOHG-R5mnZgyzdt2AVSbDdR8,355572
165
+ modal_proto/api_pb2.pyi,sha256=1KudI7XZlEzOXBXmYIjQLyqpNJ3c3-fJ5U5lX76W3OE,487293
166
+ modal_proto/api_pb2_grpc.py,sha256=QmhsoHLD9BBXVl3ZpIb-0_sZzpQ1Q9OLBU7ONHHojG4,267607
167
+ modal_proto/api_pb2_grpc.pyi,sha256=Wy6NAO-o06jbQHxvZiMAi08QQT8VHUJcSAmlRRL0p1M,62762
168
+ modal_proto/modal_api_grpc.py,sha256=A622btdK6V3CFaZfXK63ocCUlulKYJsgM-rcEPEFv24,18703
169
169
  modal_proto/modal_options_grpc.py,sha256=qJ1cuwA54oRqrdTyPTbvfhFZYd9HhJKK5UCwt523r3Y,120
170
170
  modal_proto/options.proto,sha256=zp9h5r61ivsp0XwEWwNBsVqNTbRA1VSY_UtN7sEcHtE,549
171
171
  modal_proto/options_grpc.py,sha256=M18X3d-8F_cNYSVM3I25dUTO5rZ0rd-vCCfynfh13Nc,125
@@ -174,10 +174,10 @@ modal_proto/options_pb2.pyi,sha256=l7DBrbLO7q3Ir-XDkWsajm0d0TQqqrfuX54i4BMpdQg,1
174
174
  modal_proto/options_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDCNMhZD2VXqocC9l_gk,159
175
175
  modal_proto/options_pb2_grpc.pyi,sha256=CImmhxHsYnF09iENPoe8S4J-n93jtgUYD2JPAc0yJSI,247
176
176
  modal_proto/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
177
- modal_version/__init__.py,sha256=wk5StIObPUEFCVGa0FZBHdGZnxjFWjlqHz9S27c_78E,121
177
+ modal_version/__init__.py,sha256=osH-Mr-vP1BcrvR9tP0Qjq2q-_JHabM7fscFI5ZQQTE,121
178
178
  modal_version/__main__.py,sha256=2FO0yYQQwDTh6udt1h-cBnGd1c4ZyHnHSI4BksxzVac,105
179
- modal-1.1.1.dev10.dist-info/METADATA,sha256=gDLnUpMx_CBQh3JaAy2F4sO0fRrqFxaZaRjHY9CcKoM,2462
180
- modal-1.1.1.dev10.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
181
- modal-1.1.1.dev10.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
182
- modal-1.1.1.dev10.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
183
- modal-1.1.1.dev10.dist-info/RECORD,,
179
+ modal-1.1.1.dev11.dist-info/METADATA,sha256=kR_ESJByhSqOoTMn7vBfXXgBK_5tcj3x-dDmE8MAidc,2462
180
+ modal-1.1.1.dev11.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
181
+ modal-1.1.1.dev11.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
182
+ modal-1.1.1.dev11.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
183
+ modal-1.1.1.dev11.dist-info/RECORD,,
modal_proto/api.proto CHANGED
@@ -611,7 +611,7 @@ message AttemptStartRequest {
611
611
 
612
612
  message AttemptStartResponse {
613
613
  string attempt_token = 1;
614
- FunctionRetryPolicy retry_policy = 2;
614
+ FunctionRetryPolicy retry_policy = 2; // TODO(ben-okeefe) TODO(nathan): Not currently used
615
615
  }
616
616
 
617
617
  message AuthTokenGetRequest {
@@ -1651,6 +1651,7 @@ message FunctionGetInputsItem {
1651
1651
  string function_call_id = 5;
1652
1652
  FunctionCallInvocationType function_call_invocation_type = 6;
1653
1653
  uint32 retry_count = 7;
1654
+ optional int32 function_map_idx = 8; // intercepted and only used by the worker.
1654
1655
  }
1655
1656
 
1656
1657
  message FunctionGetInputsRequest {
@@ -1843,6 +1844,8 @@ message FunctionPutOutputsItem {
1843
1844
  double output_created_at = 4;
1844
1845
  DataFormat data_format = 7; // for result.data_oneof
1845
1846
  uint32 retry_count = 8;
1847
+ string function_call_id = 9; // injected by the worker
1848
+ optional int32 function_map_idx = 10; // injected by the worker
1846
1849
  }
1847
1850
 
1848
1851
  message FunctionPutOutputsRequest {
@@ -2070,6 +2073,38 @@ message InputInfo {
2070
2073
  bool task_first_input = 7;
2071
2074
  }
2072
2075
 
2076
+ message MapAwaitRequest {
2077
+ string function_call_id = 1;
2078
+ string last_entry_id = 2;
2079
+ double requested_at = 3; // Used for waypoints.
2080
+ float timeout = 4;
2081
+ }
2082
+
2083
+ message MapAwaitResponse {
2084
+ repeated FunctionGetOutputsItem outputs = 1;
2085
+ string last_entry_id = 2;
2086
+ }
2087
+
2088
+ message MapStartOrContinueItem {
2089
+ FunctionPutInputsItem input = 1;
2090
+ optional string attempt_token = 2; // None if this is a fresh input, otherwise it is the attempt token for a retry.
2091
+ }
2092
+
2093
+ message MapStartOrContinueRequest {
2094
+ string function_id = 1;
2095
+ string parent_input_id = 2;
2096
+ optional string function_call_id = 3; // This is given iff this is a map continue request.
2097
+ repeated MapStartOrContinueItem items = 4;
2098
+ }
2099
+
2100
+ message MapStartOrContinueResponse {
2101
+ string function_id = 1;
2102
+ string function_call_id = 2;
2103
+ uint32 max_inputs_outstanding = 3;
2104
+ repeated string attempt_tokens = 4;
2105
+ FunctionRetryPolicy retry_policy = 5; // TODO(ben-okeefe): Not currently used
2106
+ }
2107
+
2073
2108
  message MethodDefinition {
2074
2109
  string function_name = 1;
2075
2110
  Function.FunctionType function_type = 2;
@@ -3397,6 +3432,10 @@ service ModalClient {
3397
3432
  rpc ImageGetOrCreate(ImageGetOrCreateRequest) returns (ImageGetOrCreateResponse);
3398
3433
  rpc ImageJoinStreaming(ImageJoinStreamingRequest) returns (stream ImageJoinStreamingResponse);
3399
3434
 
3435
+ // Input Plane Map
3436
+ rpc MapAwait(MapAwaitRequest) returns (MapAwaitResponse);
3437
+ rpc MapStartOrContinue(MapStartOrContinueRequest) returns (MapStartOrContinueResponse);
3438
+
3400
3439
  // Mounts
3401
3440
  rpc MountGetOrCreate(MountGetOrCreateRequest) returns (MountGetOrCreateResponse);
3402
3441
  rpc MountPutFile(MountPutFileRequest) returns (MountPutFileResponse);
modal_proto/api_grpc.py CHANGED
@@ -362,6 +362,14 @@ class ModalClientBase(abc.ABC):
362
362
  async def ImageJoinStreaming(self, stream: 'grpclib.server.Stream[modal_proto.api_pb2.ImageJoinStreamingRequest, modal_proto.api_pb2.ImageJoinStreamingResponse]') -> None:
363
363
  pass
364
364
 
365
+ @abc.abstractmethod
366
+ async def MapAwait(self, stream: 'grpclib.server.Stream[modal_proto.api_pb2.MapAwaitRequest, modal_proto.api_pb2.MapAwaitResponse]') -> None:
367
+ pass
368
+
369
+ @abc.abstractmethod
370
+ async def MapStartOrContinue(self, stream: 'grpclib.server.Stream[modal_proto.api_pb2.MapStartOrContinueRequest, modal_proto.api_pb2.MapStartOrContinueResponse]') -> None:
371
+ pass
372
+
365
373
  @abc.abstractmethod
366
374
  async def MountGetOrCreate(self, stream: 'grpclib.server.Stream[modal_proto.api_pb2.MountGetOrCreateRequest, modal_proto.api_pb2.MountGetOrCreateResponse]') -> None:
367
375
  pass
@@ -1172,6 +1180,18 @@ class ModalClientBase(abc.ABC):
1172
1180
  modal_proto.api_pb2.ImageJoinStreamingRequest,
1173
1181
  modal_proto.api_pb2.ImageJoinStreamingResponse,
1174
1182
  ),
1183
+ '/modal.client.ModalClient/MapAwait': grpclib.const.Handler(
1184
+ self.MapAwait,
1185
+ grpclib.const.Cardinality.UNARY_UNARY,
1186
+ modal_proto.api_pb2.MapAwaitRequest,
1187
+ modal_proto.api_pb2.MapAwaitResponse,
1188
+ ),
1189
+ '/modal.client.ModalClient/MapStartOrContinue': grpclib.const.Handler(
1190
+ self.MapStartOrContinue,
1191
+ grpclib.const.Cardinality.UNARY_UNARY,
1192
+ modal_proto.api_pb2.MapStartOrContinueRequest,
1193
+ modal_proto.api_pb2.MapStartOrContinueResponse,
1194
+ ),
1175
1195
  '/modal.client.ModalClient/MountGetOrCreate': grpclib.const.Handler(
1176
1196
  self.MountGetOrCreate,
1177
1197
  grpclib.const.Cardinality.UNARY_UNARY,
@@ -2132,6 +2152,18 @@ class ModalClientStub:
2132
2152
  modal_proto.api_pb2.ImageJoinStreamingRequest,
2133
2153
  modal_proto.api_pb2.ImageJoinStreamingResponse,
2134
2154
  )
2155
+ self.MapAwait = grpclib.client.UnaryUnaryMethod(
2156
+ channel,
2157
+ '/modal.client.ModalClient/MapAwait',
2158
+ modal_proto.api_pb2.MapAwaitRequest,
2159
+ modal_proto.api_pb2.MapAwaitResponse,
2160
+ )
2161
+ self.MapStartOrContinue = grpclib.client.UnaryUnaryMethod(
2162
+ channel,
2163
+ '/modal.client.ModalClient/MapStartOrContinue',
2164
+ modal_proto.api_pb2.MapStartOrContinueRequest,
2165
+ modal_proto.api_pb2.MapStartOrContinueResponse,
2166
+ )
2135
2167
  self.MountGetOrCreate = grpclib.client.UnaryUnaryMethod(
2136
2168
  channel,
2137
2169
  '/modal.client.ModalClient/MountGetOrCreate',