modal 0.74.56__py3-none-any.whl → 0.74.58__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/_clustered_functions.pyi +2 -2
- modal/_functions.py +3 -2
- modal/_partial_function.py +3 -2
- modal/_resources.py +2 -0
- modal/_runtime/container_io_manager.pyi +46 -40
- modal/_runtime/execution_context.pyi +2 -2
- modal/_tunnel.pyi +2 -2
- modal/app.py +3 -0
- modal/app.pyi +12 -4
- modal/client.pyi +16 -16
- modal/cls.pyi +10 -6
- modal/container_process.pyi +6 -6
- modal/dict.pyi +32 -28
- modal/environments.pyi +10 -8
- modal/file_io.pyi +36 -32
- modal/functions.pyi +67 -51
- modal/image.pyi +4 -4
- modal/io_streams.pyi +12 -12
- modal/mount.pyi +6 -4
- modal/network_file_system.pyi +20 -8
- modal/object.pyi +6 -4
- modal/parallel_map.pyi +6 -6
- modal/queue.pyi +36 -14
- modal/runner.pyi +8 -4
- modal/sandbox.pyi +40 -30
- modal/secret.pyi +4 -0
- modal/serving.pyi +2 -0
- modal/snapshot.pyi +2 -2
- modal/token_flow.pyi +4 -4
- modal/volume.py +22 -5
- modal/volume.pyi +38 -30
- {modal-0.74.56.dist-info → modal-0.74.58.dist-info}/METADATA +1 -1
- {modal-0.74.56.dist-info → modal-0.74.58.dist-info}/RECORD +38 -38
- modal_version/_version_generated.py +1 -1
- {modal-0.74.56.dist-info → modal-0.74.58.dist-info}/WHEEL +0 -0
- {modal-0.74.56.dist-info → modal-0.74.58.dist-info}/entry_points.txt +0 -0
- {modal-0.74.56.dist-info → modal-0.74.58.dist-info}/licenses/LICENSE +0 -0
- {modal-0.74.56.dist-info → modal-0.74.58.dist-info}/top_level.txt +0 -0
modal/_clustered_functions.pyi
CHANGED
@@ -14,8 +14,8 @@ def get_cluster_info() -> ClusterInfo: ...
|
|
14
14
|
async def _initialize_clustered_function(client: modal.client._Client, task_id: str, world_size: int): ...
|
15
15
|
|
16
16
|
class __initialize_clustered_function_spec(typing_extensions.Protocol):
|
17
|
-
def __call__(self, client: modal.client.Client, task_id: str, world_size: int): ...
|
18
|
-
async def aio(self, client: modal.client.Client, task_id: str, world_size: int): ...
|
17
|
+
def __call__(self, /, client: modal.client.Client, task_id: str, world_size: int): ...
|
18
|
+
async def aio(self, /, client: modal.client.Client, task_id: str, world_size: int): ...
|
19
19
|
|
20
20
|
initialize_clustered_function: __initialize_clustered_function_spec
|
21
21
|
|
modal/_functions.py
CHANGED
@@ -477,6 +477,7 @@ class _Function(typing.Generic[P, ReturnType, OriginalReturnType], _Object, type
|
|
477
477
|
i6pn_enabled: bool = False,
|
478
478
|
# Experimental: Clustered functions
|
479
479
|
cluster_size: Optional[int] = None,
|
480
|
+
rdma: Optional[bool] = None,
|
480
481
|
max_inputs: Optional[int] = None,
|
481
482
|
ephemeral_disk: Optional[int] = None,
|
482
483
|
# current default: first-party, future default: main-package
|
@@ -899,7 +900,7 @@ class _Function(typing.Generic[P, ReturnType, OriginalReturnType], _Object, type
|
|
899
900
|
|
900
901
|
function_definition_copy.resources.CopyFrom(
|
901
902
|
convert_fn_config_to_resources_config(
|
902
|
-
cpu=cpu, memory=memory, gpu=_gpu, ephemeral_disk=ephemeral_disk
|
903
|
+
cpu=cpu, memory=memory, gpu=_gpu, ephemeral_disk=ephemeral_disk, rdma=rdma
|
903
904
|
),
|
904
905
|
)
|
905
906
|
ranked_function = api_pb2.FunctionData.RankedFunction(
|
@@ -914,7 +915,7 @@ class _Function(typing.Generic[P, ReturnType, OriginalReturnType], _Object, type
|
|
914
915
|
# assert isinstance(gpu, GPU_T) # includes the case where gpu==None case
|
915
916
|
function_definition.resources.CopyFrom(
|
916
917
|
convert_fn_config_to_resources_config(
|
917
|
-
cpu=cpu, memory=memory, gpu=gpu, ephemeral_disk=ephemeral_disk
|
918
|
+
cpu=cpu, memory=memory, gpu=gpu, ephemeral_disk=ephemeral_disk, rdma=rdma
|
918
919
|
),
|
919
920
|
)
|
920
921
|
|
modal/_partial_function.py
CHANGED
@@ -77,6 +77,7 @@ class _PartialFunctionParams:
|
|
77
77
|
max_concurrent_inputs: Optional[int] = None
|
78
78
|
target_concurrent_inputs: Optional[int] = None
|
79
79
|
build_timeout: Optional[int] = None
|
80
|
+
rdma: Optional[bool] = None
|
80
81
|
|
81
82
|
def update(self, other: "_PartialFunctionParams") -> None:
|
82
83
|
"""Update self with params set in other."""
|
@@ -900,7 +901,7 @@ def _concurrent(
|
|
900
901
|
|
901
902
|
|
902
903
|
# NOTE: clustered is currently exposed through modal.experimental, not the top-level namespace
|
903
|
-
def _clustered(size: int, broadcast: bool = True):
|
904
|
+
def _clustered(size: int, broadcast: bool = True, rdma: bool = False):
|
904
905
|
"""Provision clusters of colocated and networked containers for the Function.
|
905
906
|
|
906
907
|
Parameters:
|
@@ -918,7 +919,7 @@ def _clustered(size: int, broadcast: bool = True):
|
|
918
919
|
raise ValueError("cluster size must be greater than 0")
|
919
920
|
|
920
921
|
flags = _PartialFunctionFlags.CLUSTERED
|
921
|
-
params = _PartialFunctionParams(cluster_size=size)
|
922
|
+
params = _PartialFunctionParams(cluster_size=size, rdma=rdma)
|
922
923
|
|
923
924
|
def wrapper(
|
924
925
|
obj: Union[_PartialFunction[P, ReturnType, ReturnType], Callable[P, ReturnType]],
|
modal/_resources.py
CHANGED
@@ -13,6 +13,7 @@ def convert_fn_config_to_resources_config(
|
|
13
13
|
memory: Optional[Union[int, tuple[int, int]]],
|
14
14
|
gpu: GPU_T,
|
15
15
|
ephemeral_disk: Optional[int],
|
16
|
+
rdma: Optional[bool] = None,
|
16
17
|
) -> api_pb2.Resources:
|
17
18
|
gpu_config = parse_gpu_config(gpu)
|
18
19
|
if cpu and isinstance(cpu, tuple):
|
@@ -48,4 +49,5 @@ def convert_fn_config_to_resources_config(
|
|
48
49
|
memory_mb=memory_mb,
|
49
50
|
memory_mb_max=memory_mb_max,
|
50
51
|
ephemeral_disk_mb=ephemeral_disk,
|
52
|
+
rdma=rdma or False,
|
51
53
|
)
|
@@ -190,84 +190,84 @@ class ContainerIOManager:
|
|
190
190
|
def _reset_singleton(cls): ...
|
191
191
|
|
192
192
|
class __hello_spec(typing_extensions.Protocol[SUPERSELF]):
|
193
|
-
def __call__(self): ...
|
194
|
-
async def aio(self): ...
|
193
|
+
def __call__(self, /): ...
|
194
|
+
async def aio(self, /): ...
|
195
195
|
|
196
196
|
hello: __hello_spec[typing_extensions.Self]
|
197
197
|
|
198
198
|
class ___run_heartbeat_loop_spec(typing_extensions.Protocol[SUPERSELF]):
|
199
|
-
def __call__(self): ...
|
200
|
-
async def aio(self): ...
|
199
|
+
def __call__(self, /): ...
|
200
|
+
async def aio(self, /): ...
|
201
201
|
|
202
202
|
_run_heartbeat_loop: ___run_heartbeat_loop_spec[typing_extensions.Self]
|
203
203
|
|
204
204
|
class ___heartbeat_handle_cancellations_spec(typing_extensions.Protocol[SUPERSELF]):
|
205
|
-
def __call__(self) -> bool: ...
|
206
|
-
async def aio(self) -> bool: ...
|
205
|
+
def __call__(self, /) -> bool: ...
|
206
|
+
async def aio(self, /) -> bool: ...
|
207
207
|
|
208
208
|
_heartbeat_handle_cancellations: ___heartbeat_handle_cancellations_spec[typing_extensions.Self]
|
209
209
|
|
210
210
|
class __heartbeats_spec(typing_extensions.Protocol[SUPERSELF]):
|
211
211
|
def __call__(
|
212
|
-
self, wait_for_mem_snap: bool
|
212
|
+
self, /, wait_for_mem_snap: bool
|
213
213
|
) -> synchronicity.combined_types.AsyncAndBlockingContextManager[None]: ...
|
214
|
-
def aio(self, wait_for_mem_snap: bool) -> typing.AsyncContextManager[None]: ...
|
214
|
+
def aio(self, /, wait_for_mem_snap: bool) -> typing.AsyncContextManager[None]: ...
|
215
215
|
|
216
216
|
heartbeats: __heartbeats_spec[typing_extensions.Self]
|
217
217
|
|
218
218
|
def stop_heartbeat(self): ...
|
219
219
|
|
220
220
|
class __dynamic_concurrency_manager_spec(typing_extensions.Protocol[SUPERSELF]):
|
221
|
-
def __call__(self) -> synchronicity.combined_types.AsyncAndBlockingContextManager[None]: ...
|
222
|
-
def aio(self) -> typing.AsyncContextManager[None]: ...
|
221
|
+
def __call__(self, /) -> synchronicity.combined_types.AsyncAndBlockingContextManager[None]: ...
|
222
|
+
def aio(self, /) -> typing.AsyncContextManager[None]: ...
|
223
223
|
|
224
224
|
dynamic_concurrency_manager: __dynamic_concurrency_manager_spec[typing_extensions.Self]
|
225
225
|
|
226
226
|
class ___dynamic_concurrency_loop_spec(typing_extensions.Protocol[SUPERSELF]):
|
227
|
-
def __call__(self): ...
|
228
|
-
async def aio(self): ...
|
227
|
+
def __call__(self, /): ...
|
228
|
+
async def aio(self, /): ...
|
229
229
|
|
230
230
|
_dynamic_concurrency_loop: ___dynamic_concurrency_loop_spec[typing_extensions.Self]
|
231
231
|
|
232
232
|
def serialize_data_format(self, obj: typing.Any, data_format: int) -> bytes: ...
|
233
233
|
|
234
234
|
class __format_blob_data_spec(typing_extensions.Protocol[SUPERSELF]):
|
235
|
-
def __call__(self, data: bytes) -> dict[str, typing.Any]: ...
|
236
|
-
async def aio(self, data: bytes) -> dict[str, typing.Any]: ...
|
235
|
+
def __call__(self, /, data: bytes) -> dict[str, typing.Any]: ...
|
236
|
+
async def aio(self, /, data: bytes) -> dict[str, typing.Any]: ...
|
237
237
|
|
238
238
|
format_blob_data: __format_blob_data_spec[typing_extensions.Self]
|
239
239
|
|
240
240
|
class __get_data_in_spec(typing_extensions.Protocol[SUPERSELF]):
|
241
|
-
def __call__(self, function_call_id: str) -> typing.Iterator[typing.Any]: ...
|
242
|
-
def aio(self, function_call_id: str) -> collections.abc.AsyncIterator[typing.Any]: ...
|
241
|
+
def __call__(self, /, function_call_id: str) -> typing.Iterator[typing.Any]: ...
|
242
|
+
def aio(self, /, function_call_id: str) -> collections.abc.AsyncIterator[typing.Any]: ...
|
243
243
|
|
244
244
|
get_data_in: __get_data_in_spec[typing_extensions.Self]
|
245
245
|
|
246
246
|
class __put_data_out_spec(typing_extensions.Protocol[SUPERSELF]):
|
247
247
|
def __call__(
|
248
|
-
self, function_call_id: str, start_index: int, data_format: int, serialized_messages: list[typing.Any]
|
248
|
+
self, /, function_call_id: str, start_index: int, data_format: int, serialized_messages: list[typing.Any]
|
249
249
|
) -> None: ...
|
250
250
|
async def aio(
|
251
|
-
self, function_call_id: str, start_index: int, data_format: int, serialized_messages: list[typing.Any]
|
251
|
+
self, /, function_call_id: str, start_index: int, data_format: int, serialized_messages: list[typing.Any]
|
252
252
|
) -> None: ...
|
253
253
|
|
254
254
|
put_data_out: __put_data_out_spec[typing_extensions.Self]
|
255
255
|
|
256
256
|
class __generator_output_task_spec(typing_extensions.Protocol[SUPERSELF]):
|
257
|
-
def __call__(self, function_call_id: str, data_format: int, message_rx: asyncio.queues.Queue) -> None: ...
|
258
|
-
async def aio(self, function_call_id: str, data_format: int, message_rx: asyncio.queues.Queue) -> None: ...
|
257
|
+
def __call__(self, /, function_call_id: str, data_format: int, message_rx: asyncio.queues.Queue) -> None: ...
|
258
|
+
async def aio(self, /, function_call_id: str, data_format: int, message_rx: asyncio.queues.Queue) -> None: ...
|
259
259
|
|
260
260
|
generator_output_task: __generator_output_task_spec[typing_extensions.Self]
|
261
261
|
|
262
262
|
class ___queue_create_spec(typing_extensions.Protocol[SUPERSELF]):
|
263
|
-
def __call__(self, size: int) -> asyncio.queues.Queue: ...
|
264
|
-
async def aio(self, size: int) -> asyncio.queues.Queue: ...
|
263
|
+
def __call__(self, /, size: int) -> asyncio.queues.Queue: ...
|
264
|
+
async def aio(self, /, size: int) -> asyncio.queues.Queue: ...
|
265
265
|
|
266
266
|
_queue_create: ___queue_create_spec[typing_extensions.Self]
|
267
267
|
|
268
268
|
class ___queue_put_spec(typing_extensions.Protocol[SUPERSELF]):
|
269
|
-
def __call__(self, queue: asyncio.queues.Queue, value: typing.Any) -> None: ...
|
270
|
-
async def aio(self, queue: asyncio.queues.Queue, value: typing.Any) -> None: ...
|
269
|
+
def __call__(self, /, queue: asyncio.queues.Queue, value: typing.Any) -> None: ...
|
270
|
+
async def aio(self, /, queue: asyncio.queues.Queue, value: typing.Any) -> None: ...
|
271
271
|
|
272
272
|
_queue_put: ___queue_put_spec[typing_extensions.Self]
|
273
273
|
|
@@ -276,10 +276,10 @@ class ContainerIOManager:
|
|
276
276
|
|
277
277
|
class ___generate_inputs_spec(typing_extensions.Protocol[SUPERSELF]):
|
278
278
|
def __call__(
|
279
|
-
self, batch_max_size: int, batch_wait_ms: int
|
279
|
+
self, /, batch_max_size: int, batch_wait_ms: int
|
280
280
|
) -> typing.Iterator[list[tuple[str, int, str, modal_proto.api_pb2.FunctionInput]]]: ...
|
281
281
|
def aio(
|
282
|
-
self, batch_max_size: int, batch_wait_ms: int
|
282
|
+
self, /, batch_max_size: int, batch_wait_ms: int
|
283
283
|
) -> collections.abc.AsyncIterator[list[tuple[str, int, str, modal_proto.api_pb2.FunctionInput]]]: ...
|
284
284
|
|
285
285
|
_generate_inputs: ___generate_inputs_spec[typing_extensions.Self]
|
@@ -287,12 +287,14 @@ class ContainerIOManager:
|
|
287
287
|
class __run_inputs_outputs_spec(typing_extensions.Protocol[SUPERSELF]):
|
288
288
|
def __call__(
|
289
289
|
self,
|
290
|
+
/,
|
290
291
|
finalized_functions: dict[str, modal._runtime.user_code_imports.FinalizedFunction],
|
291
292
|
batch_max_size: int = 0,
|
292
293
|
batch_wait_ms: int = 0,
|
293
294
|
) -> typing.Iterator[IOContext]: ...
|
294
295
|
def aio(
|
295
296
|
self,
|
297
|
+
/,
|
296
298
|
finalized_functions: dict[str, modal._runtime.user_code_imports.FinalizedFunction],
|
297
299
|
batch_max_size: int = 0,
|
298
300
|
batch_wait_ms: int = 0,
|
@@ -303,6 +305,7 @@ class ContainerIOManager:
|
|
303
305
|
class ___push_outputs_spec(typing_extensions.Protocol[SUPERSELF]):
|
304
306
|
def __call__(
|
305
307
|
self,
|
308
|
+
/,
|
306
309
|
io_context: IOContext,
|
307
310
|
started_at: float,
|
308
311
|
data_format: int,
|
@@ -310,6 +313,7 @@ class ContainerIOManager:
|
|
310
313
|
) -> None: ...
|
311
314
|
async def aio(
|
312
315
|
self,
|
316
|
+
/,
|
313
317
|
io_context: IOContext,
|
314
318
|
started_at: float,
|
315
319
|
data_format: int,
|
@@ -322,48 +326,50 @@ class ContainerIOManager:
|
|
322
326
|
def serialize_traceback(self, exc: BaseException) -> tuple[typing.Optional[bytes], typing.Optional[bytes]]: ...
|
323
327
|
|
324
328
|
class __handle_user_exception_spec(typing_extensions.Protocol[SUPERSELF]):
|
325
|
-
def __call__(self) -> synchronicity.combined_types.AsyncAndBlockingContextManager[None]: ...
|
326
|
-
def aio(self) -> typing.AsyncContextManager[None]: ...
|
329
|
+
def __call__(self, /) -> synchronicity.combined_types.AsyncAndBlockingContextManager[None]: ...
|
330
|
+
def aio(self, /) -> typing.AsyncContextManager[None]: ...
|
327
331
|
|
328
332
|
handle_user_exception: __handle_user_exception_spec[typing_extensions.Self]
|
329
333
|
|
330
334
|
class __handle_input_exception_spec(typing_extensions.Protocol[SUPERSELF]):
|
331
335
|
def __call__(
|
332
|
-
self, io_context: IOContext, started_at: float
|
336
|
+
self, /, io_context: IOContext, started_at: float
|
333
337
|
) -> synchronicity.combined_types.AsyncAndBlockingContextManager[None]: ...
|
334
|
-
def aio(self, io_context: IOContext, started_at: float) -> typing.AsyncContextManager[None]: ...
|
338
|
+
def aio(self, /, io_context: IOContext, started_at: float) -> typing.AsyncContextManager[None]: ...
|
335
339
|
|
336
340
|
handle_input_exception: __handle_input_exception_spec[typing_extensions.Self]
|
337
341
|
|
338
342
|
def exit_context(self, started_at, input_ids: list[str]): ...
|
339
343
|
|
340
344
|
class __push_outputs_spec(typing_extensions.Protocol[SUPERSELF]):
|
341
|
-
def __call__(self, io_context: IOContext, started_at: float, data: typing.Any, data_format: int) -> None: ...
|
342
|
-
async def aio(
|
345
|
+
def __call__(self, /, io_context: IOContext, started_at: float, data: typing.Any, data_format: int) -> None: ...
|
346
|
+
async def aio(
|
347
|
+
self, /, io_context: IOContext, started_at: float, data: typing.Any, data_format: int
|
348
|
+
) -> None: ...
|
343
349
|
|
344
350
|
push_outputs: __push_outputs_spec[typing_extensions.Self]
|
345
351
|
|
346
352
|
class __memory_restore_spec(typing_extensions.Protocol[SUPERSELF]):
|
347
|
-
def __call__(self) -> None: ...
|
348
|
-
async def aio(self) -> None: ...
|
353
|
+
def __call__(self, /) -> None: ...
|
354
|
+
async def aio(self, /) -> None: ...
|
349
355
|
|
350
356
|
memory_restore: __memory_restore_spec[typing_extensions.Self]
|
351
357
|
|
352
358
|
class __memory_snapshot_spec(typing_extensions.Protocol[SUPERSELF]):
|
353
|
-
def __call__(self) -> None: ...
|
354
|
-
async def aio(self) -> None: ...
|
359
|
+
def __call__(self, /) -> None: ...
|
360
|
+
async def aio(self, /) -> None: ...
|
355
361
|
|
356
362
|
memory_snapshot: __memory_snapshot_spec[typing_extensions.Self]
|
357
363
|
|
358
364
|
class __volume_commit_spec(typing_extensions.Protocol[SUPERSELF]):
|
359
|
-
def __call__(self, volume_ids: list[str]) -> None: ...
|
360
|
-
async def aio(self, volume_ids: list[str]) -> None: ...
|
365
|
+
def __call__(self, /, volume_ids: list[str]) -> None: ...
|
366
|
+
async def aio(self, /, volume_ids: list[str]) -> None: ...
|
361
367
|
|
362
368
|
volume_commit: __volume_commit_spec[typing_extensions.Self]
|
363
369
|
|
364
370
|
class __interact_spec(typing_extensions.Protocol[SUPERSELF]):
|
365
|
-
def __call__(self, from_breakpoint: bool = False): ...
|
366
|
-
async def aio(self, from_breakpoint: bool = False): ...
|
371
|
+
def __call__(self, /, from_breakpoint: bool = False): ...
|
372
|
+
async def aio(self, /, from_breakpoint: bool = False): ...
|
367
373
|
|
368
374
|
interact: __interact_spec[typing_extensions.Self]
|
369
375
|
|
@@ -7,8 +7,8 @@ def is_local() -> bool: ...
|
|
7
7
|
async def _interact() -> None: ...
|
8
8
|
|
9
9
|
class __interact_spec(typing_extensions.Protocol):
|
10
|
-
def __call__(self) -> None: ...
|
11
|
-
async def aio(self) -> None: ...
|
10
|
+
def __call__(self, /) -> None: ...
|
11
|
+
async def aio(self, /) -> None: ...
|
12
12
|
|
13
13
|
interact: __interact_spec
|
14
14
|
|
modal/_tunnel.pyi
CHANGED
@@ -28,10 +28,10 @@ def _forward(
|
|
28
28
|
|
29
29
|
class __forward_spec(typing_extensions.Protocol):
|
30
30
|
def __call__(
|
31
|
-
self, port: int, *, unencrypted: bool = False, client: typing.Optional[modal.client.Client] = None
|
31
|
+
self, /, port: int, *, unencrypted: bool = False, client: typing.Optional[modal.client.Client] = None
|
32
32
|
) -> synchronicity.combined_types.AsyncAndBlockingContextManager[Tunnel]: ...
|
33
33
|
def aio(
|
34
|
-
self, port: int, *, unencrypted: bool = False, client: typing.Optional[modal.client.Client] = None
|
34
|
+
self, /, port: int, *, unencrypted: bool = False, client: typing.Optional[modal.client.Client] = None
|
35
35
|
) -> typing.AsyncContextManager[Tunnel]: ...
|
36
36
|
|
37
37
|
forward: __forward_spec
|
modal/app.py
CHANGED
@@ -747,6 +747,7 @@ class _App:
|
|
747
747
|
)
|
748
748
|
i6pn_enabled = i6pn or (f.flags & _PartialFunctionFlags.CLUSTERED)
|
749
749
|
cluster_size = f.params.cluster_size # Experimental: Clustered functions
|
750
|
+
rdma = f.params.rdma
|
750
751
|
|
751
752
|
info = FunctionInfo(f.raw_f, serialized=serialized, name_override=name)
|
752
753
|
raw_f = f.raw_f
|
@@ -799,6 +800,7 @@ class _App:
|
|
799
800
|
target_concurrent_inputs = None
|
800
801
|
|
801
802
|
cluster_size = None # Experimental: Clustered functions
|
803
|
+
rdma = None
|
802
804
|
i6pn_enabled = i6pn
|
803
805
|
|
804
806
|
if info.function_name.endswith(".app"):
|
@@ -850,6 +852,7 @@ class _App:
|
|
850
852
|
scheduler_placement=scheduler_placement,
|
851
853
|
i6pn_enabled=i6pn_enabled,
|
852
854
|
cluster_size=cluster_size, # Experimental: Clustered functions
|
855
|
+
rdma=rdma,
|
853
856
|
include_source=include_source if include_source is not None else self._include_source_default,
|
854
857
|
experimental_options={k: str(v) for k, v in (experimental_options or {}).items()},
|
855
858
|
_experimental_proxy_ip=_experimental_proxy_ip,
|
modal/app.pyi
CHANGED
@@ -338,6 +338,7 @@ class App:
|
|
338
338
|
class __lookup_spec(typing_extensions.Protocol):
|
339
339
|
def __call__(
|
340
340
|
self,
|
341
|
+
/,
|
341
342
|
name: str,
|
342
343
|
*,
|
343
344
|
client: typing.Optional[modal.client.Client] = None,
|
@@ -346,6 +347,7 @@ class App:
|
|
346
347
|
) -> App: ...
|
347
348
|
async def aio(
|
348
349
|
self,
|
350
|
+
/,
|
349
351
|
name: str,
|
350
352
|
*,
|
351
353
|
client: typing.Optional[modal.client.Client] = None,
|
@@ -365,10 +367,10 @@ class App:
|
|
365
367
|
|
366
368
|
class ___set_local_app_spec(typing_extensions.Protocol[SUPERSELF]):
|
367
369
|
def __call__(
|
368
|
-
self, client: modal.client.Client, running_app: modal.running_app.RunningApp
|
370
|
+
self, /, client: modal.client.Client, running_app: modal.running_app.RunningApp
|
369
371
|
) -> synchronicity.combined_types.AsyncAndBlockingContextManager[None]: ...
|
370
372
|
def aio(
|
371
|
-
self, client: modal.client.Client, running_app: modal.running_app.RunningApp
|
373
|
+
self, /, client: modal.client.Client, running_app: modal.running_app.RunningApp
|
372
374
|
) -> typing.AsyncContextManager[None]: ...
|
373
375
|
|
374
376
|
_set_local_app: ___set_local_app_spec[typing_extensions.Self]
|
@@ -376,6 +378,7 @@ class App:
|
|
376
378
|
class __run_spec(typing_extensions.Protocol[SUPERSELF]):
|
377
379
|
def __call__(
|
378
380
|
self,
|
381
|
+
/,
|
379
382
|
*,
|
380
383
|
client: typing.Optional[modal.client.Client] = None,
|
381
384
|
show_progress: typing.Optional[bool] = None,
|
@@ -385,6 +388,7 @@ class App:
|
|
385
388
|
) -> synchronicity.combined_types.AsyncAndBlockingContextManager[App]: ...
|
386
389
|
def aio(
|
387
390
|
self,
|
391
|
+
/,
|
388
392
|
*,
|
389
393
|
client: typing.Optional[modal.client.Client] = None,
|
390
394
|
show_progress: typing.Optional[bool] = None,
|
@@ -398,6 +402,7 @@ class App:
|
|
398
402
|
class __deploy_spec(typing_extensions.Protocol[SUPERSELF]):
|
399
403
|
def __call__(
|
400
404
|
self,
|
405
|
+
/,
|
401
406
|
*,
|
402
407
|
name: typing.Optional[str] = None,
|
403
408
|
environment_name: typing.Optional[str] = None,
|
@@ -406,6 +411,7 @@ class App:
|
|
406
411
|
) -> SUPERSELF: ...
|
407
412
|
async def aio(
|
408
413
|
self,
|
414
|
+
/,
|
409
415
|
*,
|
410
416
|
name: typing.Optional[str] = None,
|
411
417
|
environment_name: typing.Optional[str] = None,
|
@@ -535,6 +541,7 @@ class App:
|
|
535
541
|
class __spawn_sandbox_spec(typing_extensions.Protocol[SUPERSELF]):
|
536
542
|
def __call__(
|
537
543
|
self,
|
544
|
+
/,
|
538
545
|
*entrypoint_args: str,
|
539
546
|
image: typing.Optional[modal.image.Image] = None,
|
540
547
|
mounts: collections.abc.Sequence[modal.mount.Mount] = (),
|
@@ -559,6 +566,7 @@ class App:
|
|
559
566
|
) -> None: ...
|
560
567
|
async def aio(
|
561
568
|
self,
|
569
|
+
/,
|
562
570
|
*entrypoint_args: str,
|
563
571
|
image: typing.Optional[modal.image.Image] = None,
|
564
572
|
mounts: collections.abc.Sequence[modal.mount.Mount] = (),
|
@@ -588,10 +596,10 @@ class App:
|
|
588
596
|
|
589
597
|
class ___logs_spec(typing_extensions.Protocol[SUPERSELF]):
|
590
598
|
def __call__(
|
591
|
-
self, client: typing.Optional[modal.client.Client] = None
|
599
|
+
self, /, client: typing.Optional[modal.client.Client] = None
|
592
600
|
) -> typing.Generator[str, None, None]: ...
|
593
601
|
def aio(
|
594
|
-
self, client: typing.Optional[modal.client.Client] = None
|
602
|
+
self, /, client: typing.Optional[modal.client.Client] = None
|
595
603
|
) -> collections.abc.AsyncGenerator[str, None]: ...
|
596
604
|
|
597
605
|
_logs: ___logs_spec[typing_extensions.Self]
|
modal/client.pyi
CHANGED
@@ -27,7 +27,7 @@ class _Client:
|
|
27
27
|
_snapshotted: bool
|
28
28
|
|
29
29
|
def __init__(
|
30
|
-
self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.74.
|
30
|
+
self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.74.58"
|
31
31
|
): ...
|
32
32
|
def is_closed(self) -> bool: ...
|
33
33
|
@property
|
@@ -86,33 +86,33 @@ class Client:
|
|
86
86
|
_snapshotted: bool
|
87
87
|
|
88
88
|
def __init__(
|
89
|
-
self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.74.
|
89
|
+
self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.74.58"
|
90
90
|
): ...
|
91
91
|
def is_closed(self) -> bool: ...
|
92
92
|
@property
|
93
93
|
def stub(self) -> modal_proto.modal_api_grpc.ModalClientModal: ...
|
94
94
|
|
95
95
|
class __get_stub_spec(typing_extensions.Protocol[SUPERSELF]):
|
96
|
-
def __call__(self, server_url: str) -> modal_proto.modal_api_grpc.ModalClientModal: ...
|
97
|
-
async def aio(self, server_url: str) -> modal_proto.modal_api_grpc.ModalClientModal: ...
|
96
|
+
def __call__(self, /, server_url: str) -> modal_proto.modal_api_grpc.ModalClientModal: ...
|
97
|
+
async def aio(self, /, server_url: str) -> modal_proto.modal_api_grpc.ModalClientModal: ...
|
98
98
|
|
99
99
|
get_stub: __get_stub_spec[typing_extensions.Self]
|
100
100
|
|
101
101
|
class ___open_spec(typing_extensions.Protocol[SUPERSELF]):
|
102
|
-
def __call__(self): ...
|
103
|
-
async def aio(self): ...
|
102
|
+
def __call__(self, /): ...
|
103
|
+
async def aio(self, /): ...
|
104
104
|
|
105
105
|
_open: ___open_spec[typing_extensions.Self]
|
106
106
|
|
107
107
|
class ___close_spec(typing_extensions.Protocol[SUPERSELF]):
|
108
|
-
def __call__(self, prep_for_restore: bool = False): ...
|
109
|
-
async def aio(self, prep_for_restore: bool = False): ...
|
108
|
+
def __call__(self, /, prep_for_restore: bool = False): ...
|
109
|
+
async def aio(self, /, prep_for_restore: bool = False): ...
|
110
110
|
|
111
111
|
_close: ___close_spec[typing_extensions.Self]
|
112
112
|
|
113
113
|
class __hello_spec(typing_extensions.Protocol[SUPERSELF]):
|
114
|
-
def __call__(self): ...
|
115
|
-
async def aio(self): ...
|
114
|
+
def __call__(self, /): ...
|
115
|
+
async def aio(self, /): ...
|
116
116
|
|
117
117
|
hello: __hello_spec[typing_extensions.Self]
|
118
118
|
|
@@ -132,20 +132,20 @@ class Client:
|
|
132
132
|
def set_env_client(cls, client: typing.Optional[Client]): ...
|
133
133
|
|
134
134
|
class ___call_safely_spec(typing_extensions.Protocol[SUPERSELF]):
|
135
|
-
def __call__(self, coro, readable_method: str): ...
|
136
|
-
async def aio(self, coro, readable_method: str): ...
|
135
|
+
def __call__(self, /, coro, readable_method: str): ...
|
136
|
+
async def aio(self, /, coro, readable_method: str): ...
|
137
137
|
|
138
138
|
_call_safely: ___call_safely_spec[typing_extensions.Self]
|
139
139
|
|
140
140
|
class ___reset_on_pid_change_spec(typing_extensions.Protocol[SUPERSELF]):
|
141
|
-
def __call__(self): ...
|
142
|
-
async def aio(self): ...
|
141
|
+
def __call__(self, /): ...
|
142
|
+
async def aio(self, /): ...
|
143
143
|
|
144
144
|
_reset_on_pid_change: ___reset_on_pid_change_spec[typing_extensions.Self]
|
145
145
|
|
146
146
|
class ___get_channel_spec(typing_extensions.Protocol[SUPERSELF]):
|
147
|
-
def __call__(self, server_url: str) -> grpclib.client.Channel: ...
|
148
|
-
async def aio(self, server_url: str) -> grpclib.client.Channel: ...
|
147
|
+
def __call__(self, /, server_url: str) -> grpclib.client.Channel: ...
|
148
|
+
async def aio(self, /, server_url: str) -> grpclib.client.Channel: ...
|
149
149
|
|
150
150
|
_get_channel: ___get_channel_spec[typing_extensions.Self]
|
151
151
|
|
modal/cls.pyi
CHANGED
@@ -105,6 +105,7 @@ class Obj:
|
|
105
105
|
class __update_autoscaler_spec(typing_extensions.Protocol[SUPERSELF]):
|
106
106
|
def __call__(
|
107
107
|
self,
|
108
|
+
/,
|
108
109
|
*,
|
109
110
|
min_containers: typing.Optional[int] = None,
|
110
111
|
max_containers: typing.Optional[int] = None,
|
@@ -113,6 +114,7 @@ class Obj:
|
|
113
114
|
) -> None: ...
|
114
115
|
async def aio(
|
115
116
|
self,
|
117
|
+
/,
|
116
118
|
*,
|
117
119
|
min_containers: typing.Optional[int] = None,
|
118
120
|
max_containers: typing.Optional[int] = None,
|
@@ -123,8 +125,8 @@ class Obj:
|
|
123
125
|
update_autoscaler: __update_autoscaler_spec[typing_extensions.Self]
|
124
126
|
|
125
127
|
class __keep_warm_spec(typing_extensions.Protocol[SUPERSELF]):
|
126
|
-
def __call__(self, warm_pool_size: int) -> None: ...
|
127
|
-
async def aio(self, warm_pool_size: int) -> None: ...
|
128
|
+
def __call__(self, /, warm_pool_size: int) -> None: ...
|
129
|
+
async def aio(self, /, warm_pool_size: int) -> None: ...
|
128
130
|
|
129
131
|
keep_warm: __keep_warm_spec[typing_extensions.Self]
|
130
132
|
|
@@ -253,6 +255,7 @@ class Cls(modal.object.Object):
|
|
253
255
|
class __lookup_spec(typing_extensions.Protocol):
|
254
256
|
def __call__(
|
255
257
|
self,
|
258
|
+
/,
|
256
259
|
app_name: str,
|
257
260
|
name: str,
|
258
261
|
namespace=1,
|
@@ -262,6 +265,7 @@ class Cls(modal.object.Object):
|
|
262
265
|
) -> Cls: ...
|
263
266
|
async def aio(
|
264
267
|
self,
|
268
|
+
/,
|
265
269
|
app_name: str,
|
266
270
|
name: str,
|
267
271
|
namespace=1,
|
@@ -277,14 +281,14 @@ class Cls(modal.object.Object):
|
|
277
281
|
def _is_local(self) -> bool: ...
|
278
282
|
|
279
283
|
class ___get_constructor_args_spec(typing_extensions.Protocol):
|
280
|
-
def __call__(self, cls: Cls) -> typing.Sequence[modal_proto.api_pb2.ClassParameterSpec]: ...
|
281
|
-
async def aio(self, cls: Cls) -> typing.Sequence[modal_proto.api_pb2.ClassParameterSpec]: ...
|
284
|
+
def __call__(self, /, cls: Cls) -> typing.Sequence[modal_proto.api_pb2.ClassParameterSpec]: ...
|
285
|
+
async def aio(self, /, cls: Cls) -> typing.Sequence[modal_proto.api_pb2.ClassParameterSpec]: ...
|
282
286
|
|
283
287
|
_get_constructor_args: ___get_constructor_args_spec
|
284
288
|
|
285
289
|
class ___get_method_schemas_spec(typing_extensions.Protocol):
|
286
|
-
def __call__(self, cls: Cls) -> dict[str, modal_proto.api_pb2.FunctionSchema]: ...
|
287
|
-
async def aio(self, cls: Cls) -> dict[str, modal_proto.api_pb2.FunctionSchema]: ...
|
290
|
+
def __call__(self, /, cls: Cls) -> dict[str, modal_proto.api_pb2.FunctionSchema]: ...
|
291
|
+
async def aio(self, /, cls: Cls) -> dict[str, modal_proto.api_pb2.FunctionSchema]: ...
|
288
292
|
|
289
293
|
_get_method_schemas: ___get_method_schemas_spec
|
290
294
|
|
modal/container_process.pyi
CHANGED
@@ -68,19 +68,19 @@ class ContainerProcess(typing.Generic[T]):
|
|
68
68
|
def returncode(self) -> int: ...
|
69
69
|
|
70
70
|
class __poll_spec(typing_extensions.Protocol[SUPERSELF]):
|
71
|
-
def __call__(self) -> typing.Optional[int]: ...
|
72
|
-
async def aio(self) -> typing.Optional[int]: ...
|
71
|
+
def __call__(self, /) -> typing.Optional[int]: ...
|
72
|
+
async def aio(self, /) -> typing.Optional[int]: ...
|
73
73
|
|
74
74
|
poll: __poll_spec[typing_extensions.Self]
|
75
75
|
|
76
76
|
class __wait_spec(typing_extensions.Protocol[SUPERSELF]):
|
77
|
-
def __call__(self) -> int: ...
|
78
|
-
async def aio(self) -> int: ...
|
77
|
+
def __call__(self, /) -> int: ...
|
78
|
+
async def aio(self, /) -> int: ...
|
79
79
|
|
80
80
|
wait: __wait_spec[typing_extensions.Self]
|
81
81
|
|
82
82
|
class __attach_spec(typing_extensions.Protocol[SUPERSELF]):
|
83
|
-
def __call__(self, *, pty: typing.Optional[bool] = None): ...
|
84
|
-
async def aio(self, *, pty: typing.Optional[bool] = None): ...
|
83
|
+
def __call__(self, /, *, pty: typing.Optional[bool] = None): ...
|
84
|
+
async def aio(self, /, *, pty: typing.Optional[bool] = None): ...
|
85
85
|
|
86
86
|
attach: __attach_spec[typing_extensions.Self]
|