modal 0.68.50__py3-none-any.whl → 0.71.5__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/_container_entrypoint.py +24 -16
- modal/_runtime/container_io_manager.py +11 -23
- modal/_utils/docker_utils.py +64 -0
- modal/_utils/function_utils.py +10 -1
- modal/app.py +25 -23
- modal/app.pyi +6 -2
- modal/cli/launch.py +2 -0
- modal/cli/programs/vscode.py +27 -2
- modal/cli/run.py +1 -1
- modal/client.pyi +2 -2
- modal/exception.py +6 -0
- modal/experimental.py +3 -0
- modal/file_io.py +102 -10
- modal/file_io.pyi +59 -0
- modal/file_pattern_matcher.py +11 -1
- modal/functions.py +20 -5
- modal/functions.pyi +2 -2
- modal/image.py +95 -39
- modal/image.pyi +11 -2
- modal/io_streams.py +15 -27
- modal/io_streams_helper.py +53 -0
- modal/mount.py +3 -5
- modal/mount.pyi +4 -4
- modal/partial_function.py +4 -4
- modal/runner.py +34 -37
- modal/runner.pyi +6 -3
- modal/running_app.py +23 -4
- modal/sandbox.py +19 -6
- modal/sandbox.pyi +25 -0
- {modal-0.68.50.dist-info → modal-0.71.5.dist-info}/METADATA +1 -1
- {modal-0.68.50.dist-info → modal-0.71.5.dist-info}/RECORD +44 -42
- modal_proto/api.proto +13 -0
- modal_proto/api_grpc.py +16 -0
- modal_proto/api_pb2.py +456 -436
- modal_proto/api_pb2.pyi +41 -1
- modal_proto/api_pb2_grpc.py +34 -1
- modal_proto/api_pb2_grpc.pyi +13 -3
- modal_proto/modal_api_grpc.py +1 -0
- modal_version/__init__.py +1 -1
- modal_version/_version_generated.py +2 -2
- {modal-0.68.50.dist-info → modal-0.71.5.dist-info}/LICENSE +0 -0
- {modal-0.68.50.dist-info → modal-0.71.5.dist-info}/WHEEL +0 -0
- {modal-0.68.50.dist-info → modal-0.71.5.dist-info}/entry_points.txt +0 -0
- {modal-0.68.50.dist-info → modal-0.71.5.dist-info}/top_level.txt +0 -0
modal_proto/api_pb2.pyi
CHANGED
@@ -4645,6 +4645,7 @@ class FunctionGetOutputsRequest(google.protobuf.message.Message):
|
|
4645
4645
|
LAST_ENTRY_ID_FIELD_NUMBER: builtins.int
|
4646
4646
|
CLEAR_ON_SUCCESS_FIELD_NUMBER: builtins.int
|
4647
4647
|
REQUESTED_AT_FIELD_NUMBER: builtins.int
|
4648
|
+
INPUT_JWTS_FIELD_NUMBER: builtins.int
|
4648
4649
|
function_call_id: builtins.str
|
4649
4650
|
max_values: builtins.int
|
4650
4651
|
timeout: builtins.float
|
@@ -4653,6 +4654,9 @@ class FunctionGetOutputsRequest(google.protobuf.message.Message):
|
|
4653
4654
|
"""expires *any* remaining outputs soon after this call, not just the returned ones"""
|
4654
4655
|
requested_at: builtins.float
|
4655
4656
|
"""Used for waypoints."""
|
4657
|
+
@property
|
4658
|
+
def input_jwts(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
|
4659
|
+
"""The jwts the client expects the server to be processing. This is optional and used for sync inputs only."""
|
4656
4660
|
def __init__(
|
4657
4661
|
self,
|
4658
4662
|
*,
|
@@ -4662,8 +4666,9 @@ class FunctionGetOutputsRequest(google.protobuf.message.Message):
|
|
4662
4666
|
last_entry_id: builtins.str = ...,
|
4663
4667
|
clear_on_success: builtins.bool = ...,
|
4664
4668
|
requested_at: builtins.float = ...,
|
4669
|
+
input_jwts: collections.abc.Iterable[builtins.str] | None = ...,
|
4665
4670
|
) -> None: ...
|
4666
|
-
def ClearField(self, field_name: typing_extensions.Literal["clear_on_success", b"clear_on_success", "function_call_id", b"function_call_id", "last_entry_id", b"last_entry_id", "max_values", b"max_values", "requested_at", b"requested_at", "timeout", b"timeout"]) -> None: ...
|
4671
|
+
def ClearField(self, field_name: typing_extensions.Literal["clear_on_success", b"clear_on_success", "function_call_id", b"function_call_id", "input_jwts", b"input_jwts", "last_entry_id", b"last_entry_id", "max_values", b"max_values", "requested_at", b"requested_at", "timeout", b"timeout"]) -> None: ...
|
4667
4672
|
|
4668
4673
|
global___FunctionGetOutputsRequest = FunctionGetOutputsRequest
|
4669
4674
|
|
@@ -5370,6 +5375,7 @@ class GenericResult(google.protobuf.message.Message):
|
|
5370
5375
|
"""Used when the user's function fails to initialize (ex. S3 mount failed due to invalid credentials).
|
5371
5376
|
Terminates the function and all remaining inputs.
|
5372
5377
|
"""
|
5378
|
+
GENERIC_STATUS_INTERNAL_FAILURE: GenericResult._GenericStatus.ValueType # 6
|
5373
5379
|
|
5374
5380
|
class GenericStatus(_GenericStatus, metaclass=_GenericStatusEnumTypeWrapper): ...
|
5375
5381
|
GENERIC_STATUS_UNSPECIFIED: GenericResult.GenericStatus.ValueType # 0
|
@@ -5382,6 +5388,7 @@ class GenericResult(google.protobuf.message.Message):
|
|
5382
5388
|
"""Used when the user's function fails to initialize (ex. S3 mount failed due to invalid credentials).
|
5383
5389
|
Terminates the function and all remaining inputs.
|
5384
5390
|
"""
|
5391
|
+
GENERIC_STATUS_INTERNAL_FAILURE: GenericResult.GenericStatus.ValueType # 6
|
5385
5392
|
|
5386
5393
|
STATUS_FIELD_NUMBER: builtins.int
|
5387
5394
|
EXCEPTION_FIELD_NUMBER: builtins.int
|
@@ -5516,6 +5523,39 @@ class ImageContextFile(google.protobuf.message.Message):
|
|
5516
5523
|
|
5517
5524
|
global___ImageContextFile = ImageContextFile
|
5518
5525
|
|
5526
|
+
class ImageFromIdRequest(google.protobuf.message.Message):
|
5527
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
5528
|
+
|
5529
|
+
IMAGE_ID_FIELD_NUMBER: builtins.int
|
5530
|
+
image_id: builtins.str
|
5531
|
+
def __init__(
|
5532
|
+
self,
|
5533
|
+
*,
|
5534
|
+
image_id: builtins.str = ...,
|
5535
|
+
) -> None: ...
|
5536
|
+
def ClearField(self, field_name: typing_extensions.Literal["image_id", b"image_id"]) -> None: ...
|
5537
|
+
|
5538
|
+
global___ImageFromIdRequest = ImageFromIdRequest
|
5539
|
+
|
5540
|
+
class ImageFromIdResponse(google.protobuf.message.Message):
|
5541
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
5542
|
+
|
5543
|
+
IMAGE_ID_FIELD_NUMBER: builtins.int
|
5544
|
+
METADATA_FIELD_NUMBER: builtins.int
|
5545
|
+
image_id: builtins.str
|
5546
|
+
@property
|
5547
|
+
def metadata(self) -> global___ImageMetadata: ...
|
5548
|
+
def __init__(
|
5549
|
+
self,
|
5550
|
+
*,
|
5551
|
+
image_id: builtins.str = ...,
|
5552
|
+
metadata: global___ImageMetadata | None = ...,
|
5553
|
+
) -> None: ...
|
5554
|
+
def HasField(self, field_name: typing_extensions.Literal["metadata", b"metadata"]) -> builtins.bool: ...
|
5555
|
+
def ClearField(self, field_name: typing_extensions.Literal["image_id", b"image_id", "metadata", b"metadata"]) -> None: ...
|
5556
|
+
|
5557
|
+
global___ImageFromIdResponse = ImageFromIdResponse
|
5558
|
+
|
5519
5559
|
class ImageGetOrCreateRequest(google.protobuf.message.Message):
|
5520
5560
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
5521
5561
|
|
modal_proto/api_pb2_grpc.py
CHANGED
@@ -380,6 +380,11 @@ class ModalClientStub(object):
|
|
380
380
|
request_serializer=modal__proto_dot_api__pb2.FunctionUpdateSchedulingParamsRequest.SerializeToString,
|
381
381
|
response_deserializer=modal__proto_dot_api__pb2.FunctionUpdateSchedulingParamsResponse.FromString,
|
382
382
|
)
|
383
|
+
self.ImageFromId = channel.unary_unary(
|
384
|
+
'/modal.client.ModalClient/ImageFromId',
|
385
|
+
request_serializer=modal__proto_dot_api__pb2.ImageFromIdRequest.SerializeToString,
|
386
|
+
response_deserializer=modal__proto_dot_api__pb2.ImageFromIdResponse.FromString,
|
387
|
+
)
|
383
388
|
self.ImageGetOrCreate = channel.unary_unary(
|
384
389
|
'/modal.client.ModalClient/ImageGetOrCreate',
|
385
390
|
request_serializer=modal__proto_dot_api__pb2.ImageGetOrCreateRequest.SerializeToString,
|
@@ -1135,13 +1140,19 @@ class ModalClientServicer(object):
|
|
1135
1140
|
context.set_details('Method not implemented!')
|
1136
1141
|
raise NotImplementedError('Method not implemented!')
|
1137
1142
|
|
1138
|
-
def
|
1143
|
+
def ImageFromId(self, request, context):
|
1139
1144
|
"""Images
|
1140
1145
|
"""
|
1141
1146
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
1142
1147
|
context.set_details('Method not implemented!')
|
1143
1148
|
raise NotImplementedError('Method not implemented!')
|
1144
1149
|
|
1150
|
+
def ImageGetOrCreate(self, request, context):
|
1151
|
+
"""Missing associated documentation comment in .proto file."""
|
1152
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
1153
|
+
context.set_details('Method not implemented!')
|
1154
|
+
raise NotImplementedError('Method not implemented!')
|
1155
|
+
|
1145
1156
|
def ImageJoinStreaming(self, request, context):
|
1146
1157
|
"""Missing associated documentation comment in .proto file."""
|
1147
1158
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
@@ -1876,6 +1887,11 @@ def add_ModalClientServicer_to_server(servicer, server):
|
|
1876
1887
|
request_deserializer=modal__proto_dot_api__pb2.FunctionUpdateSchedulingParamsRequest.FromString,
|
1877
1888
|
response_serializer=modal__proto_dot_api__pb2.FunctionUpdateSchedulingParamsResponse.SerializeToString,
|
1878
1889
|
),
|
1890
|
+
'ImageFromId': grpc.unary_unary_rpc_method_handler(
|
1891
|
+
servicer.ImageFromId,
|
1892
|
+
request_deserializer=modal__proto_dot_api__pb2.ImageFromIdRequest.FromString,
|
1893
|
+
response_serializer=modal__proto_dot_api__pb2.ImageFromIdResponse.SerializeToString,
|
1894
|
+
),
|
1879
1895
|
'ImageGetOrCreate': grpc.unary_unary_rpc_method_handler(
|
1880
1896
|
servicer.ImageGetOrCreate,
|
1881
1897
|
request_deserializer=modal__proto_dot_api__pb2.ImageGetOrCreateRequest.FromString,
|
@@ -3427,6 +3443,23 @@ class ModalClient(object):
|
|
3427
3443
|
options, channel_credentials,
|
3428
3444
|
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
3429
3445
|
|
3446
|
+
@staticmethod
|
3447
|
+
def ImageFromId(request,
|
3448
|
+
target,
|
3449
|
+
options=(),
|
3450
|
+
channel_credentials=None,
|
3451
|
+
call_credentials=None,
|
3452
|
+
insecure=False,
|
3453
|
+
compression=None,
|
3454
|
+
wait_for_ready=None,
|
3455
|
+
timeout=None,
|
3456
|
+
metadata=None):
|
3457
|
+
return grpc.experimental.unary_unary(request, target, '/modal.client.ModalClient/ImageFromId',
|
3458
|
+
modal__proto_dot_api__pb2.ImageFromIdRequest.SerializeToString,
|
3459
|
+
modal__proto_dot_api__pb2.ImageFromIdResponse.FromString,
|
3460
|
+
options, channel_credentials,
|
3461
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
3462
|
+
|
3430
3463
|
@staticmethod
|
3431
3464
|
def ImageGetOrCreate(request,
|
3432
3465
|
target,
|
modal_proto/api_pb2_grpc.pyi
CHANGED
@@ -314,11 +314,15 @@ class ModalClientStub:
|
|
314
314
|
modal_proto.api_pb2.FunctionUpdateSchedulingParamsRequest,
|
315
315
|
modal_proto.api_pb2.FunctionUpdateSchedulingParamsResponse,
|
316
316
|
]
|
317
|
+
ImageFromId: grpc.UnaryUnaryMultiCallable[
|
318
|
+
modal_proto.api_pb2.ImageFromIdRequest,
|
319
|
+
modal_proto.api_pb2.ImageFromIdResponse,
|
320
|
+
]
|
321
|
+
"""Images"""
|
317
322
|
ImageGetOrCreate: grpc.UnaryUnaryMultiCallable[
|
318
323
|
modal_proto.api_pb2.ImageGetOrCreateRequest,
|
319
324
|
modal_proto.api_pb2.ImageGetOrCreateResponse,
|
320
325
|
]
|
321
|
-
"""Images"""
|
322
326
|
ImageJoinStreaming: grpc.UnaryStreamMultiCallable[
|
323
327
|
modal_proto.api_pb2.ImageJoinStreamingRequest,
|
324
328
|
modal_proto.api_pb2.ImageJoinStreamingResponse,
|
@@ -1020,12 +1024,18 @@ class ModalClientServicer(metaclass=abc.ABCMeta):
|
|
1020
1024
|
context: grpc.ServicerContext,
|
1021
1025
|
) -> modal_proto.api_pb2.FunctionUpdateSchedulingParamsResponse: ...
|
1022
1026
|
@abc.abstractmethod
|
1027
|
+
def ImageFromId(
|
1028
|
+
self,
|
1029
|
+
request: modal_proto.api_pb2.ImageFromIdRequest,
|
1030
|
+
context: grpc.ServicerContext,
|
1031
|
+
) -> modal_proto.api_pb2.ImageFromIdResponse:
|
1032
|
+
"""Images"""
|
1033
|
+
@abc.abstractmethod
|
1023
1034
|
def ImageGetOrCreate(
|
1024
1035
|
self,
|
1025
1036
|
request: modal_proto.api_pb2.ImageGetOrCreateRequest,
|
1026
1037
|
context: grpc.ServicerContext,
|
1027
|
-
) -> modal_proto.api_pb2.ImageGetOrCreateResponse:
|
1028
|
-
"""Images"""
|
1038
|
+
) -> modal_proto.api_pb2.ImageGetOrCreateResponse: ...
|
1029
1039
|
@abc.abstractmethod
|
1030
1040
|
def ImageJoinStreaming(
|
1031
1041
|
self,
|
modal_proto/modal_api_grpc.py
CHANGED
@@ -85,6 +85,7 @@ class ModalClientModal:
|
|
85
85
|
self.FunctionRetryInputs = modal.client.UnaryUnaryWrapper(grpclib_stub.FunctionRetryInputs, client)
|
86
86
|
self.FunctionStartPtyShell = modal.client.UnaryUnaryWrapper(grpclib_stub.FunctionStartPtyShell, client)
|
87
87
|
self.FunctionUpdateSchedulingParams = modal.client.UnaryUnaryWrapper(grpclib_stub.FunctionUpdateSchedulingParams, client)
|
88
|
+
self.ImageFromId = modal.client.UnaryUnaryWrapper(grpclib_stub.ImageFromId, client)
|
88
89
|
self.ImageGetOrCreate = modal.client.UnaryUnaryWrapper(grpclib_stub.ImageGetOrCreate, client)
|
89
90
|
self.ImageJoinStreaming = modal.client.UnaryStreamWrapper(grpclib_stub.ImageJoinStreaming, client)
|
90
91
|
self.MountGetOrCreate = modal.client.UnaryUnaryWrapper(grpclib_stub.MountGetOrCreate, client)
|
modal_version/__init__.py
CHANGED
@@ -7,7 +7,7 @@ from ._version_generated import build_number
|
|
7
7
|
major_number = 0
|
8
8
|
|
9
9
|
# Bump this manually on breaking changes, then reset the number in _version_generated.py
|
10
|
-
minor_number =
|
10
|
+
minor_number = 71
|
11
11
|
|
12
12
|
# Right now, automatically increment the patch number in CI
|
13
13
|
__version__ = f"{major_number}.{minor_number}.{max(build_number, 0)}"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|