modal 0.73.142__py3-none-any.whl → 0.73.143__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/client.pyi +2 -2
- modal/parallel_map.py +12 -8
- modal/parallel_map.pyi +1 -0
- {modal-0.73.142.dist-info → modal-0.73.143.dist-info}/METADATA +1 -1
- {modal-0.73.142.dist-info → modal-0.73.143.dist-info}/RECORD +10 -10
- modal_version/_version_generated.py +1 -1
- {modal-0.73.142.dist-info → modal-0.73.143.dist-info}/LICENSE +0 -0
- {modal-0.73.142.dist-info → modal-0.73.143.dist-info}/WHEEL +0 -0
- {modal-0.73.142.dist-info → modal-0.73.143.dist-info}/entry_points.txt +0 -0
- {modal-0.73.142.dist-info → modal-0.73.143.dist-info}/top_level.txt +0 -0
modal/client.pyi
CHANGED
@@ -31,7 +31,7 @@ class _Client:
|
|
31
31
|
server_url: str,
|
32
32
|
client_type: int,
|
33
33
|
credentials: typing.Optional[tuple[str, str]],
|
34
|
-
version: str = "0.73.
|
34
|
+
version: str = "0.73.143",
|
35
35
|
): ...
|
36
36
|
def is_closed(self) -> bool: ...
|
37
37
|
@property
|
@@ -93,7 +93,7 @@ class Client:
|
|
93
93
|
server_url: str,
|
94
94
|
client_type: int,
|
95
95
|
credentials: typing.Optional[tuple[str, str]],
|
96
|
-
version: str = "0.73.
|
96
|
+
version: str = "0.73.143",
|
97
97
|
): ...
|
98
98
|
def is_closed(self) -> bool: ...
|
99
99
|
@property
|
modal/parallel_map.py
CHANGED
@@ -70,10 +70,7 @@ class _OutputValue:
|
|
70
70
|
value: Any
|
71
71
|
|
72
72
|
|
73
|
-
|
74
|
-
# or waiting for completion). if this limit is reached, we will block sending
|
75
|
-
# more inputs to the server until some of the existing inputs are completed.
|
76
|
-
MAP_MAX_INPUTS_OUTSTANDING = 1000
|
73
|
+
MAX_INPUTS_OUTSTANDING_DEFAULT = 1000
|
77
74
|
|
78
75
|
# maximum number of inputs to send to the server in a single request
|
79
76
|
MAP_INVOCATION_CHUNK_SIZE = 49
|
@@ -105,6 +102,9 @@ async def _map_invocation(
|
|
105
102
|
function_call_jwt = response.function_call_jwt
|
106
103
|
retry_policy = response.retry_policy
|
107
104
|
sync_client_retries_enabled = response.sync_client_retries_enabled
|
105
|
+
# The server should always send a value back for max_inputs_outstanding.
|
106
|
+
# Falling back to a default just in case something very unexpected happens.
|
107
|
+
max_inputs_outstanding = response.max_inputs_outstanding or MAX_INPUTS_OUTSTANDING_DEFAULT
|
108
108
|
|
109
109
|
have_all_inputs = False
|
110
110
|
inputs_created = 0
|
@@ -127,7 +127,7 @@ async def _map_invocation(
|
|
127
127
|
completed_outputs: set[str] = set() # Set of input_ids whose outputs are complete (expecting no more values)
|
128
128
|
input_queue: asyncio.Queue[api_pb2.FunctionPutInputsItem | None] = asyncio.Queue()
|
129
129
|
map_items_manager = _MapItemsManager(
|
130
|
-
retry_policy, function_call_invocation_type, retry_queue, sync_client_retries_enabled
|
130
|
+
retry_policy, function_call_invocation_type, retry_queue, sync_client_retries_enabled, max_inputs_outstanding
|
131
131
|
)
|
132
132
|
|
133
133
|
async def create_input(argskwargs):
|
@@ -700,13 +700,17 @@ class _MapItemsManager:
|
|
700
700
|
retry_policy: api_pb2.FunctionRetryPolicy,
|
701
701
|
function_call_invocation_type: "api_pb2.FunctionCallInvocationType.ValueType",
|
702
702
|
retry_queue: TimestampPriorityQueue,
|
703
|
-
sync_client_retries_enabled: bool
|
703
|
+
sync_client_retries_enabled: bool,
|
704
|
+
max_inputs_outstanding: int
|
705
|
+
|
704
706
|
):
|
705
707
|
self._retry_policy = retry_policy
|
706
708
|
self.function_call_invocation_type = function_call_invocation_type
|
707
709
|
self._retry_queue = retry_queue
|
708
|
-
# semaphore to
|
709
|
-
|
710
|
+
# semaphore to control the maximum number of inputs that can be in progress (either queued to be sent,
|
711
|
+
# or waiting for completion). if this limit is reached, we will block sending more inputs to the server
|
712
|
+
# until some of the existing inputs are completed.
|
713
|
+
self._inputs_outstanding = asyncio.BoundedSemaphore(max_inputs_outstanding)
|
710
714
|
self._item_context: dict[int, _MapItemContext] = {}
|
711
715
|
self._sync_client_retries_enabled = sync_client_retries_enabled
|
712
716
|
|
modal/parallel_map.pyi
CHANGED
@@ -138,6 +138,7 @@ class _MapItemsManager:
|
|
138
138
|
function_call_invocation_type: int,
|
139
139
|
retry_queue: modal._utils.async_utils.TimestampPriorityQueue,
|
140
140
|
sync_client_retries_enabled: bool,
|
141
|
+
max_inputs_outstanding: int,
|
141
142
|
): ...
|
142
143
|
async def add_items(self, items: list[modal_proto.api_pb2.FunctionPutInputsItem]): ...
|
143
144
|
async def prepare_items_for_retry(
|
@@ -23,7 +23,7 @@ modal/app.py,sha256=NKH7Cw1M6eyyrMXFbhWfdo3uRd28-8kv0Pcw56kPiPU,47312
|
|
23
23
|
modal/app.pyi,sha256=pUEqciyGZ446sc_QoG8XcQ_oc6oU-U4dqjkxjhgOX98,26968
|
24
24
|
modal/call_graph.py,sha256=1g2DGcMIJvRy-xKicuf63IVE98gJSnQsr8R_NVMptNc,2581
|
25
25
|
modal/client.py,sha256=j9D3hNis1lfhnz9lVFGgJgowbH3PaGUzNKgHPWYG778,15372
|
26
|
-
modal/client.pyi,sha256=
|
26
|
+
modal/client.pyi,sha256=CfDyx-Nfu0CC1bs8CypPA7qvaTvjCabL-FpRgUm6cog,7661
|
27
27
|
modal/cloud_bucket_mount.py,sha256=YOe9nnvSr4ZbeCn587d7_VhE9IioZYRvF9VYQTQux08,5914
|
28
28
|
modal/cloud_bucket_mount.pyi,sha256=30T3K1a89l6wzmEJ_J9iWv9SknoGqaZDx59Xs-ZQcmk,1607
|
29
29
|
modal/cls.py,sha256=PJimWA9q_sbQJNLbYy7fzjZGBm_hdfXuuZ7O_pKLXdk,31586
|
@@ -53,8 +53,8 @@ modal/network_file_system.pyi,sha256=4N3eqMbTSlqmS8VV_aJK-uvrgJC8xnf_YtW5FHfRfc8
|
|
53
53
|
modal/object.py,sha256=bTeskuY8JFrESjU4_UL_nTwYlBQdOLmVaOX3X6EMxsg,164
|
54
54
|
modal/object.pyi,sha256=kyJkRQcVv3ct7zSAxvvXcuhBVeH914v80uSlqeS7cA4,5632
|
55
55
|
modal/output.py,sha256=q4T9uHduunj4NwY-YSwkHGgjZlCXMuJbfQ5UFaAGRAc,1968
|
56
|
-
modal/parallel_map.py,sha256=
|
57
|
-
modal/parallel_map.pyi,sha256
|
56
|
+
modal/parallel_map.py,sha256=2d30AM43g8SazkhGbbP1t2sACa4NRqeZrw3JEAqqZDg,33867
|
57
|
+
modal/parallel_map.pyi,sha256=mEenHruPiZDq3ucV_6RM8ctc0c_Qpqra5MBagXeHiiQ,5708
|
58
58
|
modal/partial_function.py,sha256=y0h-EvlPnfvZr7nlJLOFk7NB-K-ZO41XJnsGtQTesAI,1200
|
59
59
|
modal/partial_function.pyi,sha256=-xWrvFMhLT6ulx9B82u1g8kL69vt3nYAvp8pV0d__uw,5407
|
60
60
|
modal/proxy.py,sha256=NrOevrWxG3G7-zlyRzG6BcIvop7AWLeyahZxitbBaOk,1418
|
@@ -170,10 +170,10 @@ modal_proto/options_pb2_grpc.pyi,sha256=CImmhxHsYnF09iENPoe8S4J-n93jtgUYD2JPAc0y
|
|
170
170
|
modal_proto/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
171
171
|
modal_version/__init__.py,sha256=wiJQ53c-OMs0Xf1UeXOxQ7FwlV1VzIjnX6o-pRYZ_Pk,470
|
172
172
|
modal_version/__main__.py,sha256=2FO0yYQQwDTh6udt1h-cBnGd1c4ZyHnHSI4BksxzVac,105
|
173
|
-
modal_version/_version_generated.py,sha256=
|
174
|
-
modal-0.73.
|
175
|
-
modal-0.73.
|
176
|
-
modal-0.73.
|
177
|
-
modal-0.73.
|
178
|
-
modal-0.73.
|
179
|
-
modal-0.73.
|
173
|
+
modal_version/_version_generated.py,sha256=Swo3V9IveICUpIFVpIVccS8muTG9yF2vONXjcIswZwg,150
|
174
|
+
modal-0.73.143.dist-info/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
|
175
|
+
modal-0.73.143.dist-info/METADATA,sha256=RIQlD3ToI9VKKHLrS0I7OnNSeHbBVL6WfzoINs9kuZA,2453
|
176
|
+
modal-0.73.143.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
|
177
|
+
modal-0.73.143.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
|
178
|
+
modal-0.73.143.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
|
179
|
+
modal-0.73.143.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|