modal 0.66.17__py3-none-any.whl → 0.66.44__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 +5 -342
- modal/_runtime/container_io_manager.py +6 -14
- modal/_runtime/user_code_imports.py +361 -0
- modal/_utils/function_utils.py +28 -8
- modal/_utils/grpc_testing.py +33 -26
- modal/app.py +13 -46
- modal/cli/import_refs.py +4 -38
- modal/client.pyi +2 -2
- modal/cls.py +26 -19
- modal/cls.pyi +4 -4
- modal/dict.py +0 -6
- modal/dict.pyi +0 -4
- modal/experimental.py +0 -3
- modal/functions.py +42 -38
- modal/functions.pyi +9 -13
- modal/gpu.py +8 -6
- modal/image.py +141 -7
- modal/image.pyi +34 -4
- modal/io_streams.py +40 -33
- modal/io_streams.pyi +13 -13
- modal/mount.py +5 -2
- modal/network_file_system.py +0 -28
- modal/network_file_system.pyi +0 -14
- modal/partial_function.py +12 -2
- modal/queue.py +0 -6
- modal/queue.pyi +0 -4
- modal/sandbox.py +1 -1
- modal/volume.py +0 -22
- modal/volume.pyi +0 -9
- {modal-0.66.17.dist-info → modal-0.66.44.dist-info}/METADATA +1 -2
- {modal-0.66.17.dist-info → modal-0.66.44.dist-info}/RECORD +43 -42
- modal_proto/api.proto +3 -20
- modal_proto/api_grpc.py +0 -16
- modal_proto/api_pb2.py +389 -413
- modal_proto/api_pb2.pyi +12 -58
- modal_proto/api_pb2_grpc.py +0 -33
- modal_proto/api_pb2_grpc.pyi +0 -10
- modal_proto/modal_api_grpc.py +0 -1
- modal_version/_version_generated.py +1 -1
- {modal-0.66.17.dist-info → modal-0.66.44.dist-info}/LICENSE +0 -0
- {modal-0.66.17.dist-info → modal-0.66.44.dist-info}/WHEEL +0 -0
- {modal-0.66.17.dist-info → modal-0.66.44.dist-info}/entry_points.txt +0 -0
- {modal-0.66.17.dist-info → modal-0.66.44.dist-info}/top_level.txt +0 -0
modal_proto/api_pb2.pyi
CHANGED
@@ -375,23 +375,6 @@ GPU_TYPE_H100: GPUType.ValueType # 10
|
|
375
375
|
GPU_TYPE_L40S: GPUType.ValueType # 11
|
376
376
|
global___GPUType = GPUType
|
377
377
|
|
378
|
-
class _InstrumentationType:
|
379
|
-
ValueType = typing.NewType("ValueType", builtins.int)
|
380
|
-
V: typing_extensions.TypeAlias = ValueType
|
381
|
-
|
382
|
-
class _InstrumentationTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_InstrumentationType.ValueType], builtins.type): # noqa: F821
|
383
|
-
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
|
384
|
-
INSTRUMENTATION_TYPE_UNSPECIFIED: _InstrumentationType.ValueType # 0
|
385
|
-
INSTRUMENTATION_TYPE_METRICS: _InstrumentationType.ValueType # 1
|
386
|
-
INSTRUMENTATION_TYPE_TRACE: _InstrumentationType.ValueType # 2
|
387
|
-
|
388
|
-
class InstrumentationType(_InstrumentationType, metaclass=_InstrumentationTypeEnumTypeWrapper): ...
|
389
|
-
|
390
|
-
INSTRUMENTATION_TYPE_UNSPECIFIED: InstrumentationType.ValueType # 0
|
391
|
-
INSTRUMENTATION_TYPE_METRICS: InstrumentationType.ValueType # 1
|
392
|
-
INSTRUMENTATION_TYPE_TRACE: InstrumentationType.ValueType # 2
|
393
|
-
global___InstrumentationType = InstrumentationType
|
394
|
-
|
395
378
|
class _ObjectCreationType:
|
396
379
|
ValueType = typing.NewType("ValueType", builtins.int)
|
397
380
|
V: typing_extensions.TypeAlias = ValueType
|
@@ -650,24 +633,6 @@ TASK_STATE_PREEMPTED: TaskState.ValueType # 10
|
|
650
633
|
TASK_STATE_LOADING_CHECKPOINT_IMAGE: TaskState.ValueType # 11
|
651
634
|
global___TaskState = TaskState
|
652
635
|
|
653
|
-
class _TelemetryEncodingType:
|
654
|
-
ValueType = typing.NewType("ValueType", builtins.int)
|
655
|
-
V: typing_extensions.TypeAlias = ValueType
|
656
|
-
|
657
|
-
class _TelemetryEncodingTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_TelemetryEncodingType.ValueType], builtins.type): # noqa: F821
|
658
|
-
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
|
659
|
-
TELEMETRY_ENCODING_TYPE_UNSPECIFIED: _TelemetryEncodingType.ValueType # 0
|
660
|
-
TELEMETRY_ENCODING_TYPE_PROTOBUF: _TelemetryEncodingType.ValueType # 1
|
661
|
-
TELEMETRY_ENCODING_TYPE_JSON: _TelemetryEncodingType.ValueType # 2
|
662
|
-
|
663
|
-
class TelemetryEncodingType(_TelemetryEncodingType, metaclass=_TelemetryEncodingTypeEnumTypeWrapper):
|
664
|
-
"""Encoding type used for user telemetry data."""
|
665
|
-
|
666
|
-
TELEMETRY_ENCODING_TYPE_UNSPECIFIED: TelemetryEncodingType.ValueType # 0
|
667
|
-
TELEMETRY_ENCODING_TYPE_PROTOBUF: TelemetryEncodingType.ValueType # 1
|
668
|
-
TELEMETRY_ENCODING_TYPE_JSON: TelemetryEncodingType.ValueType # 2
|
669
|
-
global___TelemetryEncodingType = TelemetryEncodingType
|
670
|
-
|
671
636
|
class _VolumeFsVersion:
|
672
637
|
ValueType = typing.NewType("ValueType", builtins.int)
|
673
638
|
V: typing_extensions.TypeAlias = ValueType
|
@@ -4996,26 +4961,6 @@ class FunctionPutOutputsRequest(google.protobuf.message.Message):
|
|
4996
4961
|
|
4997
4962
|
global___FunctionPutOutputsRequest = FunctionPutOutputsRequest
|
4998
4963
|
|
4999
|
-
class FunctionPutUserTelemetryRequest(google.protobuf.message.Message):
|
5000
|
-
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
5001
|
-
|
5002
|
-
DATA_FIELD_NUMBER: builtins.int
|
5003
|
-
ENCODING_TYPE_FIELD_NUMBER: builtins.int
|
5004
|
-
INSTRUMENTATION_TYPE_FIELD_NUMBER: builtins.int
|
5005
|
-
data: builtins.bytes
|
5006
|
-
encoding_type: global___TelemetryEncodingType.ValueType
|
5007
|
-
instrumentation_type: global___InstrumentationType.ValueType
|
5008
|
-
def __init__(
|
5009
|
-
self,
|
5010
|
-
*,
|
5011
|
-
data: builtins.bytes = ...,
|
5012
|
-
encoding_type: global___TelemetryEncodingType.ValueType = ...,
|
5013
|
-
instrumentation_type: global___InstrumentationType.ValueType = ...,
|
5014
|
-
) -> None: ...
|
5015
|
-
def ClearField(self, field_name: typing_extensions.Literal["data", b"data", "encoding_type", b"encoding_type", "instrumentation_type", b"instrumentation_type"]) -> None: ...
|
5016
|
-
|
5017
|
-
global___FunctionPutUserTelemetryRequest = FunctionPutUserTelemetryRequest
|
5018
|
-
|
5019
4964
|
class FunctionRetryInputsItem(google.protobuf.message.Message):
|
5020
4965
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
5021
4966
|
|
@@ -5602,6 +5547,7 @@ class MethodDefinition(google.protobuf.message.Message):
|
|
5602
5547
|
WEBHOOK_CONFIG_FIELD_NUMBER: builtins.int
|
5603
5548
|
WEB_URL_FIELD_NUMBER: builtins.int
|
5604
5549
|
WEB_URL_INFO_FIELD_NUMBER: builtins.int
|
5550
|
+
CUSTOM_DOMAIN_INFO_FIELD_NUMBER: builtins.int
|
5605
5551
|
function_name: builtins.str
|
5606
5552
|
function_type: global___Function.FunctionType.ValueType
|
5607
5553
|
@property
|
@@ -5609,6 +5555,8 @@ class MethodDefinition(google.protobuf.message.Message):
|
|
5609
5555
|
web_url: builtins.str
|
5610
5556
|
@property
|
5611
5557
|
def web_url_info(self) -> global___WebUrlInfo: ...
|
5558
|
+
@property
|
5559
|
+
def custom_domain_info(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___CustomDomainInfo]: ...
|
5612
5560
|
def __init__(
|
5613
5561
|
self,
|
5614
5562
|
*,
|
@@ -5617,9 +5565,10 @@ class MethodDefinition(google.protobuf.message.Message):
|
|
5617
5565
|
webhook_config: global___WebhookConfig | None = ...,
|
5618
5566
|
web_url: builtins.str = ...,
|
5619
5567
|
web_url_info: global___WebUrlInfo | None = ...,
|
5568
|
+
custom_domain_info: collections.abc.Iterable[global___CustomDomainInfo] | None = ...,
|
5620
5569
|
) -> None: ...
|
5621
5570
|
def HasField(self, field_name: typing_extensions.Literal["web_url_info", b"web_url_info", "webhook_config", b"webhook_config"]) -> builtins.bool: ...
|
5622
|
-
def ClearField(self, field_name: typing_extensions.Literal["function_name", b"function_name", "function_type", b"function_type", "web_url", b"web_url", "web_url_info", b"web_url_info", "webhook_config", b"webhook_config"]) -> None: ...
|
5571
|
+
def ClearField(self, field_name: typing_extensions.Literal["custom_domain_info", b"custom_domain_info", "function_name", b"function_name", "function_type", b"function_type", "web_url", b"web_url", "web_url_info", b"web_url_info", "webhook_config", b"webhook_config"]) -> None: ...
|
5623
5572
|
|
5624
5573
|
global___MethodDefinition = MethodDefinition
|
5625
5574
|
|
@@ -6621,6 +6570,7 @@ class Sandbox(google.protobuf.message.Message):
|
|
6621
6570
|
OPEN_PORTS_FIELD_NUMBER: builtins.int
|
6622
6571
|
I6PN_ENABLED_FIELD_NUMBER: builtins.int
|
6623
6572
|
NETWORK_ACCESS_FIELD_NUMBER: builtins.int
|
6573
|
+
PROXY_ID_FIELD_NUMBER: builtins.int
|
6624
6574
|
@property
|
6625
6575
|
def entrypoint_args(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: ...
|
6626
6576
|
@property
|
@@ -6656,6 +6606,7 @@ class Sandbox(google.protobuf.message.Message):
|
|
6656
6606
|
@property
|
6657
6607
|
def network_access(self) -> global___NetworkAccess:
|
6658
6608
|
"""Network access configuration beyond simple allow/block."""
|
6609
|
+
proxy_id: builtins.str
|
6659
6610
|
def __init__(
|
6660
6611
|
self,
|
6661
6612
|
*,
|
@@ -6679,9 +6630,12 @@ class Sandbox(google.protobuf.message.Message):
|
|
6679
6630
|
open_ports: global___PortSpecs | None = ...,
|
6680
6631
|
i6pn_enabled: builtins.bool = ...,
|
6681
6632
|
network_access: global___NetworkAccess | None = ...,
|
6633
|
+
proxy_id: builtins.str | None = ...,
|
6682
6634
|
) -> None: ...
|
6683
|
-
def HasField(self, field_name: typing_extensions.Literal["_scheduler_placement", b"_scheduler_placement", "_workdir", b"_workdir", "network_access", b"network_access", "open_ports", b"open_ports", "open_ports_oneof", b"open_ports_oneof", "pty_info", b"pty_info", "resources", b"resources", "scheduler_placement", b"scheduler_placement", "workdir", b"workdir"]) -> builtins.bool: ...
|
6684
|
-
def ClearField(self, field_name: typing_extensions.Literal["_scheduler_placement", b"_scheduler_placement", "_workdir", b"_workdir", "block_network", b"block_network", "cloud_bucket_mounts", b"cloud_bucket_mounts", "cloud_provider", b"cloud_provider", "entrypoint_args", b"entrypoint_args", "i6pn_enabled", b"i6pn_enabled", "image_id", b"image_id", "mount_ids", b"mount_ids", "network_access", b"network_access", "nfs_mounts", b"nfs_mounts", "open_ports", b"open_ports", "open_ports_oneof", b"open_ports_oneof", "pty_info", b"pty_info", "resources", b"resources", "runtime_debug", b"runtime_debug", "s3_mounts", b"s3_mounts", "scheduler_placement", b"scheduler_placement", "secret_ids", b"secret_ids", "timeout_secs", b"timeout_secs", "volume_mounts", b"volume_mounts", "workdir", b"workdir", "worker_id", b"worker_id"]) -> None: ...
|
6635
|
+
def HasField(self, field_name: typing_extensions.Literal["_proxy_id", b"_proxy_id", "_scheduler_placement", b"_scheduler_placement", "_workdir", b"_workdir", "network_access", b"network_access", "open_ports", b"open_ports", "open_ports_oneof", b"open_ports_oneof", "proxy_id", b"proxy_id", "pty_info", b"pty_info", "resources", b"resources", "scheduler_placement", b"scheduler_placement", "workdir", b"workdir"]) -> builtins.bool: ...
|
6636
|
+
def ClearField(self, field_name: typing_extensions.Literal["_proxy_id", b"_proxy_id", "_scheduler_placement", b"_scheduler_placement", "_workdir", b"_workdir", "block_network", b"block_network", "cloud_bucket_mounts", b"cloud_bucket_mounts", "cloud_provider", b"cloud_provider", "entrypoint_args", b"entrypoint_args", "i6pn_enabled", b"i6pn_enabled", "image_id", b"image_id", "mount_ids", b"mount_ids", "network_access", b"network_access", "nfs_mounts", b"nfs_mounts", "open_ports", b"open_ports", "open_ports_oneof", b"open_ports_oneof", "proxy_id", b"proxy_id", "pty_info", b"pty_info", "resources", b"resources", "runtime_debug", b"runtime_debug", "s3_mounts", b"s3_mounts", "scheduler_placement", b"scheduler_placement", "secret_ids", b"secret_ids", "timeout_secs", b"timeout_secs", "volume_mounts", b"volume_mounts", "workdir", b"workdir", "worker_id", b"worker_id"]) -> None: ...
|
6637
|
+
@typing.overload
|
6638
|
+
def WhichOneof(self, oneof_group: typing_extensions.Literal["_proxy_id", b"_proxy_id"]) -> typing_extensions.Literal["proxy_id"] | None: ...
|
6685
6639
|
@typing.overload
|
6686
6640
|
def WhichOneof(self, oneof_group: typing_extensions.Literal["_scheduler_placement", b"_scheduler_placement"]) -> typing_extensions.Literal["scheduler_placement"] | None: ...
|
6687
6641
|
@typing.overload
|
modal_proto/api_pb2_grpc.py
CHANGED
@@ -350,11 +350,6 @@ class ModalClientStub(object):
|
|
350
350
|
request_serializer=modal__proto_dot_api__pb2.FunctionPutOutputsRequest.SerializeToString,
|
351
351
|
response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
|
352
352
|
)
|
353
|
-
self.FunctionPutUserTelemetry = channel.unary_unary(
|
354
|
-
'/modal.client.ModalClient/FunctionPutUserTelemetry',
|
355
|
-
request_serializer=modal__proto_dot_api__pb2.FunctionPutUserTelemetryRequest.SerializeToString,
|
356
|
-
response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
|
357
|
-
)
|
358
353
|
self.FunctionRetryInputs = channel.unary_unary(
|
359
354
|
'/modal.client.ModalClient/FunctionRetryInputs',
|
360
355
|
request_serializer=modal__proto_dot_api__pb2.FunctionRetryInputsRequest.SerializeToString,
|
@@ -1084,12 +1079,6 @@ class ModalClientServicer(object):
|
|
1084
1079
|
context.set_details('Method not implemented!')
|
1085
1080
|
raise NotImplementedError('Method not implemented!')
|
1086
1081
|
|
1087
|
-
def FunctionPutUserTelemetry(self, request, context):
|
1088
|
-
"""Missing associated documentation comment in .proto file."""
|
1089
|
-
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
1090
|
-
context.set_details('Method not implemented!')
|
1091
|
-
raise NotImplementedError('Method not implemented!')
|
1092
|
-
|
1093
1082
|
def FunctionRetryInputs(self, request, context):
|
1094
1083
|
"""Missing associated documentation comment in .proto file."""
|
1095
1084
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
@@ -1813,11 +1802,6 @@ def add_ModalClientServicer_to_server(servicer, server):
|
|
1813
1802
|
request_deserializer=modal__proto_dot_api__pb2.FunctionPutOutputsRequest.FromString,
|
1814
1803
|
response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
|
1815
1804
|
),
|
1816
|
-
'FunctionPutUserTelemetry': grpc.unary_unary_rpc_method_handler(
|
1817
|
-
servicer.FunctionPutUserTelemetry,
|
1818
|
-
request_deserializer=modal__proto_dot_api__pb2.FunctionPutUserTelemetryRequest.FromString,
|
1819
|
-
response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
|
1820
|
-
),
|
1821
1805
|
'FunctionRetryInputs': grpc.unary_unary_rpc_method_handler(
|
1822
1806
|
servicer.FunctionRetryInputs,
|
1823
1807
|
request_deserializer=modal__proto_dot_api__pb2.FunctionRetryInputsRequest.FromString,
|
@@ -3277,23 +3261,6 @@ class ModalClient(object):
|
|
3277
3261
|
options, channel_credentials,
|
3278
3262
|
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
3279
3263
|
|
3280
|
-
@staticmethod
|
3281
|
-
def FunctionPutUserTelemetry(request,
|
3282
|
-
target,
|
3283
|
-
options=(),
|
3284
|
-
channel_credentials=None,
|
3285
|
-
call_credentials=None,
|
3286
|
-
insecure=False,
|
3287
|
-
compression=None,
|
3288
|
-
wait_for_ready=None,
|
3289
|
-
timeout=None,
|
3290
|
-
metadata=None):
|
3291
|
-
return grpc.experimental.unary_unary(request, target, '/modal.client.ModalClient/FunctionPutUserTelemetry',
|
3292
|
-
modal__proto_dot_api__pb2.FunctionPutUserTelemetryRequest.SerializeToString,
|
3293
|
-
google_dot_protobuf_dot_empty__pb2.Empty.FromString,
|
3294
|
-
options, channel_credentials,
|
3295
|
-
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
3296
|
-
|
3297
3264
|
@staticmethod
|
3298
3265
|
def FunctionRetryInputs(request,
|
3299
3266
|
target,
|
modal_proto/api_pb2_grpc.pyi
CHANGED
@@ -290,10 +290,6 @@ class ModalClientStub:
|
|
290
290
|
google.protobuf.empty_pb2.Empty,
|
291
291
|
]
|
292
292
|
"""For containers to return result"""
|
293
|
-
FunctionPutUserTelemetry: grpc.UnaryUnaryMultiCallable[
|
294
|
-
modal_proto.api_pb2.FunctionPutUserTelemetryRequest,
|
295
|
-
google.protobuf.empty_pb2.Empty,
|
296
|
-
]
|
297
293
|
FunctionRetryInputs: grpc.UnaryUnaryMultiCallable[
|
298
294
|
modal_proto.api_pb2.FunctionRetryInputsRequest,
|
299
295
|
modal_proto.api_pb2.FunctionRetryInputsResponse,
|
@@ -972,12 +968,6 @@ class ModalClientServicer(metaclass=abc.ABCMeta):
|
|
972
968
|
) -> google.protobuf.empty_pb2.Empty:
|
973
969
|
"""For containers to return result"""
|
974
970
|
@abc.abstractmethod
|
975
|
-
def FunctionPutUserTelemetry(
|
976
|
-
self,
|
977
|
-
request: modal_proto.api_pb2.FunctionPutUserTelemetryRequest,
|
978
|
-
context: grpc.ServicerContext,
|
979
|
-
) -> google.protobuf.empty_pb2.Empty: ...
|
980
|
-
@abc.abstractmethod
|
981
971
|
def FunctionRetryInputs(
|
982
972
|
self,
|
983
973
|
request: modal_proto.api_pb2.FunctionRetryInputsRequest,
|
modal_proto/modal_api_grpc.py
CHANGED
@@ -79,7 +79,6 @@ class ModalClientModal:
|
|
79
79
|
self.FunctionPrecreate = modal.client.UnaryUnaryWrapper(grpclib_stub.FunctionPrecreate, client)
|
80
80
|
self.FunctionPutInputs = modal.client.UnaryUnaryWrapper(grpclib_stub.FunctionPutInputs, client)
|
81
81
|
self.FunctionPutOutputs = modal.client.UnaryUnaryWrapper(grpclib_stub.FunctionPutOutputs, client)
|
82
|
-
self.FunctionPutUserTelemetry = modal.client.UnaryUnaryWrapper(grpclib_stub.FunctionPutUserTelemetry, client)
|
83
82
|
self.FunctionRetryInputs = modal.client.UnaryUnaryWrapper(grpclib_stub.FunctionRetryInputs, client)
|
84
83
|
self.FunctionStartPtyShell = modal.client.UnaryUnaryWrapper(grpclib_stub.FunctionStartPtyShell, client)
|
85
84
|
self.FunctionUpdateSchedulingParams = modal.client.UnaryUnaryWrapper(grpclib_stub.FunctionUpdateSchedulingParams, client)
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|