modal 1.1.5.dev49__py3-none-any.whl → 1.1.5.dev51__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.

Potentially problematic release.


This version of modal might be problematic. Click here for more details.

modal_proto/api_pb2.pyi CHANGED
@@ -4435,6 +4435,33 @@ class FlashProxyUpstreamRequest(google.protobuf.message.Message):
4435
4435
 
4436
4436
  global___FlashProxyUpstreamRequest = FlashProxyUpstreamRequest
4437
4437
 
4438
+ class FlashSetTargetSlotsMetricsRequest(google.protobuf.message.Message):
4439
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
4440
+
4441
+ FUNCTION_ID_FIELD_NUMBER: builtins.int
4442
+ TARGET_SLOTS_FIELD_NUMBER: builtins.int
4443
+ function_id: builtins.str
4444
+ """TODO(claudia): add other metrics to use in autoscaling decisions"""
4445
+ target_slots: builtins.int
4446
+ def __init__(
4447
+ self,
4448
+ *,
4449
+ function_id: builtins.str = ...,
4450
+ target_slots: builtins.int = ...,
4451
+ ) -> None: ...
4452
+ def ClearField(self, field_name: typing_extensions.Literal["function_id", b"function_id", "target_slots", b"target_slots"]) -> None: ...
4453
+
4454
+ global___FlashSetTargetSlotsMetricsRequest = FlashSetTargetSlotsMetricsRequest
4455
+
4456
+ class FlashSetTargetSlotsMetricsResponse(google.protobuf.message.Message):
4457
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
4458
+
4459
+ def __init__(
4460
+ self,
4461
+ ) -> None: ...
4462
+
4463
+ global___FlashSetTargetSlotsMetricsResponse = FlashSetTargetSlotsMetricsResponse
4464
+
4438
4465
  class Function(google.protobuf.message.Message):
4439
4466
  DESCRIPTOR: google.protobuf.descriptor.Descriptor
4440
4467
 
@@ -320,6 +320,11 @@ class ModalClientStub(object):
320
320
  request_serializer=modal__proto_dot_api__pb2.FlashContainerRegisterRequest.SerializeToString,
321
321
  response_deserializer=modal__proto_dot_api__pb2.FlashContainerRegisterResponse.FromString,
322
322
  )
323
+ self.FlashSetTargetSlotsMetrics = channel.unary_unary(
324
+ '/modal.client.ModalClient/FlashSetTargetSlotsMetrics',
325
+ request_serializer=modal__proto_dot_api__pb2.FlashSetTargetSlotsMetricsRequest.SerializeToString,
326
+ response_deserializer=modal__proto_dot_api__pb2.FlashSetTargetSlotsMetricsResponse.FromString,
327
+ )
323
328
  self.FunctionAsyncInvoke = channel.unary_unary(
324
329
  '/modal.client.ModalClient/FunctionAsyncInvoke',
325
330
  request_serializer=modal__proto_dot_api__pb2.FunctionAsyncInvokeRequest.SerializeToString,
@@ -1253,6 +1258,12 @@ class ModalClientServicer(object):
1253
1258
  context.set_details('Method not implemented!')
1254
1259
  raise NotImplementedError('Method not implemented!')
1255
1260
 
1261
+ def FlashSetTargetSlotsMetrics(self, request, context):
1262
+ """Missing associated documentation comment in .proto file."""
1263
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
1264
+ context.set_details('Method not implemented!')
1265
+ raise NotImplementedError('Method not implemented!')
1266
+
1256
1267
  def FunctionAsyncInvoke(self, request, context):
1257
1268
  """Functions
1258
1269
  """
@@ -2242,6 +2253,11 @@ def add_ModalClientServicer_to_server(servicer, server):
2242
2253
  request_deserializer=modal__proto_dot_api__pb2.FlashContainerRegisterRequest.FromString,
2243
2254
  response_serializer=modal__proto_dot_api__pb2.FlashContainerRegisterResponse.SerializeToString,
2244
2255
  ),
2256
+ 'FlashSetTargetSlotsMetrics': grpc.unary_unary_rpc_method_handler(
2257
+ servicer.FlashSetTargetSlotsMetrics,
2258
+ request_deserializer=modal__proto_dot_api__pb2.FlashSetTargetSlotsMetricsRequest.FromString,
2259
+ response_serializer=modal__proto_dot_api__pb2.FlashSetTargetSlotsMetricsResponse.SerializeToString,
2260
+ ),
2245
2261
  'FunctionAsyncInvoke': grpc.unary_unary_rpc_method_handler(
2246
2262
  servicer.FunctionAsyncInvoke,
2247
2263
  request_deserializer=modal__proto_dot_api__pb2.FunctionAsyncInvokeRequest.FromString,
@@ -3839,6 +3855,23 @@ class ModalClient(object):
3839
3855
  options, channel_credentials,
3840
3856
  insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
3841
3857
 
3858
+ @staticmethod
3859
+ def FlashSetTargetSlotsMetrics(request,
3860
+ target,
3861
+ options=(),
3862
+ channel_credentials=None,
3863
+ call_credentials=None,
3864
+ insecure=False,
3865
+ compression=None,
3866
+ wait_for_ready=None,
3867
+ timeout=None,
3868
+ metadata=None):
3869
+ return grpc.experimental.unary_unary(request, target, '/modal.client.ModalClient/FlashSetTargetSlotsMetrics',
3870
+ modal__proto_dot_api__pb2.FlashSetTargetSlotsMetricsRequest.SerializeToString,
3871
+ modal__proto_dot_api__pb2.FlashSetTargetSlotsMetricsResponse.FromString,
3872
+ options, channel_credentials,
3873
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
3874
+
3842
3875
  @staticmethod
3843
3876
  def FunctionAsyncInvoke(request,
3844
3877
  target,
@@ -266,6 +266,10 @@ class ModalClientStub:
266
266
  modal_proto.api_pb2.FlashContainerRegisterRequest,
267
267
  modal_proto.api_pb2.FlashContainerRegisterResponse,
268
268
  ]
269
+ FlashSetTargetSlotsMetrics: grpc.UnaryUnaryMultiCallable[
270
+ modal_proto.api_pb2.FlashSetTargetSlotsMetricsRequest,
271
+ modal_proto.api_pb2.FlashSetTargetSlotsMetricsResponse,
272
+ ]
269
273
  FunctionAsyncInvoke: grpc.UnaryUnaryMultiCallable[
270
274
  modal_proto.api_pb2.FunctionAsyncInvokeRequest,
271
275
  modal_proto.api_pb2.FunctionAsyncInvokeResponse,
@@ -1108,6 +1112,12 @@ class ModalClientServicer(metaclass=abc.ABCMeta):
1108
1112
  context: grpc.ServicerContext,
1109
1113
  ) -> modal_proto.api_pb2.FlashContainerRegisterResponse: ...
1110
1114
  @abc.abstractmethod
1115
+ def FlashSetTargetSlotsMetrics(
1116
+ self,
1117
+ request: modal_proto.api_pb2.FlashSetTargetSlotsMetricsRequest,
1118
+ context: grpc.ServicerContext,
1119
+ ) -> modal_proto.api_pb2.FlashSetTargetSlotsMetricsResponse: ...
1120
+ @abc.abstractmethod
1111
1121
  def FunctionAsyncInvoke(
1112
1122
  self,
1113
1123
  request: modal_proto.api_pb2.FunctionAsyncInvokeRequest,
@@ -79,6 +79,7 @@ class ModalClientModal:
79
79
  self.FlashContainerDeregister = modal.client.UnaryUnaryWrapper(grpclib_stub.FlashContainerDeregister, client, server_url)
80
80
  self.FlashContainerList = modal.client.UnaryUnaryWrapper(grpclib_stub.FlashContainerList, client, server_url)
81
81
  self.FlashContainerRegister = modal.client.UnaryUnaryWrapper(grpclib_stub.FlashContainerRegister, client, server_url)
82
+ self.FlashSetTargetSlotsMetrics = modal.client.UnaryUnaryWrapper(grpclib_stub.FlashSetTargetSlotsMetrics, client, server_url)
82
83
  self.FunctionAsyncInvoke = modal.client.UnaryUnaryWrapper(grpclib_stub.FunctionAsyncInvoke, client, server_url)
83
84
  self.FunctionBindParams = modal.client.UnaryUnaryWrapper(grpclib_stub.FunctionBindParams, client, server_url)
84
85
  self.FunctionCallCancel = modal.client.UnaryUnaryWrapper(grpclib_stub.FunctionCallCancel, 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.5.dev49"
4
+ __version__ = "1.1.5.dev51"