modal 0.73.116__py3-none-any.whl → 0.73.126__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/_functions.py +15 -6
- modal/_runtime/container_io_manager.py +13 -9
- modal/_runtime/container_io_manager.pyi +7 -4
- modal/_serialization.py +92 -44
- modal/_utils/async_utils.py +71 -6
- modal/_utils/function_utils.py +33 -13
- modal/_utils/jwt_utils.py +38 -0
- modal/cli/app.py +15 -0
- modal/client.pyi +2 -2
- modal/cls.py +3 -13
- modal/cls.pyi +0 -2
- modal/functions.pyi +6 -6
- modal/parallel_map.py +393 -44
- modal/parallel_map.pyi +75 -0
- modal/retries.py +11 -9
- {modal-0.73.116.dist-info → modal-0.73.126.dist-info}/METADATA +1 -1
- {modal-0.73.116.dist-info → modal-0.73.126.dist-info}/RECORD +29 -28
- {modal-0.73.116.dist-info → modal-0.73.126.dist-info}/WHEEL +1 -1
- modal_proto/api.proto +13 -0
- modal_proto/api_grpc.py +16 -0
- modal_proto/api_pb2.py +284 -263
- modal_proto/api_pb2.pyi +43 -0
- modal_proto/api_pb2_grpc.py +33 -0
- modal_proto/api_pb2_grpc.pyi +10 -0
- modal_proto/modal_api_grpc.py +1 -0
- modal_version/_version_generated.py +1 -1
- {modal-0.73.116.dist-info → modal-0.73.126.dist-info}/LICENSE +0 -0
- {modal-0.73.116.dist-info → modal-0.73.126.dist-info}/entry_points.txt +0 -0
- {modal-0.73.116.dist-info → modal-0.73.126.dist-info}/top_level.txt +0 -0
modal_proto/api_pb2.pyi
CHANGED
@@ -424,6 +424,8 @@ class _ParameterTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._
|
|
424
424
|
PARAM_TYPE_INT: _ParameterType.ValueType # 2
|
425
425
|
PARAM_TYPE_PICKLE: _ParameterType.ValueType # 3
|
426
426
|
PARAM_TYPE_BYTES: _ParameterType.ValueType # 4
|
427
|
+
PARAM_TYPE_UNKNOWN: _ParameterType.ValueType # 5
|
428
|
+
"""used in schemas to signify unrecognized or un-annotated types"""
|
427
429
|
|
428
430
|
class ParameterType(_ParameterType, metaclass=_ParameterTypeEnumTypeWrapper): ...
|
429
431
|
|
@@ -432,6 +434,8 @@ PARAM_TYPE_STRING: ParameterType.ValueType # 1
|
|
432
434
|
PARAM_TYPE_INT: ParameterType.ValueType # 2
|
433
435
|
PARAM_TYPE_PICKLE: ParameterType.ValueType # 3
|
434
436
|
PARAM_TYPE_BYTES: ParameterType.ValueType # 4
|
437
|
+
PARAM_TYPE_UNKNOWN: ParameterType.ValueType # 5
|
438
|
+
"""used in schemas to signify unrecognized or un-annotated types"""
|
435
439
|
global___ParameterType = ParameterType
|
436
440
|
|
437
441
|
class _ProgressType:
|
@@ -7422,6 +7426,45 @@ class SandboxGetLogsRequest(google.protobuf.message.Message):
|
|
7422
7426
|
|
7423
7427
|
global___SandboxGetLogsRequest = SandboxGetLogsRequest
|
7424
7428
|
|
7429
|
+
class SandboxGetResourceUsageRequest(google.protobuf.message.Message):
|
7430
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
7431
|
+
|
7432
|
+
SANDBOX_ID_FIELD_NUMBER: builtins.int
|
7433
|
+
sandbox_id: builtins.str
|
7434
|
+
def __init__(
|
7435
|
+
self,
|
7436
|
+
*,
|
7437
|
+
sandbox_id: builtins.str = ...,
|
7438
|
+
) -> None: ...
|
7439
|
+
def ClearField(self, field_name: typing_extensions.Literal["sandbox_id", b"sandbox_id"]) -> None: ...
|
7440
|
+
|
7441
|
+
global___SandboxGetResourceUsageRequest = SandboxGetResourceUsageRequest
|
7442
|
+
|
7443
|
+
class SandboxGetResourceUsageResponse(google.protobuf.message.Message):
|
7444
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
7445
|
+
|
7446
|
+
CPU_CORE_NANOSECS_FIELD_NUMBER: builtins.int
|
7447
|
+
MEM_GIB_NANOSECS_FIELD_NUMBER: builtins.int
|
7448
|
+
GPU_NANOSECS_FIELD_NUMBER: builtins.int
|
7449
|
+
GPU_TYPE_FIELD_NUMBER: builtins.int
|
7450
|
+
cpu_core_nanosecs: builtins.int
|
7451
|
+
mem_gib_nanosecs: builtins.int
|
7452
|
+
gpu_nanosecs: builtins.int
|
7453
|
+
gpu_type: builtins.str
|
7454
|
+
def __init__(
|
7455
|
+
self,
|
7456
|
+
*,
|
7457
|
+
cpu_core_nanosecs: builtins.int = ...,
|
7458
|
+
mem_gib_nanosecs: builtins.int = ...,
|
7459
|
+
gpu_nanosecs: builtins.int = ...,
|
7460
|
+
gpu_type: builtins.str | None = ...,
|
7461
|
+
) -> None: ...
|
7462
|
+
def HasField(self, field_name: typing_extensions.Literal["_gpu_type", b"_gpu_type", "gpu_type", b"gpu_type"]) -> builtins.bool: ...
|
7463
|
+
def ClearField(self, field_name: typing_extensions.Literal["_gpu_type", b"_gpu_type", "cpu_core_nanosecs", b"cpu_core_nanosecs", "gpu_nanosecs", b"gpu_nanosecs", "gpu_type", b"gpu_type", "mem_gib_nanosecs", b"mem_gib_nanosecs"]) -> None: ...
|
7464
|
+
def WhichOneof(self, oneof_group: typing_extensions.Literal["_gpu_type", b"_gpu_type"]) -> typing_extensions.Literal["gpu_type"] | None: ...
|
7465
|
+
|
7466
|
+
global___SandboxGetResourceUsageResponse = SandboxGetResourceUsageResponse
|
7467
|
+
|
7425
7468
|
class SandboxGetTaskIdRequest(google.protobuf.message.Message):
|
7426
7469
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
7427
7470
|
|
modal_proto/api_pb2_grpc.py
CHANGED
@@ -500,6 +500,11 @@ class ModalClientStub(object):
|
|
500
500
|
request_serializer=modal__proto_dot_api__pb2.SandboxGetLogsRequest.SerializeToString,
|
501
501
|
response_deserializer=modal__proto_dot_api__pb2.TaskLogsBatch.FromString,
|
502
502
|
)
|
503
|
+
self.SandboxGetResourceUsage = channel.unary_unary(
|
504
|
+
'/modal.client.ModalClient/SandboxGetResourceUsage',
|
505
|
+
request_serializer=modal__proto_dot_api__pb2.SandboxGetResourceUsageRequest.SerializeToString,
|
506
|
+
response_deserializer=modal__proto_dot_api__pb2.SandboxGetResourceUsageResponse.FromString,
|
507
|
+
)
|
503
508
|
self.SandboxGetTaskId = channel.unary_unary(
|
504
509
|
'/modal.client.ModalClient/SandboxGetTaskId',
|
505
510
|
request_serializer=modal__proto_dot_api__pb2.SandboxGetTaskIdRequest.SerializeToString,
|
@@ -1330,6 +1335,12 @@ class ModalClientServicer(object):
|
|
1330
1335
|
context.set_details('Method not implemented!')
|
1331
1336
|
raise NotImplementedError('Method not implemented!')
|
1332
1337
|
|
1338
|
+
def SandboxGetResourceUsage(self, request, context):
|
1339
|
+
"""Missing associated documentation comment in .proto file."""
|
1340
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
1341
|
+
context.set_details('Method not implemented!')
|
1342
|
+
raise NotImplementedError('Method not implemented!')
|
1343
|
+
|
1333
1344
|
def SandboxGetTaskId(self, request, context):
|
1334
1345
|
"""needed for modal container exec
|
1335
1346
|
"""
|
@@ -2096,6 +2107,11 @@ def add_ModalClientServicer_to_server(servicer, server):
|
|
2096
2107
|
request_deserializer=modal__proto_dot_api__pb2.SandboxGetLogsRequest.FromString,
|
2097
2108
|
response_serializer=modal__proto_dot_api__pb2.TaskLogsBatch.SerializeToString,
|
2098
2109
|
),
|
2110
|
+
'SandboxGetResourceUsage': grpc.unary_unary_rpc_method_handler(
|
2111
|
+
servicer.SandboxGetResourceUsage,
|
2112
|
+
request_deserializer=modal__proto_dot_api__pb2.SandboxGetResourceUsageRequest.FromString,
|
2113
|
+
response_serializer=modal__proto_dot_api__pb2.SandboxGetResourceUsageResponse.SerializeToString,
|
2114
|
+
),
|
2099
2115
|
'SandboxGetTaskId': grpc.unary_unary_rpc_method_handler(
|
2100
2116
|
servicer.SandboxGetTaskId,
|
2101
2117
|
request_deserializer=modal__proto_dot_api__pb2.SandboxGetTaskIdRequest.FromString,
|
@@ -3980,6 +3996,23 @@ class ModalClient(object):
|
|
3980
3996
|
options, channel_credentials,
|
3981
3997
|
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
3982
3998
|
|
3999
|
+
@staticmethod
|
4000
|
+
def SandboxGetResourceUsage(request,
|
4001
|
+
target,
|
4002
|
+
options=(),
|
4003
|
+
channel_credentials=None,
|
4004
|
+
call_credentials=None,
|
4005
|
+
insecure=False,
|
4006
|
+
compression=None,
|
4007
|
+
wait_for_ready=None,
|
4008
|
+
timeout=None,
|
4009
|
+
metadata=None):
|
4010
|
+
return grpc.experimental.unary_unary(request, target, '/modal.client.ModalClient/SandboxGetResourceUsage',
|
4011
|
+
modal__proto_dot_api__pb2.SandboxGetResourceUsageRequest.SerializeToString,
|
4012
|
+
modal__proto_dot_api__pb2.SandboxGetResourceUsageResponse.FromString,
|
4013
|
+
options, channel_credentials,
|
4014
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
4015
|
+
|
3983
4016
|
@staticmethod
|
3984
4017
|
def SandboxGetTaskId(request,
|
3985
4018
|
target,
|
modal_proto/api_pb2_grpc.pyi
CHANGED
@@ -416,6 +416,10 @@ class ModalClientStub:
|
|
416
416
|
modal_proto.api_pb2.SandboxGetLogsRequest,
|
417
417
|
modal_proto.api_pb2.TaskLogsBatch,
|
418
418
|
]
|
419
|
+
SandboxGetResourceUsage: grpc.UnaryUnaryMultiCallable[
|
420
|
+
modal_proto.api_pb2.SandboxGetResourceUsageRequest,
|
421
|
+
modal_proto.api_pb2.SandboxGetResourceUsageResponse,
|
422
|
+
]
|
419
423
|
SandboxGetTaskId: grpc.UnaryUnaryMultiCallable[
|
420
424
|
modal_proto.api_pb2.SandboxGetTaskIdRequest,
|
421
425
|
modal_proto.api_pb2.SandboxGetTaskIdResponse,
|
@@ -1207,6 +1211,12 @@ class ModalClientServicer(metaclass=abc.ABCMeta):
|
|
1207
1211
|
context: grpc.ServicerContext,
|
1208
1212
|
) -> collections.abc.Iterator[modal_proto.api_pb2.TaskLogsBatch]: ...
|
1209
1213
|
@abc.abstractmethod
|
1214
|
+
def SandboxGetResourceUsage(
|
1215
|
+
self,
|
1216
|
+
request: modal_proto.api_pb2.SandboxGetResourceUsageRequest,
|
1217
|
+
context: grpc.ServicerContext,
|
1218
|
+
) -> modal_proto.api_pb2.SandboxGetResourceUsageResponse: ...
|
1219
|
+
@abc.abstractmethod
|
1210
1220
|
def SandboxGetTaskId(
|
1211
1221
|
self,
|
1212
1222
|
request: modal_proto.api_pb2.SandboxGetTaskIdRequest,
|
modal_proto/modal_api_grpc.py
CHANGED
@@ -109,6 +109,7 @@ class ModalClientModal:
|
|
109
109
|
self.QueuePut = modal.client.UnaryUnaryWrapper(grpclib_stub.QueuePut, client)
|
110
110
|
self.SandboxCreate = modal.client.UnaryUnaryWrapper(grpclib_stub.SandboxCreate, client)
|
111
111
|
self.SandboxGetLogs = modal.client.UnaryStreamWrapper(grpclib_stub.SandboxGetLogs, client)
|
112
|
+
self.SandboxGetResourceUsage = modal.client.UnaryUnaryWrapper(grpclib_stub.SandboxGetResourceUsage, client)
|
112
113
|
self.SandboxGetTaskId = modal.client.UnaryUnaryWrapper(grpclib_stub.SandboxGetTaskId, client)
|
113
114
|
self.SandboxGetTunnels = modal.client.UnaryUnaryWrapper(grpclib_stub.SandboxGetTunnels, client)
|
114
115
|
self.SandboxList = modal.client.UnaryUnaryWrapper(grpclib_stub.SandboxList, client)
|
File without changes
|
File without changes
|
File without changes
|