modal 0.73.162__py3-none-any.whl → 0.73.164__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.
@@ -17,6 +17,7 @@ from typing import (
17
17
  Callable,
18
18
  ClassVar,
19
19
  Optional,
20
+ cast,
20
21
  )
21
22
 
22
23
  from google.protobuf.empty_pb2 import Empty
@@ -115,7 +116,16 @@ class IOContext:
115
116
  method_name = function_inputs[0].method_name
116
117
  assert all(method_name == input.method_name for input in function_inputs)
117
118
  finalized_function = finalized_functions[method_name]
118
- return cls(input_ids, retry_counts, function_call_ids, finalized_function, function_inputs, is_batched, client)
119
+ return cls(
120
+ # Do explicit cast since type checker doesn't understand zip(*inputs)
121
+ cast(list[str], input_ids),
122
+ cast(list[int], retry_counts),
123
+ cast(list[str], function_call_ids),
124
+ finalized_function,
125
+ cast(list[api_pb2.FunctionInput], function_inputs),
126
+ is_batched,
127
+ client,
128
+ )
119
129
 
120
130
  def set_cancel_callback(self, cb: Callable[[], None]):
121
131
  self._cancel_callback = cb
@@ -57,7 +57,7 @@ def wait_for_port(url: str, q: Queue):
57
57
  timeout=args.get("timeout"),
58
58
  secrets=[Secret.from_dict({"MODAL_LAUNCH_ARGS": json.dumps(args)})],
59
59
  volumes=volumes,
60
- concurrency_limit=1 if volume else None,
60
+ max_containers=1 if volume else None,
61
61
  )
62
62
  def run_jupyter(q: Queue):
63
63
  os.makedirs("/root/lab", exist_ok=True)
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.162",
34
+ version: str = "0.73.164",
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.162",
96
+ version: str = "0.73.164",
97
97
  ): ...
98
98
  def is_closed(self) -> bool: ...
99
99
  @property
modal/functions.pyi CHANGED
@@ -200,11 +200,11 @@ class Function(
200
200
 
201
201
  _call_generator_nowait: ___call_generator_nowait_spec[typing_extensions.Self]
202
202
 
203
- class __remote_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
203
+ class __remote_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER, SUPERSELF]):
204
204
  def __call__(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER: ...
205
205
  async def aio(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER: ...
206
206
 
207
- remote: __remote_spec[modal._functions.P, modal._functions.ReturnType, typing_extensions.Self]
207
+ remote: __remote_spec[modal._functions.ReturnType, modal._functions.P, typing_extensions.Self]
208
208
 
209
209
  class __remote_gen_spec(typing_extensions.Protocol[SUPERSELF]):
210
210
  def __call__(self, *args, **kwargs) -> typing.Generator[typing.Any, None, None]: ...
@@ -219,19 +219,19 @@ class Function(
219
219
  self, *args: modal._functions.P.args, **kwargs: modal._functions.P.kwargs
220
220
  ) -> modal._functions.OriginalReturnType: ...
221
221
 
222
- class ___experimental_spawn_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
222
+ class ___experimental_spawn_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER, SUPERSELF]):
223
223
  def __call__(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
224
224
  async def aio(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
225
225
 
226
226
  _experimental_spawn: ___experimental_spawn_spec[
227
- modal._functions.P, modal._functions.ReturnType, typing_extensions.Self
227
+ modal._functions.ReturnType, modal._functions.P, typing_extensions.Self
228
228
  ]
229
229
 
230
- class __spawn_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
230
+ class __spawn_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER, SUPERSELF]):
231
231
  def __call__(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
232
232
  async def aio(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
233
233
 
234
- spawn: __spawn_spec[modal._functions.P, modal._functions.ReturnType, typing_extensions.Self]
234
+ spawn: __spawn_spec[modal._functions.ReturnType, modal._functions.P, typing_extensions.Self]
235
235
 
236
236
  def get_raw_f(self) -> collections.abc.Callable[..., typing.Any]: ...
237
237
 
modal/image.py CHANGED
@@ -289,7 +289,7 @@ def _create_context_mount(
289
289
 
290
290
 
291
291
  def _create_context_mount_function(
292
- ignore: Union[Sequence[str], Callable[[Path], bool]],
292
+ ignore: Union[Sequence[str], Callable[[Path], bool], _AutoDockerIgnoreSentinel],
293
293
  dockerfile_cmds: list[str] = [],
294
294
  dockerfile_path: Optional[Path] = None,
295
295
  context_mount: Optional[_Mount] = None,
modal/image.pyi CHANGED
@@ -62,7 +62,9 @@ def _create_context_mount(
62
62
  context_dir: pathlib.Path,
63
63
  ) -> typing.Optional[modal.mount._Mount]: ...
64
64
  def _create_context_mount_function(
65
- ignore: typing.Union[collections.abc.Sequence[str], collections.abc.Callable[[pathlib.Path], bool]],
65
+ ignore: typing.Union[
66
+ collections.abc.Sequence[str], collections.abc.Callable[[pathlib.Path], bool], _AutoDockerIgnoreSentinel
67
+ ],
66
68
  dockerfile_cmds: list[str] = [],
67
69
  dockerfile_path: typing.Optional[pathlib.Path] = None,
68
70
  context_mount: typing.Optional[modal.mount._Mount] = None,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: modal
3
- Version: 0.73.162
3
+ Version: 0.73.164
4
4
  Summary: Python client library for Modal
5
5
  Author-email: Modal Labs <support@modal.com>
6
6
  License: Apache-2.0
@@ -23,7 +23,7 @@ modal/app.py,sha256=bJp7W3liuVG2VwWkG31tMFogDh84EKppzP8YJFWl3eQ,48140
23
23
  modal/app.pyi,sha256=SkqXNrdnGIZ4MmNNvpGtzNLoUdyuvi9IjQQR_DRiRHk,26968
24
24
  modal/call_graph.py,sha256=1g2DGcMIJvRy-xKicuf63IVE98gJSnQsr8R_NVMptNc,2581
25
25
  modal/client.py,sha256=U-YKSw0n7J1ZLREt9cbEJCtmHe5YoPKFxl0xlkan2yc,15565
26
- modal/client.pyi,sha256=a16v4xcW32IAk9izT5as2NwnbHq_pig7lRRuKMld_xw,7661
26
+ modal/client.pyi,sha256=DBHwH_dRIRw4etokK1g9IRaFv1a6lDKHIglO74F01Go,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=8tvSw7QFTS1FnX2MXaxagu3KwuR6y_DMwhqHv3MZ0Nk,32963
@@ -40,10 +40,10 @@ 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=m1PL2pwO-lnGV0uZDVCmzZ_v7Mu8ISRtxmxS15aEIAQ,14785
43
+ modal/functions.pyi,sha256=Bg_zlYSHMYuEXQYLcFU-j1Kwq5zHQ9jggMA_5ZO_du8,14785
44
44
  modal/gpu.py,sha256=Kbhs_u49FaC2Zi0TjCdrpstpRtT5eZgecynmQi5IZVE,6752
45
- modal/image.py,sha256=sOffqz74z748DeI2QUqP5qHXipZrK8q884q733F3_QI,92830
46
- modal/image.pyi,sha256=iWclz2rxaP-LSsYMgU0X3ZcN5mEFvpyKzIPKJbohmsg,25591
45
+ modal/image.py,sha256=qagLzHPbeEoM7TqvIuFJ8JV_IEJtRqiR0lik4O_K4Gw,92857
46
+ modal/image.pyi,sha256=89zv12C1sFrJs7Es9SnX23_m208ASAdeNGCVTrhjzHI,25632
47
47
  modal/io_streams.py,sha256=h5O2LmbRoT9l777z3TQhCAm-JF1r7avZ2ykXlejztDs,15163
48
48
  modal/io_streams.pyi,sha256=bJ7ZLmSmJ0nKoa6r4FJpbqvzdUVa0lEe0Fa-MMpMezU,5071
49
49
  modal/mount.py,sha256=JII0zTS1fPCcCbZgO18okkOuTDqYCxY1DIVa6i1E9cI,32196
@@ -83,7 +83,7 @@ modal/volume.py,sha256=JAWeDvoAG95tMBv-fYIERyHsJPS_X_xGpxRRmYtb6j0,30096
83
83
  modal/volume.pyi,sha256=kTsXarphjZILXci84LQy7EyC84eXUs5-7D62IM5q3eE,12491
84
84
  modal/_runtime/__init__.py,sha256=MIEP8jhXUeGq_eCjYFcqN5b1bxBM4fdk0VESpjWR0fc,28
85
85
  modal/_runtime/asgi.py,sha256=KNarxvZI9z8fnmZl2vbkWTjnoLXs9kqOahkrbsTLkyc,22429
86
- modal/_runtime/container_io_manager.py,sha256=-EpE47kL759b87SsQaaGMuqRBbvS8gRHoyAOIKzGRTY,44045
86
+ modal/_runtime/container_io_manager.py,sha256=WZnvKlmHaF7yteHMoeX-jIgU4OEPLhQyAvhNXmjjVy0,44318
87
87
  modal/_runtime/container_io_manager.pyi,sha256=wRd2wHMFru0NmNgiCBVdDTrJGkeVZsZvWwA1fzn8wi8,17009
88
88
  modal/_runtime/execution_context.py,sha256=E6ofm6j1POXGPxS841X3V7JU6NheVb8OkQc7JpLq4Kg,2712
89
89
  modal/_runtime/execution_context.pyi,sha256=wQZwMNADExkeNdB9yKX0PPojovxlFHbap3441wAsiMY,634
@@ -135,7 +135,7 @@ modal/cli/token.py,sha256=mxSgOWakXG6N71hQb1ko61XAR9ZGkTMZD-Txn7gmTac,1924
135
135
  modal/cli/utils.py,sha256=hZmjyzcPjDnQSkLvycZD2LhGdcsfdZshs_rOU78EpvI,3717
136
136
  modal/cli/volume.py,sha256=c2IuVNO2yJVaXmZkRh3xwQmznlRTgFoJr_BIzzqtVv0,10251
137
137
  modal/cli/programs/__init__.py,sha256=svYKtV8HDwDCN86zbdWqyq5T8sMdGDj0PVlzc2tIxDM,28
138
- modal/cli/programs/run_jupyter.py,sha256=MX6YQ6zRyRk1xo8tYZFiGam0p5KETwax81L6TpaS9I0,2778
138
+ modal/cli/programs/run_jupyter.py,sha256=YVvJYu927A4ji72d6i27CKfyZ_uDWteeittARtJnf7E,2775
139
139
  modal/cli/programs/vscode.py,sha256=kfvhZQ4bJwtVm3MgC1V7AlygZOlKT1a33alr_uwrewA,3473
140
140
  modal/experimental/__init__.py,sha256=7qlR4P4U1_sfPdiX8mhSzHR5scbS96QVxeKFnsIcpS4,6457
141
141
  modal/experimental/ipython.py,sha256=epLUZeDSdE226TH_tU3igRKCiVuQi99mUOrIJ4SemOE,2792
@@ -146,7 +146,7 @@ modal/requirements/2024.10.txt,sha256=qD-5cVIVM9wXesJ6JC89Ew-3m2KjEElUz3jaw_MddR
146
146
  modal/requirements/PREVIEW.txt,sha256=qD-5cVIVM9wXesJ6JC89Ew-3m2KjEElUz3jaw_MddRo,296
147
147
  modal/requirements/README.md,sha256=9tK76KP0Uph7O0M5oUgsSwEZDj5y-dcUPsnpR0Sc-Ik,854
148
148
  modal/requirements/base-images.json,sha256=57vMSqzMbLBxw5tFWSaMiIkkVEps4JfX5PAtXGnkS4U,740
149
- modal-0.73.162.dist-info/licenses/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
149
+ modal-0.73.164.dist-info/licenses/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
150
150
  modal_docs/__init__.py,sha256=svYKtV8HDwDCN86zbdWqyq5T8sMdGDj0PVlzc2tIxDM,28
151
151
  modal_docs/gen_cli_docs.py,sha256=c1yfBS_x--gL5bs0N4ihMwqwX8l3IBWSkBAKNNIi6bQ,3801
152
152
  modal_docs/gen_reference_docs.py,sha256=cvTgltucqYLLIX84QxAwf51Z5Vc2n6cLxS8VcrxNCAo,6401
@@ -154,10 +154,10 @@ modal_docs/mdmd/__init__.py,sha256=svYKtV8HDwDCN86zbdWqyq5T8sMdGDj0PVlzc2tIxDM,2
154
154
  modal_docs/mdmd/mdmd.py,sha256=Irx49MCCTlBOP4FBdLR--JrpA3-WhsVeriq0LGgsRic,6232
155
155
  modal_docs/mdmd/signatures.py,sha256=XJaZrK7Mdepk5fdX51A8uENiLFNil85Ud0d4MH8H5f0,3218
156
156
  modal_proto/__init__.py,sha256=MIEP8jhXUeGq_eCjYFcqN5b1bxBM4fdk0VESpjWR0fc,28
157
- modal_proto/api.proto,sha256=VwW2t0kpo9FMrYq1jHQpL4pvLbes2oCUxw7EXKAplpA,91432
157
+ modal_proto/api.proto,sha256=jrhg7sMfpcFSL8xCPBzW8U7kas16vYh0c0WmCo4NN4o,91483
158
158
  modal_proto/api_grpc.py,sha256=9Rs0JyHcz_DSjVKhdtMbDuNt6qDkrE2718KsyA3QL4c,110702
159
- modal_proto/api_pb2.py,sha256=JXOC0c4UtDJkNfpwTJTB-rkVoeW1pMHTxr6iAb9ckQI,322009
160
- modal_proto/api_pb2.pyi,sha256=iJH5M3mh9TGO2nZV2Te0vfLawharrzxBsIndsoF9pWs,438965
159
+ modal_proto/api_pb2.py,sha256=u6qmhGmIjnYxuofALoz0a5TaQKtASbWSlEIk27BfQ_I,322045
160
+ modal_proto/api_pb2.pyi,sha256=EoQ1OnFWEVf9jVVvrjdWSFRJ7MXtWTkBtN3rbWjR8Ok,439118
161
161
  modal_proto/api_pb2_grpc.py,sha256=olXvs6OQvy7pqvHP9bkSWC_DdIv0iO38xRlmkLo-ai8,239213
162
162
  modal_proto/api_pb2_grpc.pyi,sha256=ybhcN2nwFBIPd4Z4kkMOv-M8Ejidz93Bl4zScLpYcK0,55706
163
163
  modal_proto/modal_api_grpc.py,sha256=43ujbC_a8YAjuhtEvS-O-5lNpkG5d0K0ZIlryJ4weT4,14766
@@ -171,9 +171,9 @@ modal_proto/options_pb2_grpc.pyi,sha256=CImmhxHsYnF09iENPoe8S4J-n93jtgUYD2JPAc0y
171
171
  modal_proto/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
172
172
  modal_version/__init__.py,sha256=wiJQ53c-OMs0Xf1UeXOxQ7FwlV1VzIjnX6o-pRYZ_Pk,470
173
173
  modal_version/__main__.py,sha256=2FO0yYQQwDTh6udt1h-cBnGd1c4ZyHnHSI4BksxzVac,105
174
- modal_version/_version_generated.py,sha256=3hhcBuaL9XAly6I_x71IEDUHSKPJiVUA9cyCq25n4Go,150
175
- modal-0.73.162.dist-info/METADATA,sha256=11eGmZBnYC99foGIbXcmrectbLwvbJO_e7gu6_NBrJU,2475
176
- modal-0.73.162.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
177
- modal-0.73.162.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
178
- modal-0.73.162.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
179
- modal-0.73.162.dist-info/RECORD,,
174
+ modal_version/_version_generated.py,sha256=2I0ucIXjzi2tKSflkJUmKq9nN0hIKaLV0cEjBQVxcf0,150
175
+ modal-0.73.164.dist-info/METADATA,sha256=QEcE3qTvoJmPOms19OEunLqOXOzHXbG7TA7ZiJy7FNk,2475
176
+ modal-0.73.164.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
177
+ modal-0.73.164.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
178
+ modal-0.73.164.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
179
+ modal-0.73.164.dist-info/RECORD,,
modal_proto/api.proto CHANGED
@@ -2247,6 +2247,7 @@ message Resources {
2247
2247
  uint32 memory_mb_max = 5; // MiB
2248
2248
  uint32 ephemeral_disk_mb = 6; // MiB
2249
2249
  uint32 milli_cpu_max = 7; // milli CPU cores
2250
+ bool rdma = 8; // Whether to use RDMA interfaces
2250
2251
  }
2251
2252
 
2252
2253
  message RuntimeInputMessage {