modal 0.73.128__py3-none-any.whl → 0.73.131__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/__init__.py +0 -2
- modal/_functions.py +10 -7
- modal/_partial_function.py +0 -54
- modal/_resolver.py +6 -1
- modal/_serialization.py +78 -96
- modal/_type_manager.py +229 -0
- modal/_utils/function_utils.py +4 -27
- modal/app.py +5 -34
- modal/app.pyi +2 -3
- modal/client.pyi +2 -2
- modal/cls.py +6 -2
- modal/functions.pyi +7 -8
- modal/partial_function.py +0 -2
- modal/partial_function.pyi +0 -9
- {modal-0.73.128.dist-info → modal-0.73.131.dist-info}/METADATA +1 -1
- {modal-0.73.128.dist-info → modal-0.73.131.dist-info}/RECORD +24 -23
- modal_proto/api.proto +17 -6
- modal_proto/api_pb2.py +717 -704
- modal_proto/api_pb2.pyi +46 -8
- modal_version/_version_generated.py +1 -1
- {modal-0.73.128.dist-info → modal-0.73.131.dist-info}/LICENSE +0 -0
- {modal-0.73.128.dist-info → modal-0.73.131.dist-info}/WHEEL +0 -0
- {modal-0.73.128.dist-info → modal-0.73.131.dist-info}/entry_points.txt +0 -0
- {modal-0.73.128.dist-info → modal-0.73.131.dist-info}/top_level.txt +0 -0
modal_proto/api_pb2.pyi
CHANGED
@@ -423,9 +423,13 @@ class _ParameterTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._
|
|
423
423
|
PARAM_TYPE_STRING: _ParameterType.ValueType # 1
|
424
424
|
PARAM_TYPE_INT: _ParameterType.ValueType # 2
|
425
425
|
PARAM_TYPE_PICKLE: _ParameterType.ValueType # 3
|
426
|
+
"""currently unused"""
|
426
427
|
PARAM_TYPE_BYTES: _ParameterType.ValueType # 4
|
427
428
|
PARAM_TYPE_UNKNOWN: _ParameterType.ValueType # 5
|
428
429
|
"""used in schemas to signify unrecognized or un-annotated types"""
|
430
|
+
PARAM_TYPE_LIST: _ParameterType.ValueType # 6
|
431
|
+
PARAM_TYPE_DICT: _ParameterType.ValueType # 7
|
432
|
+
PARAM_TYPE_NONE: _ParameterType.ValueType # 8
|
429
433
|
|
430
434
|
class ParameterType(_ParameterType, metaclass=_ParameterTypeEnumTypeWrapper): ...
|
431
435
|
|
@@ -433,9 +437,13 @@ PARAM_TYPE_UNSPECIFIED: ParameterType.ValueType # 0
|
|
433
437
|
PARAM_TYPE_STRING: ParameterType.ValueType # 1
|
434
438
|
PARAM_TYPE_INT: ParameterType.ValueType # 2
|
435
439
|
PARAM_TYPE_PICKLE: ParameterType.ValueType # 3
|
440
|
+
"""currently unused"""
|
436
441
|
PARAM_TYPE_BYTES: ParameterType.ValueType # 4
|
437
442
|
PARAM_TYPE_UNKNOWN: ParameterType.ValueType # 5
|
438
443
|
"""used in schemas to signify unrecognized or un-annotated types"""
|
444
|
+
PARAM_TYPE_LIST: ParameterType.ValueType # 6
|
445
|
+
PARAM_TYPE_DICT: ParameterType.ValueType # 7
|
446
|
+
PARAM_TYPE_NONE: ParameterType.ValueType # 8
|
439
447
|
global___ParameterType = ParameterType
|
440
448
|
|
441
449
|
class _ProgressType:
|
@@ -2202,6 +2210,8 @@ class ClassParameterSet(google.protobuf.message.Message):
|
|
2202
2210
|
global___ClassParameterSet = ClassParameterSet
|
2203
2211
|
|
2204
2212
|
class ClassParameterSpec(google.protobuf.message.Message):
|
2213
|
+
"""TODO: rename into NamedPayloadType or similar"""
|
2214
|
+
|
2205
2215
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
2206
2216
|
|
2207
2217
|
NAME_FIELD_NUMBER: builtins.int
|
@@ -2211,13 +2221,19 @@ class ClassParameterSpec(google.protobuf.message.Message):
|
|
2211
2221
|
INT_DEFAULT_FIELD_NUMBER: builtins.int
|
2212
2222
|
PICKLE_DEFAULT_FIELD_NUMBER: builtins.int
|
2213
2223
|
BYTES_DEFAULT_FIELD_NUMBER: builtins.int
|
2224
|
+
FULL_TYPE_FIELD_NUMBER: builtins.int
|
2214
2225
|
name: builtins.str
|
2215
2226
|
type: global___ParameterType.ValueType
|
2227
|
+
"""TODO: deprecate - use full_type instead"""
|
2216
2228
|
has_default: builtins.bool
|
2217
2229
|
string_default: builtins.str
|
2230
|
+
"""Default *values* are only registered for class parameters"""
|
2218
2231
|
int_default: builtins.int
|
2219
2232
|
pickle_default: builtins.bytes
|
2220
2233
|
bytes_default: builtins.bytes
|
2234
|
+
@property
|
2235
|
+
def full_type(self) -> global___GenericPayloadType:
|
2236
|
+
"""supersedes `type`"""
|
2221
2237
|
def __init__(
|
2222
2238
|
self,
|
2223
2239
|
*,
|
@@ -2228,14 +2244,17 @@ class ClassParameterSpec(google.protobuf.message.Message):
|
|
2228
2244
|
int_default: builtins.int = ...,
|
2229
2245
|
pickle_default: builtins.bytes = ...,
|
2230
2246
|
bytes_default: builtins.bytes = ...,
|
2247
|
+
full_type: global___GenericPayloadType | None = ...,
|
2231
2248
|
) -> None: ...
|
2232
|
-
def HasField(self, field_name: typing_extensions.Literal["bytes_default", b"bytes_default", "default_oneof", b"default_oneof", "int_default", b"int_default", "pickle_default", b"pickle_default", "string_default", b"string_default"]) -> builtins.bool: ...
|
2233
|
-
def ClearField(self, field_name: typing_extensions.Literal["bytes_default", b"bytes_default", "default_oneof", b"default_oneof", "has_default", b"has_default", "int_default", b"int_default", "name", b"name", "pickle_default", b"pickle_default", "string_default", b"string_default", "type", b"type"]) -> None: ...
|
2249
|
+
def HasField(self, field_name: typing_extensions.Literal["bytes_default", b"bytes_default", "default_oneof", b"default_oneof", "full_type", b"full_type", "int_default", b"int_default", "pickle_default", b"pickle_default", "string_default", b"string_default"]) -> builtins.bool: ...
|
2250
|
+
def ClearField(self, field_name: typing_extensions.Literal["bytes_default", b"bytes_default", "default_oneof", b"default_oneof", "full_type", b"full_type", "has_default", b"has_default", "int_default", b"int_default", "name", b"name", "pickle_default", b"pickle_default", "string_default", b"string_default", "type", b"type"]) -> None: ...
|
2234
2251
|
def WhichOneof(self, oneof_group: typing_extensions.Literal["default_oneof", b"default_oneof"]) -> typing_extensions.Literal["string_default", "int_default", "pickle_default", "bytes_default"] | None: ...
|
2235
2252
|
|
2236
2253
|
global___ClassParameterSpec = ClassParameterSpec
|
2237
2254
|
|
2238
2255
|
class ClassParameterValue(google.protobuf.message.Message):
|
2256
|
+
"""TODO: rename into NamedPayloadValue"""
|
2257
|
+
|
2239
2258
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
2240
2259
|
|
2241
2260
|
NAME_FIELD_NUMBER: builtins.int
|
@@ -3862,7 +3881,7 @@ class Function(google.protobuf.message.Message):
|
|
3862
3881
|
RUNTIME_FIELD_NUMBER: builtins.int
|
3863
3882
|
APP_NAME_FIELD_NUMBER: builtins.int
|
3864
3883
|
VOLUME_MOUNTS_FIELD_NUMBER: builtins.int
|
3865
|
-
|
3884
|
+
TARGET_CONCURRENT_INPUTS_FIELD_NUMBER: builtins.int
|
3866
3885
|
CUSTOM_DOMAIN_INFO_FIELD_NUMBER: builtins.int
|
3867
3886
|
WORKER_ID_FIELD_NUMBER: builtins.int
|
3868
3887
|
RUNTIME_DEBUG_FIELD_NUMBER: builtins.int
|
@@ -3886,7 +3905,7 @@ class Function(google.protobuf.message.Message):
|
|
3886
3905
|
BATCH_LINGER_MS_FIELD_NUMBER: builtins.int
|
3887
3906
|
I6PN_ENABLED_FIELD_NUMBER: builtins.int
|
3888
3907
|
_EXPERIMENTAL_CONCURRENT_CANCELLATIONS_FIELD_NUMBER: builtins.int
|
3889
|
-
|
3908
|
+
MAX_CONCURRENT_INPUTS_FIELD_NUMBER: builtins.int
|
3890
3909
|
_EXPERIMENTAL_TASK_TEMPLATES_ENABLED_FIELD_NUMBER: builtins.int
|
3891
3910
|
_EXPERIMENTAL_TASK_TEMPLATES_FIELD_NUMBER: builtins.int
|
3892
3911
|
_EXPERIMENTAL_GROUP_SIZE_FIELD_NUMBER: builtins.int
|
@@ -3944,7 +3963,7 @@ class Function(google.protobuf.message.Message):
|
|
3944
3963
|
"""Formerly stub_name"""
|
3945
3964
|
@property
|
3946
3965
|
def volume_mounts(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___VolumeMount]: ...
|
3947
|
-
|
3966
|
+
target_concurrent_inputs: builtins.int
|
3948
3967
|
@property
|
3949
3968
|
def custom_domain_info(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___CustomDomainInfo]: ...
|
3950
3969
|
worker_id: builtins.str
|
@@ -3984,7 +4003,7 @@ class Function(google.protobuf.message.Message):
|
|
3984
4003
|
"""Miliseconds to block before a response is needed"""
|
3985
4004
|
i6pn_enabled: builtins.bool
|
3986
4005
|
_experimental_concurrent_cancellations: builtins.bool
|
3987
|
-
|
4006
|
+
max_concurrent_inputs: builtins.int
|
3988
4007
|
_experimental_task_templates_enabled: builtins.bool
|
3989
4008
|
"""TODO(irfansharif): Remove, once https://github.com/modal-labs/modal/pull/15645 lands.
|
3990
4009
|
forces going through the new gpu-fallbacks integration path, even if no fallback options are specified
|
@@ -4051,7 +4070,7 @@ class Function(google.protobuf.message.Message):
|
|
4051
4070
|
runtime: builtins.str = ...,
|
4052
4071
|
app_name: builtins.str = ...,
|
4053
4072
|
volume_mounts: collections.abc.Iterable[global___VolumeMount] | None = ...,
|
4054
|
-
|
4073
|
+
target_concurrent_inputs: builtins.int = ...,
|
4055
4074
|
custom_domain_info: collections.abc.Iterable[global___CustomDomainInfo] | None = ...,
|
4056
4075
|
worker_id: builtins.str = ...,
|
4057
4076
|
runtime_debug: builtins.bool = ...,
|
@@ -4075,7 +4094,7 @@ class Function(google.protobuf.message.Message):
|
|
4075
4094
|
batch_linger_ms: builtins.int = ...,
|
4076
4095
|
i6pn_enabled: builtins.bool = ...,
|
4077
4096
|
_experimental_concurrent_cancellations: builtins.bool = ...,
|
4078
|
-
|
4097
|
+
max_concurrent_inputs: builtins.int = ...,
|
4079
4098
|
_experimental_task_templates_enabled: builtins.bool = ...,
|
4080
4099
|
_experimental_task_templates: collections.abc.Iterable[global___TaskTemplate] | None = ...,
|
4081
4100
|
_experimental_group_size: builtins.int = ...,
|
@@ -5533,6 +5552,25 @@ class GeneratorDone(google.protobuf.message.Message):
|
|
5533
5552
|
|
5534
5553
|
global___GeneratorDone = GeneratorDone
|
5535
5554
|
|
5555
|
+
class GenericPayloadType(google.protobuf.message.Message):
|
5556
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
5557
|
+
|
5558
|
+
BASE_TYPE_FIELD_NUMBER: builtins.int
|
5559
|
+
SUB_TYPES_FIELD_NUMBER: builtins.int
|
5560
|
+
base_type: global___ParameterType.ValueType
|
5561
|
+
@property
|
5562
|
+
def sub_types(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___GenericPayloadType]:
|
5563
|
+
"""sub-type for generic types like lists"""
|
5564
|
+
def __init__(
|
5565
|
+
self,
|
5566
|
+
*,
|
5567
|
+
base_type: global___ParameterType.ValueType = ...,
|
5568
|
+
sub_types: collections.abc.Iterable[global___GenericPayloadType] | None = ...,
|
5569
|
+
) -> None: ...
|
5570
|
+
def ClearField(self, field_name: typing_extensions.Literal["base_type", b"base_type", "sub_types", b"sub_types"]) -> None: ...
|
5571
|
+
|
5572
|
+
global___GenericPayloadType = GenericPayloadType
|
5573
|
+
|
5536
5574
|
class GenericResult(google.protobuf.message.Message):
|
5537
5575
|
"""Used for both tasks and function outputs"""
|
5538
5576
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|