modal 1.1.4.dev22__py3-none-any.whl → 1.1.4.dev24__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
@@ -2040,6 +2040,31 @@ class AutoscalerSettings(google.protobuf.message.Message):
2040
2040
 
2041
2041
  global___AutoscalerSettings = AutoscalerSettings
2042
2042
 
2043
+ class AutoscalingMetrics(google.protobuf.message.Message):
2044
+ """Used for flash autoscaling"""
2045
+
2046
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
2047
+
2048
+ CPU_USAGE_PERCENT_FIELD_NUMBER: builtins.int
2049
+ MEMORY_USAGE_PERCENT_FIELD_NUMBER: builtins.int
2050
+ CONCURRENT_REQUESTS_FIELD_NUMBER: builtins.int
2051
+ TIMESTAMP_FIELD_NUMBER: builtins.int
2052
+ cpu_usage_percent: builtins.float
2053
+ memory_usage_percent: builtins.float
2054
+ concurrent_requests: builtins.int
2055
+ timestamp: builtins.float
2056
+ def __init__(
2057
+ self,
2058
+ *,
2059
+ cpu_usage_percent: builtins.float = ...,
2060
+ memory_usage_percent: builtins.float = ...,
2061
+ concurrent_requests: builtins.int = ...,
2062
+ timestamp: builtins.float = ...,
2063
+ ) -> None: ...
2064
+ def ClearField(self, field_name: typing_extensions.Literal["concurrent_requests", b"concurrent_requests", "cpu_usage_percent", b"cpu_usage_percent", "memory_usage_percent", b"memory_usage_percent", "timestamp", b"timestamp"]) -> None: ...
2065
+
2066
+ global___AutoscalingMetrics = AutoscalingMetrics
2067
+
2043
2068
  class BaseImage(google.protobuf.message.Message):
2044
2069
  DESCRIPTOR: google.protobuf.descriptor.Descriptor
2045
2070
 
@@ -9901,6 +9926,36 @@ class TaskCurrentInputsResponse(google.protobuf.message.Message):
9901
9926
 
9902
9927
  global___TaskCurrentInputsResponse = TaskCurrentInputsResponse
9903
9928
 
9929
+ class TaskGetAutoscalingMetricsRequest(google.protobuf.message.Message):
9930
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
9931
+
9932
+ TASK_ID_FIELD_NUMBER: builtins.int
9933
+ task_id: builtins.str
9934
+ def __init__(
9935
+ self,
9936
+ *,
9937
+ task_id: builtins.str = ...,
9938
+ ) -> None: ...
9939
+ def ClearField(self, field_name: typing_extensions.Literal["task_id", b"task_id"]) -> None: ...
9940
+
9941
+ global___TaskGetAutoscalingMetricsRequest = TaskGetAutoscalingMetricsRequest
9942
+
9943
+ class TaskGetAutoscalingMetricsResponse(google.protobuf.message.Message):
9944
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
9945
+
9946
+ METRICS_FIELD_NUMBER: builtins.int
9947
+ @property
9948
+ def metrics(self) -> global___AutoscalingMetrics: ...
9949
+ def __init__(
9950
+ self,
9951
+ *,
9952
+ metrics: global___AutoscalingMetrics | None = ...,
9953
+ ) -> None: ...
9954
+ def HasField(self, field_name: typing_extensions.Literal["metrics", b"metrics"]) -> builtins.bool: ...
9955
+ def ClearField(self, field_name: typing_extensions.Literal["metrics", b"metrics"]) -> None: ...
9956
+
9957
+ global___TaskGetAutoscalingMetricsResponse = TaskGetAutoscalingMetricsResponse
9958
+
9904
9959
  class TaskInfo(google.protobuf.message.Message):
9905
9960
  DESCRIPTOR: google.protobuf.descriptor.Descriptor
9906
9961
 
@@ -730,6 +730,11 @@ class ModalClientStub(object):
730
730
  request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
731
731
  response_deserializer=modal__proto_dot_api__pb2.TaskCurrentInputsResponse.FromString,
732
732
  )
733
+ self.TaskGetAutoscalingMetrics = channel.unary_unary(
734
+ '/modal.client.ModalClient/TaskGetAutoscalingMetrics',
735
+ request_serializer=modal__proto_dot_api__pb2.TaskGetAutoscalingMetricsRequest.SerializeToString,
736
+ response_deserializer=modal__proto_dot_api__pb2.TaskGetAutoscalingMetricsResponse.FromString,
737
+ )
733
738
  self.TaskList = channel.unary_unary(
734
739
  '/modal.client.ModalClient/TaskList',
735
740
  request_serializer=modal__proto_dot_api__pb2.TaskListRequest.SerializeToString,
@@ -1741,6 +1746,13 @@ class ModalClientServicer(object):
1741
1746
  context.set_details('Method not implemented!')
1742
1747
  raise NotImplementedError('Method not implemented!')
1743
1748
 
1749
+ def TaskGetAutoscalingMetrics(self, request, context):
1750
+ """Used for flash autoscaling
1751
+ """
1752
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
1753
+ context.set_details('Method not implemented!')
1754
+ raise NotImplementedError('Method not implemented!')
1755
+
1744
1756
  def TaskList(self, request, context):
1745
1757
  """Missing associated documentation comment in .proto file."""
1746
1758
  context.set_code(grpc.StatusCode.UNIMPLEMENTED)
@@ -2607,6 +2619,11 @@ def add_ModalClientServicer_to_server(servicer, server):
2607
2619
  request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
2608
2620
  response_serializer=modal__proto_dot_api__pb2.TaskCurrentInputsResponse.SerializeToString,
2609
2621
  ),
2622
+ 'TaskGetAutoscalingMetrics': grpc.unary_unary_rpc_method_handler(
2623
+ servicer.TaskGetAutoscalingMetrics,
2624
+ request_deserializer=modal__proto_dot_api__pb2.TaskGetAutoscalingMetricsRequest.FromString,
2625
+ response_serializer=modal__proto_dot_api__pb2.TaskGetAutoscalingMetricsResponse.SerializeToString,
2626
+ ),
2610
2627
  'TaskList': grpc.unary_unary_rpc_method_handler(
2611
2628
  servicer.TaskList,
2612
2629
  request_deserializer=modal__proto_dot_api__pb2.TaskListRequest.FromString,
@@ -5168,6 +5185,23 @@ class ModalClient(object):
5168
5185
  options, channel_credentials,
5169
5186
  insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
5170
5187
 
5188
+ @staticmethod
5189
+ def TaskGetAutoscalingMetrics(request,
5190
+ target,
5191
+ options=(),
5192
+ channel_credentials=None,
5193
+ call_credentials=None,
5194
+ insecure=False,
5195
+ compression=None,
5196
+ wait_for_ready=None,
5197
+ timeout=None,
5198
+ metadata=None):
5199
+ return grpc.experimental.unary_unary(request, target, '/modal.client.ModalClient/TaskGetAutoscalingMetrics',
5200
+ modal__proto_dot_api__pb2.TaskGetAutoscalingMetricsRequest.SerializeToString,
5201
+ modal__proto_dot_api__pb2.TaskGetAutoscalingMetricsResponse.FromString,
5202
+ options, channel_credentials,
5203
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
5204
+
5171
5205
  @staticmethod
5172
5206
  def TaskList(request,
5173
5207
  target,
@@ -610,6 +610,11 @@ class ModalClientStub:
610
610
  google.protobuf.empty_pb2.Empty,
611
611
  modal_proto.api_pb2.TaskCurrentInputsResponse,
612
612
  ]
613
+ TaskGetAutoscalingMetrics: grpc.UnaryUnaryMultiCallable[
614
+ modal_proto.api_pb2.TaskGetAutoscalingMetricsRequest,
615
+ modal_proto.api_pb2.TaskGetAutoscalingMetricsResponse,
616
+ ]
617
+ """Used for flash autoscaling"""
613
618
  TaskList: grpc.UnaryUnaryMultiCallable[
614
619
  modal_proto.api_pb2.TaskListRequest,
615
620
  modal_proto.api_pb2.TaskListResponse,
@@ -1599,6 +1604,13 @@ class ModalClientServicer(metaclass=abc.ABCMeta):
1599
1604
  context: grpc.ServicerContext,
1600
1605
  ) -> modal_proto.api_pb2.TaskCurrentInputsResponse: ...
1601
1606
  @abc.abstractmethod
1607
+ def TaskGetAutoscalingMetrics(
1608
+ self,
1609
+ request: modal_proto.api_pb2.TaskGetAutoscalingMetricsRequest,
1610
+ context: grpc.ServicerContext,
1611
+ ) -> modal_proto.api_pb2.TaskGetAutoscalingMetricsResponse:
1612
+ """Used for flash autoscaling"""
1613
+ @abc.abstractmethod
1602
1614
  def TaskList(
1603
1615
  self,
1604
1616
  request: modal_proto.api_pb2.TaskListRequest,
@@ -161,6 +161,7 @@ class ModalClientModal:
161
161
  self.SharedVolumeRemoveFile = modal.client.UnaryUnaryWrapper(grpclib_stub.SharedVolumeRemoveFile, client, server_url)
162
162
  self.TaskClusterHello = modal.client.UnaryUnaryWrapper(grpclib_stub.TaskClusterHello, client, server_url)
163
163
  self.TaskCurrentInputs = modal.client.UnaryUnaryWrapper(grpclib_stub.TaskCurrentInputs, client, server_url)
164
+ self.TaskGetAutoscalingMetrics = modal.client.UnaryUnaryWrapper(grpclib_stub.TaskGetAutoscalingMetrics, client, server_url)
164
165
  self.TaskList = modal.client.UnaryUnaryWrapper(grpclib_stub.TaskList, client, server_url)
165
166
  self.TaskResult = modal.client.UnaryUnaryWrapper(grpclib_stub.TaskResult, client, server_url)
166
167
  self.TokenFlowCreate = modal.client.UnaryUnaryWrapper(grpclib_stub.TokenFlowCreate, client, server_url)
modal_version/__init__.py CHANGED
@@ -1,4 +1,4 @@
1
1
  # Copyright Modal Labs 2025
2
2
  """Supplies the current version of the modal client library."""
3
3
 
4
- __version__ = "1.1.4.dev22"
4
+ __version__ = "1.1.4.dev24"