modal 0.73.116__py3-none-any.whl → 0.73.128__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_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:
@@ -3858,7 +3862,7 @@ class Function(google.protobuf.message.Message):
3858
3862
  RUNTIME_FIELD_NUMBER: builtins.int
3859
3863
  APP_NAME_FIELD_NUMBER: builtins.int
3860
3864
  VOLUME_MOUNTS_FIELD_NUMBER: builtins.int
3861
- TARGET_CONCURRENT_INPUTS_FIELD_NUMBER: builtins.int
3865
+ MAX_CONCURRENT_INPUTS_FIELD_NUMBER: builtins.int
3862
3866
  CUSTOM_DOMAIN_INFO_FIELD_NUMBER: builtins.int
3863
3867
  WORKER_ID_FIELD_NUMBER: builtins.int
3864
3868
  RUNTIME_DEBUG_FIELD_NUMBER: builtins.int
@@ -3882,7 +3886,7 @@ class Function(google.protobuf.message.Message):
3882
3886
  BATCH_LINGER_MS_FIELD_NUMBER: builtins.int
3883
3887
  I6PN_ENABLED_FIELD_NUMBER: builtins.int
3884
3888
  _EXPERIMENTAL_CONCURRENT_CANCELLATIONS_FIELD_NUMBER: builtins.int
3885
- MAX_CONCURRENT_INPUTS_FIELD_NUMBER: builtins.int
3889
+ TARGET_CONCURRENT_INPUTS_FIELD_NUMBER: builtins.int
3886
3890
  _EXPERIMENTAL_TASK_TEMPLATES_ENABLED_FIELD_NUMBER: builtins.int
3887
3891
  _EXPERIMENTAL_TASK_TEMPLATES_FIELD_NUMBER: builtins.int
3888
3892
  _EXPERIMENTAL_GROUP_SIZE_FIELD_NUMBER: builtins.int
@@ -3940,7 +3944,7 @@ class Function(google.protobuf.message.Message):
3940
3944
  """Formerly stub_name"""
3941
3945
  @property
3942
3946
  def volume_mounts(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___VolumeMount]: ...
3943
- target_concurrent_inputs: builtins.int
3947
+ max_concurrent_inputs: builtins.int
3944
3948
  @property
3945
3949
  def custom_domain_info(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___CustomDomainInfo]: ...
3946
3950
  worker_id: builtins.str
@@ -3980,7 +3984,7 @@ class Function(google.protobuf.message.Message):
3980
3984
  """Miliseconds to block before a response is needed"""
3981
3985
  i6pn_enabled: builtins.bool
3982
3986
  _experimental_concurrent_cancellations: builtins.bool
3983
- max_concurrent_inputs: builtins.int
3987
+ target_concurrent_inputs: builtins.int
3984
3988
  _experimental_task_templates_enabled: builtins.bool
3985
3989
  """TODO(irfansharif): Remove, once https://github.com/modal-labs/modal/pull/15645 lands.
3986
3990
  forces going through the new gpu-fallbacks integration path, even if no fallback options are specified
@@ -4047,7 +4051,7 @@ class Function(google.protobuf.message.Message):
4047
4051
  runtime: builtins.str = ...,
4048
4052
  app_name: builtins.str = ...,
4049
4053
  volume_mounts: collections.abc.Iterable[global___VolumeMount] | None = ...,
4050
- target_concurrent_inputs: builtins.int = ...,
4054
+ max_concurrent_inputs: builtins.int = ...,
4051
4055
  custom_domain_info: collections.abc.Iterable[global___CustomDomainInfo] | None = ...,
4052
4056
  worker_id: builtins.str = ...,
4053
4057
  runtime_debug: builtins.bool = ...,
@@ -4071,7 +4075,7 @@ class Function(google.protobuf.message.Message):
4071
4075
  batch_linger_ms: builtins.int = ...,
4072
4076
  i6pn_enabled: builtins.bool = ...,
4073
4077
  _experimental_concurrent_cancellations: builtins.bool = ...,
4074
- max_concurrent_inputs: builtins.int = ...,
4078
+ target_concurrent_inputs: builtins.int = ...,
4075
4079
  _experimental_task_templates_enabled: builtins.bool = ...,
4076
4080
  _experimental_task_templates: collections.abc.Iterable[global___TaskTemplate] | None = ...,
4077
4081
  _experimental_group_size: builtins.int = ...,
@@ -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
 
@@ -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,
@@ -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,
@@ -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)
@@ -1,4 +1,4 @@
1
1
  # Copyright Modal Labs 2025
2
2
 
3
3
  # Note: Reset this value to -1 whenever you make a minor `0.X` release of the client.
4
- build_number = 116 # git: 829b239
4
+ build_number = 128 # git: 9be3cf6