modal 1.1.1.dev9__py3-none-any.whl → 1.1.1.dev11__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
@@ -1940,7 +1940,8 @@ class AttemptStartResponse(google.protobuf.message.Message):
1940
1940
  RETRY_POLICY_FIELD_NUMBER: builtins.int
1941
1941
  attempt_token: builtins.str
1942
1942
  @property
1943
- def retry_policy(self) -> global___FunctionRetryPolicy: ...
1943
+ def retry_policy(self) -> global___FunctionRetryPolicy:
1944
+ """TODO(ben-okeefe) TODO(nathan): Not currently used"""
1944
1945
  def __init__(
1945
1946
  self,
1946
1947
  *,
@@ -5213,6 +5214,7 @@ class FunctionGetInputsItem(google.protobuf.message.Message):
5213
5214
  FUNCTION_CALL_ID_FIELD_NUMBER: builtins.int
5214
5215
  FUNCTION_CALL_INVOCATION_TYPE_FIELD_NUMBER: builtins.int
5215
5216
  RETRY_COUNT_FIELD_NUMBER: builtins.int
5217
+ FUNCTION_MAP_IDX_FIELD_NUMBER: builtins.int
5216
5218
  input_id: builtins.str
5217
5219
  @property
5218
5220
  def input(self) -> global___FunctionInput: ...
@@ -5220,6 +5222,8 @@ class FunctionGetInputsItem(google.protobuf.message.Message):
5220
5222
  function_call_id: builtins.str
5221
5223
  function_call_invocation_type: global___FunctionCallInvocationType.ValueType
5222
5224
  retry_count: builtins.int
5225
+ function_map_idx: builtins.int
5226
+ """intercepted and only used by the worker."""
5223
5227
  def __init__(
5224
5228
  self,
5225
5229
  *,
@@ -5229,9 +5233,11 @@ class FunctionGetInputsItem(google.protobuf.message.Message):
5229
5233
  function_call_id: builtins.str = ...,
5230
5234
  function_call_invocation_type: global___FunctionCallInvocationType.ValueType = ...,
5231
5235
  retry_count: builtins.int = ...,
5236
+ function_map_idx: builtins.int | None = ...,
5232
5237
  ) -> None: ...
5233
- def HasField(self, field_name: typing_extensions.Literal["input", b"input"]) -> builtins.bool: ...
5234
- def ClearField(self, field_name: typing_extensions.Literal["function_call_id", b"function_call_id", "function_call_invocation_type", b"function_call_invocation_type", "input", b"input", "input_id", b"input_id", "kill_switch", b"kill_switch", "retry_count", b"retry_count"]) -> None: ...
5238
+ def HasField(self, field_name: typing_extensions.Literal["_function_map_idx", b"_function_map_idx", "function_map_idx", b"function_map_idx", "input", b"input"]) -> builtins.bool: ...
5239
+ def ClearField(self, field_name: typing_extensions.Literal["_function_map_idx", b"_function_map_idx", "function_call_id", b"function_call_id", "function_call_invocation_type", b"function_call_invocation_type", "function_map_idx", b"function_map_idx", "input", b"input", "input_id", b"input_id", "kill_switch", b"kill_switch", "retry_count", b"retry_count"]) -> None: ...
5240
+ def WhichOneof(self, oneof_group: typing_extensions.Literal["_function_map_idx", b"_function_map_idx"]) -> typing_extensions.Literal["function_map_idx"] | None: ...
5235
5241
 
5236
5242
  global___FunctionGetInputsItem = FunctionGetInputsItem
5237
5243
 
@@ -5913,6 +5919,8 @@ class FunctionPutOutputsItem(google.protobuf.message.Message):
5913
5919
  OUTPUT_CREATED_AT_FIELD_NUMBER: builtins.int
5914
5920
  DATA_FORMAT_FIELD_NUMBER: builtins.int
5915
5921
  RETRY_COUNT_FIELD_NUMBER: builtins.int
5922
+ FUNCTION_CALL_ID_FIELD_NUMBER: builtins.int
5923
+ FUNCTION_MAP_IDX_FIELD_NUMBER: builtins.int
5916
5924
  input_id: builtins.str
5917
5925
  @property
5918
5926
  def result(self) -> global___GenericResult: ...
@@ -5921,6 +5929,10 @@ class FunctionPutOutputsItem(google.protobuf.message.Message):
5921
5929
  data_format: global___DataFormat.ValueType
5922
5930
  """for result.data_oneof"""
5923
5931
  retry_count: builtins.int
5932
+ function_call_id: builtins.str
5933
+ """injected by the worker"""
5934
+ function_map_idx: builtins.int
5935
+ """injected by the worker"""
5924
5936
  def __init__(
5925
5937
  self,
5926
5938
  *,
@@ -5930,9 +5942,12 @@ class FunctionPutOutputsItem(google.protobuf.message.Message):
5930
5942
  output_created_at: builtins.float = ...,
5931
5943
  data_format: global___DataFormat.ValueType = ...,
5932
5944
  retry_count: builtins.int = ...,
5945
+ function_call_id: builtins.str = ...,
5946
+ function_map_idx: builtins.int | None = ...,
5933
5947
  ) -> None: ...
5934
- def HasField(self, field_name: typing_extensions.Literal["result", b"result"]) -> builtins.bool: ...
5935
- def ClearField(self, field_name: typing_extensions.Literal["data_format", b"data_format", "input_id", b"input_id", "input_started_at", b"input_started_at", "output_created_at", b"output_created_at", "result", b"result", "retry_count", b"retry_count"]) -> None: ...
5948
+ def HasField(self, field_name: typing_extensions.Literal["_function_map_idx", b"_function_map_idx", "function_map_idx", b"function_map_idx", "result", b"result"]) -> builtins.bool: ...
5949
+ def ClearField(self, field_name: typing_extensions.Literal["_function_map_idx", b"_function_map_idx", "data_format", b"data_format", "function_call_id", b"function_call_id", "function_map_idx", b"function_map_idx", "input_id", b"input_id", "input_started_at", b"input_started_at", "output_created_at", b"output_created_at", "result", b"result", "retry_count", b"retry_count"]) -> None: ...
5950
+ def WhichOneof(self, oneof_group: typing_extensions.Literal["_function_map_idx", b"_function_map_idx"]) -> typing_extensions.Literal["function_map_idx"] | None: ...
5936
5951
 
5937
5952
  global___FunctionPutOutputsItem = FunctionPutOutputsItem
5938
5953
 
@@ -6668,6 +6683,126 @@ class InputInfo(google.protobuf.message.Message):
6668
6683
 
6669
6684
  global___InputInfo = InputInfo
6670
6685
 
6686
+ class MapAwaitRequest(google.protobuf.message.Message):
6687
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
6688
+
6689
+ FUNCTION_CALL_ID_FIELD_NUMBER: builtins.int
6690
+ LAST_ENTRY_ID_FIELD_NUMBER: builtins.int
6691
+ REQUESTED_AT_FIELD_NUMBER: builtins.int
6692
+ TIMEOUT_FIELD_NUMBER: builtins.int
6693
+ function_call_id: builtins.str
6694
+ last_entry_id: builtins.str
6695
+ requested_at: builtins.float
6696
+ """Used for waypoints."""
6697
+ timeout: builtins.float
6698
+ def __init__(
6699
+ self,
6700
+ *,
6701
+ function_call_id: builtins.str = ...,
6702
+ last_entry_id: builtins.str = ...,
6703
+ requested_at: builtins.float = ...,
6704
+ timeout: builtins.float = ...,
6705
+ ) -> None: ...
6706
+ def ClearField(self, field_name: typing_extensions.Literal["function_call_id", b"function_call_id", "last_entry_id", b"last_entry_id", "requested_at", b"requested_at", "timeout", b"timeout"]) -> None: ...
6707
+
6708
+ global___MapAwaitRequest = MapAwaitRequest
6709
+
6710
+ class MapAwaitResponse(google.protobuf.message.Message):
6711
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
6712
+
6713
+ OUTPUTS_FIELD_NUMBER: builtins.int
6714
+ LAST_ENTRY_ID_FIELD_NUMBER: builtins.int
6715
+ @property
6716
+ def outputs(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___FunctionGetOutputsItem]: ...
6717
+ last_entry_id: builtins.str
6718
+ def __init__(
6719
+ self,
6720
+ *,
6721
+ outputs: collections.abc.Iterable[global___FunctionGetOutputsItem] | None = ...,
6722
+ last_entry_id: builtins.str = ...,
6723
+ ) -> None: ...
6724
+ def ClearField(self, field_name: typing_extensions.Literal["last_entry_id", b"last_entry_id", "outputs", b"outputs"]) -> None: ...
6725
+
6726
+ global___MapAwaitResponse = MapAwaitResponse
6727
+
6728
+ class MapStartOrContinueItem(google.protobuf.message.Message):
6729
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
6730
+
6731
+ INPUT_FIELD_NUMBER: builtins.int
6732
+ ATTEMPT_TOKEN_FIELD_NUMBER: builtins.int
6733
+ @property
6734
+ def input(self) -> global___FunctionPutInputsItem: ...
6735
+ attempt_token: builtins.str
6736
+ """None if this is a fresh input, otherwise it is the attempt token for a retry."""
6737
+ def __init__(
6738
+ self,
6739
+ *,
6740
+ input: global___FunctionPutInputsItem | None = ...,
6741
+ attempt_token: builtins.str | None = ...,
6742
+ ) -> None: ...
6743
+ def HasField(self, field_name: typing_extensions.Literal["_attempt_token", b"_attempt_token", "attempt_token", b"attempt_token", "input", b"input"]) -> builtins.bool: ...
6744
+ def ClearField(self, field_name: typing_extensions.Literal["_attempt_token", b"_attempt_token", "attempt_token", b"attempt_token", "input", b"input"]) -> None: ...
6745
+ def WhichOneof(self, oneof_group: typing_extensions.Literal["_attempt_token", b"_attempt_token"]) -> typing_extensions.Literal["attempt_token"] | None: ...
6746
+
6747
+ global___MapStartOrContinueItem = MapStartOrContinueItem
6748
+
6749
+ class MapStartOrContinueRequest(google.protobuf.message.Message):
6750
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
6751
+
6752
+ FUNCTION_ID_FIELD_NUMBER: builtins.int
6753
+ PARENT_INPUT_ID_FIELD_NUMBER: builtins.int
6754
+ FUNCTION_CALL_ID_FIELD_NUMBER: builtins.int
6755
+ ITEMS_FIELD_NUMBER: builtins.int
6756
+ function_id: builtins.str
6757
+ parent_input_id: builtins.str
6758
+ function_call_id: builtins.str
6759
+ """This is given iff this is a map continue request."""
6760
+ @property
6761
+ def items(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___MapStartOrContinueItem]: ...
6762
+ def __init__(
6763
+ self,
6764
+ *,
6765
+ function_id: builtins.str = ...,
6766
+ parent_input_id: builtins.str = ...,
6767
+ function_call_id: builtins.str | None = ...,
6768
+ items: collections.abc.Iterable[global___MapStartOrContinueItem] | None = ...,
6769
+ ) -> None: ...
6770
+ def HasField(self, field_name: typing_extensions.Literal["_function_call_id", b"_function_call_id", "function_call_id", b"function_call_id"]) -> builtins.bool: ...
6771
+ def ClearField(self, field_name: typing_extensions.Literal["_function_call_id", b"_function_call_id", "function_call_id", b"function_call_id", "function_id", b"function_id", "items", b"items", "parent_input_id", b"parent_input_id"]) -> None: ...
6772
+ def WhichOneof(self, oneof_group: typing_extensions.Literal["_function_call_id", b"_function_call_id"]) -> typing_extensions.Literal["function_call_id"] | None: ...
6773
+
6774
+ global___MapStartOrContinueRequest = MapStartOrContinueRequest
6775
+
6776
+ class MapStartOrContinueResponse(google.protobuf.message.Message):
6777
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
6778
+
6779
+ FUNCTION_ID_FIELD_NUMBER: builtins.int
6780
+ FUNCTION_CALL_ID_FIELD_NUMBER: builtins.int
6781
+ MAX_INPUTS_OUTSTANDING_FIELD_NUMBER: builtins.int
6782
+ ATTEMPT_TOKENS_FIELD_NUMBER: builtins.int
6783
+ RETRY_POLICY_FIELD_NUMBER: builtins.int
6784
+ function_id: builtins.str
6785
+ function_call_id: builtins.str
6786
+ max_inputs_outstanding: builtins.int
6787
+ @property
6788
+ def attempt_tokens(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: ...
6789
+ @property
6790
+ def retry_policy(self) -> global___FunctionRetryPolicy:
6791
+ """TODO(ben-okeefe): Not currently used"""
6792
+ def __init__(
6793
+ self,
6794
+ *,
6795
+ function_id: builtins.str = ...,
6796
+ function_call_id: builtins.str = ...,
6797
+ max_inputs_outstanding: builtins.int = ...,
6798
+ attempt_tokens: collections.abc.Iterable[builtins.str] | None = ...,
6799
+ retry_policy: global___FunctionRetryPolicy | None = ...,
6800
+ ) -> None: ...
6801
+ def HasField(self, field_name: typing_extensions.Literal["retry_policy", b"retry_policy"]) -> builtins.bool: ...
6802
+ def ClearField(self, field_name: typing_extensions.Literal["attempt_tokens", b"attempt_tokens", "function_call_id", b"function_call_id", "function_id", b"function_id", "max_inputs_outstanding", b"max_inputs_outstanding", "retry_policy", b"retry_policy"]) -> None: ...
6803
+
6804
+ global___MapStartOrContinueResponse = MapStartOrContinueResponse
6805
+
6671
6806
  class MethodDefinition(google.protobuf.message.Message):
6672
6807
  DESCRIPTOR: google.protobuf.descriptor.Descriptor
6673
6808
 
@@ -445,6 +445,16 @@ class ModalClientStub(object):
445
445
  request_serializer=modal__proto_dot_api__pb2.ImageJoinStreamingRequest.SerializeToString,
446
446
  response_deserializer=modal__proto_dot_api__pb2.ImageJoinStreamingResponse.FromString,
447
447
  )
448
+ self.MapAwait = channel.unary_unary(
449
+ '/modal.client.ModalClient/MapAwait',
450
+ request_serializer=modal__proto_dot_api__pb2.MapAwaitRequest.SerializeToString,
451
+ response_deserializer=modal__proto_dot_api__pb2.MapAwaitResponse.FromString,
452
+ )
453
+ self.MapStartOrContinue = channel.unary_unary(
454
+ '/modal.client.ModalClient/MapStartOrContinue',
455
+ request_serializer=modal__proto_dot_api__pb2.MapStartOrContinueRequest.SerializeToString,
456
+ response_deserializer=modal__proto_dot_api__pb2.MapStartOrContinueResponse.FromString,
457
+ )
448
458
  self.MountGetOrCreate = channel.unary_unary(
449
459
  '/modal.client.ModalClient/MountGetOrCreate',
450
460
  request_serializer=modal__proto_dot_api__pb2.MountGetOrCreateRequest.SerializeToString,
@@ -1350,6 +1360,19 @@ class ModalClientServicer(object):
1350
1360
  context.set_details('Method not implemented!')
1351
1361
  raise NotImplementedError('Method not implemented!')
1352
1362
 
1363
+ def MapAwait(self, request, context):
1364
+ """Input Plane Map
1365
+ """
1366
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
1367
+ context.set_details('Method not implemented!')
1368
+ raise NotImplementedError('Method not implemented!')
1369
+
1370
+ def MapStartOrContinue(self, request, context):
1371
+ """Missing associated documentation comment in .proto file."""
1372
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
1373
+ context.set_details('Method not implemented!')
1374
+ raise NotImplementedError('Method not implemented!')
1375
+
1353
1376
  def MountGetOrCreate(self, request, context):
1354
1377
  """Mounts
1355
1378
  """
@@ -2234,6 +2257,16 @@ def add_ModalClientServicer_to_server(servicer, server):
2234
2257
  request_deserializer=modal__proto_dot_api__pb2.ImageJoinStreamingRequest.FromString,
2235
2258
  response_serializer=modal__proto_dot_api__pb2.ImageJoinStreamingResponse.SerializeToString,
2236
2259
  ),
2260
+ 'MapAwait': grpc.unary_unary_rpc_method_handler(
2261
+ servicer.MapAwait,
2262
+ request_deserializer=modal__proto_dot_api__pb2.MapAwaitRequest.FromString,
2263
+ response_serializer=modal__proto_dot_api__pb2.MapAwaitResponse.SerializeToString,
2264
+ ),
2265
+ 'MapStartOrContinue': grpc.unary_unary_rpc_method_handler(
2266
+ servicer.MapStartOrContinue,
2267
+ request_deserializer=modal__proto_dot_api__pb2.MapStartOrContinueRequest.FromString,
2268
+ response_serializer=modal__proto_dot_api__pb2.MapStartOrContinueResponse.SerializeToString,
2269
+ ),
2237
2270
  'MountGetOrCreate': grpc.unary_unary_rpc_method_handler(
2238
2271
  servicer.MountGetOrCreate,
2239
2272
  request_deserializer=modal__proto_dot_api__pb2.MountGetOrCreateRequest.FromString,
@@ -4071,6 +4104,40 @@ class ModalClient(object):
4071
4104
  options, channel_credentials,
4072
4105
  insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
4073
4106
 
4107
+ @staticmethod
4108
+ def MapAwait(request,
4109
+ target,
4110
+ options=(),
4111
+ channel_credentials=None,
4112
+ call_credentials=None,
4113
+ insecure=False,
4114
+ compression=None,
4115
+ wait_for_ready=None,
4116
+ timeout=None,
4117
+ metadata=None):
4118
+ return grpc.experimental.unary_unary(request, target, '/modal.client.ModalClient/MapAwait',
4119
+ modal__proto_dot_api__pb2.MapAwaitRequest.SerializeToString,
4120
+ modal__proto_dot_api__pb2.MapAwaitResponse.FromString,
4121
+ options, channel_credentials,
4122
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
4123
+
4124
+ @staticmethod
4125
+ def MapStartOrContinue(request,
4126
+ target,
4127
+ options=(),
4128
+ channel_credentials=None,
4129
+ call_credentials=None,
4130
+ insecure=False,
4131
+ compression=None,
4132
+ wait_for_ready=None,
4133
+ timeout=None,
4134
+ metadata=None):
4135
+ return grpc.experimental.unary_unary(request, target, '/modal.client.ModalClient/MapStartOrContinue',
4136
+ modal__proto_dot_api__pb2.MapStartOrContinueRequest.SerializeToString,
4137
+ modal__proto_dot_api__pb2.MapStartOrContinueResponse.FromString,
4138
+ options, channel_credentials,
4139
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
4140
+
4074
4141
  @staticmethod
4075
4142
  def MountGetOrCreate(request,
4076
4143
  target,
@@ -374,6 +374,15 @@ class ModalClientStub:
374
374
  modal_proto.api_pb2.ImageJoinStreamingRequest,
375
375
  modal_proto.api_pb2.ImageJoinStreamingResponse,
376
376
  ]
377
+ MapAwait: grpc.UnaryUnaryMultiCallable[
378
+ modal_proto.api_pb2.MapAwaitRequest,
379
+ modal_proto.api_pb2.MapAwaitResponse,
380
+ ]
381
+ """Input Plane Map"""
382
+ MapStartOrContinue: grpc.UnaryUnaryMultiCallable[
383
+ modal_proto.api_pb2.MapStartOrContinueRequest,
384
+ modal_proto.api_pb2.MapStartOrContinueResponse,
385
+ ]
377
386
  MountGetOrCreate: grpc.UnaryUnaryMultiCallable[
378
387
  modal_proto.api_pb2.MountGetOrCreateRequest,
379
388
  modal_proto.api_pb2.MountGetOrCreateResponse,
@@ -1218,6 +1227,19 @@ class ModalClientServicer(metaclass=abc.ABCMeta):
1218
1227
  context: grpc.ServicerContext,
1219
1228
  ) -> collections.abc.Iterator[modal_proto.api_pb2.ImageJoinStreamingResponse]: ...
1220
1229
  @abc.abstractmethod
1230
+ def MapAwait(
1231
+ self,
1232
+ request: modal_proto.api_pb2.MapAwaitRequest,
1233
+ context: grpc.ServicerContext,
1234
+ ) -> modal_proto.api_pb2.MapAwaitResponse:
1235
+ """Input Plane Map"""
1236
+ @abc.abstractmethod
1237
+ def MapStartOrContinue(
1238
+ self,
1239
+ request: modal_proto.api_pb2.MapStartOrContinueRequest,
1240
+ context: grpc.ServicerContext,
1241
+ ) -> modal_proto.api_pb2.MapStartOrContinueResponse: ...
1242
+ @abc.abstractmethod
1221
1243
  def MountGetOrCreate(
1222
1244
  self,
1223
1245
  request: modal_proto.api_pb2.MountGetOrCreateRequest,
@@ -104,6 +104,8 @@ class ModalClientModal:
104
104
  self.ImageFromId = modal.client.UnaryUnaryWrapper(grpclib_stub.ImageFromId, client, server_url)
105
105
  self.ImageGetOrCreate = modal.client.UnaryUnaryWrapper(grpclib_stub.ImageGetOrCreate, client, server_url)
106
106
  self.ImageJoinStreaming = modal.client.UnaryStreamWrapper(grpclib_stub.ImageJoinStreaming, client, server_url)
107
+ self.MapAwait = modal.client.UnaryUnaryWrapper(grpclib_stub.MapAwait, client, server_url)
108
+ self.MapStartOrContinue = modal.client.UnaryUnaryWrapper(grpclib_stub.MapStartOrContinue, client, server_url)
107
109
  self.MountGetOrCreate = modal.client.UnaryUnaryWrapper(grpclib_stub.MountGetOrCreate, client, server_url)
108
110
  self.MountPutFile = modal.client.UnaryUnaryWrapper(grpclib_stub.MountPutFile, client, server_url)
109
111
  self.NotebookKernelPublishResults = modal.client.UnaryUnaryWrapper(grpclib_stub.NotebookKernelPublishResults, 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.1.dev9"
4
+ __version__ = "1.1.1.dev11"