modal 1.1.5.dev59__py3-none-any.whl → 1.1.5.dev61__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/client.pyi +2 -2
- modal/experimental/flash.py +7 -1
- modal/experimental/flash.pyi +7 -0
- {modal-1.1.5.dev59.dist-info → modal-1.1.5.dev61.dist-info}/METADATA +1 -1
- {modal-1.1.5.dev59.dist-info → modal-1.1.5.dev61.dist-info}/RECORD +10 -10
- modal_version/__init__.py +1 -1
- {modal-1.1.5.dev59.dist-info → modal-1.1.5.dev61.dist-info}/WHEEL +0 -0
- {modal-1.1.5.dev59.dist-info → modal-1.1.5.dev61.dist-info}/entry_points.txt +0 -0
- {modal-1.1.5.dev59.dist-info → modal-1.1.5.dev61.dist-info}/licenses/LICENSE +0 -0
- {modal-1.1.5.dev59.dist-info → modal-1.1.5.dev61.dist-info}/top_level.txt +0 -0
modal/client.pyi
CHANGED
|
@@ -33,7 +33,7 @@ class _Client:
|
|
|
33
33
|
server_url: str,
|
|
34
34
|
client_type: int,
|
|
35
35
|
credentials: typing.Optional[tuple[str, str]],
|
|
36
|
-
version: str = "1.1.5.
|
|
36
|
+
version: str = "1.1.5.dev61",
|
|
37
37
|
):
|
|
38
38
|
"""mdmd:hidden
|
|
39
39
|
The Modal client object is not intended to be instantiated directly by users.
|
|
@@ -164,7 +164,7 @@ class Client:
|
|
|
164
164
|
server_url: str,
|
|
165
165
|
client_type: int,
|
|
166
166
|
credentials: typing.Optional[tuple[str, str]],
|
|
167
|
-
version: str = "1.1.5.
|
|
167
|
+
version: str = "1.1.5.dev61",
|
|
168
168
|
):
|
|
169
169
|
"""mdmd:hidden
|
|
170
170
|
The Modal client object is not intended to be instantiated directly by users.
|
modal/experimental/flash.py
CHANGED
|
@@ -306,7 +306,7 @@ class _FlashPrometheusAutoscaler:
|
|
|
306
306
|
)
|
|
307
307
|
await self.autoscaling_decisions_dict.put("current_replicas", actual_target_containers)
|
|
308
308
|
|
|
309
|
-
await self.
|
|
309
|
+
await self._set_target_slots(actual_target_containers)
|
|
310
310
|
|
|
311
311
|
if time.time() - autoscaling_time < self.autoscaling_interval_seconds:
|
|
312
312
|
await asyncio.sleep(self.autoscaling_interval_seconds - (time.time() - autoscaling_time))
|
|
@@ -488,6 +488,11 @@ class _FlashPrometheusAutoscaler:
|
|
|
488
488
|
resp = await retry_transient_errors(self.client.stub.FlashContainerList, req)
|
|
489
489
|
return resp.containers
|
|
490
490
|
|
|
491
|
+
async def _set_target_slots(self, target_slots: int):
|
|
492
|
+
req = api_pb2.FlashSetTargetSlotsMetricsRequest(function_id=self.fn.object_id, target_slots=target_slots)
|
|
493
|
+
await retry_transient_errors(self.client.stub.FlashSetTargetSlotsMetrics, req)
|
|
494
|
+
return
|
|
495
|
+
|
|
491
496
|
def _make_scaling_decision(
|
|
492
497
|
self,
|
|
493
498
|
current_replicas: int,
|
|
@@ -515,6 +520,7 @@ class _FlashPrometheusAutoscaler:
|
|
|
515
520
|
Returns:
|
|
516
521
|
The target number of containers.
|
|
517
522
|
"""
|
|
523
|
+
|
|
518
524
|
if not autoscaling_decisions:
|
|
519
525
|
# Without data we can’t make a new decision – stay where we are.
|
|
520
526
|
return current_replicas
|
modal/experimental/flash.pyi
CHANGED
|
@@ -162,6 +162,7 @@ class _FlashPrometheusAutoscaler:
|
|
|
162
162
|
self, container_id: str
|
|
163
163
|
) -> typing.Optional[modal_proto.api_pb2.TaskGetAutoscalingMetricsResponse]: ...
|
|
164
164
|
async def _get_all_containers(self): ...
|
|
165
|
+
async def _set_target_slots(self, target_slots: int): ...
|
|
165
166
|
def _make_scaling_decision(
|
|
166
167
|
self,
|
|
167
168
|
current_replicas: int,
|
|
@@ -278,6 +279,12 @@ class FlashPrometheusAutoscaler:
|
|
|
278
279
|
|
|
279
280
|
_get_all_containers: ___get_all_containers_spec[typing_extensions.Self]
|
|
280
281
|
|
|
282
|
+
class ___set_target_slots_spec(typing_extensions.Protocol[SUPERSELF]):
|
|
283
|
+
def __call__(self, /, target_slots: int): ...
|
|
284
|
+
async def aio(self, /, target_slots: int): ...
|
|
285
|
+
|
|
286
|
+
_set_target_slots: ___set_target_slots_spec[typing_extensions.Self]
|
|
287
|
+
|
|
281
288
|
def _make_scaling_decision(
|
|
282
289
|
self,
|
|
283
290
|
current_replicas: int,
|
|
@@ -22,7 +22,7 @@ modal/app.py,sha256=RRUz2NjAWIQLHtU2IEslOlnIOCxPiWts3IP3rTFArkY,49635
|
|
|
22
22
|
modal/app.pyi,sha256=CDp_rlX3hBuFdv9VRsKvNKCgu_hS2IO2uNU5qhzmXps,44719
|
|
23
23
|
modal/call_graph.py,sha256=1g2DGcMIJvRy-xKicuf63IVE98gJSnQsr8R_NVMptNc,2581
|
|
24
24
|
modal/client.py,sha256=kyAIVB3Ay-XKJizQ_1ufUFB__EagV0MLmHJpyYyJ7J0,18636
|
|
25
|
-
modal/client.pyi,sha256=
|
|
25
|
+
modal/client.pyi,sha256=pdbI5vqk7ErWqHyyn2Pa172-aBt_-FDUE1P-5MOZUzQ,15831
|
|
26
26
|
modal/cloud_bucket_mount.py,sha256=I2GRXYhOWLIz2kJZjXu75jAm9EJkBNcutGc6jR2ReUw,5928
|
|
27
27
|
modal/cloud_bucket_mount.pyi,sha256=VuUOipMIHqFXMkD-3g2bsoqpSxV5qswlFHDOqPQzYAo,7405
|
|
28
28
|
modal/cls.py,sha256=R1uLQbdqWRRjvxs0I57a4hZZELZkBVCxOKxvKryU5_s,41639
|
|
@@ -150,10 +150,10 @@ modal/cli/programs/run_jupyter.py,sha256=44Lpvqk2l3hH-uOkmAOzw60NEsfB5uaRDWDKVsh
|
|
|
150
150
|
modal/cli/programs/run_marimo.py,sha256=HyZ2za0NYqg31-mGxFQxUIAJ3Q-jRaMocEwWwI5-cdw,2887
|
|
151
151
|
modal/cli/programs/vscode.py,sha256=KbTAaIXyQBVCDXxXjmBHmKpgXkUw0q4R4KkJvUjCYgk,3380
|
|
152
152
|
modal/experimental/__init__.py,sha256=QkCGP1lZiOa8sY4ZNqMF8JsnuRaDI7PJpXkGtKMWgDg,15751
|
|
153
|
-
modal/experimental/flash.py,sha256=
|
|
154
|
-
modal/experimental/flash.pyi,sha256=
|
|
153
|
+
modal/experimental/flash.py,sha256=C4sef08rARYFllsgtqukFmYL18SZW0_JpMS0BejDcUs,28552
|
|
154
|
+
modal/experimental/flash.pyi,sha256=vV_OQhtdrPn8SW0XrBK-aLLHHIvxAzLzwFbWrke-m74,15463
|
|
155
155
|
modal/experimental/ipython.py,sha256=TrCfmol9LGsRZMeDoeMPx3Hv3BFqQhYnmD_iH0pqdhk,2904
|
|
156
|
-
modal-1.1.5.
|
|
156
|
+
modal-1.1.5.dev61.dist-info/licenses/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
|
|
157
157
|
modal_docs/__init__.py,sha256=svYKtV8HDwDCN86zbdWqyq5T8sMdGDj0PVlzc2tIxDM,28
|
|
158
158
|
modal_docs/gen_cli_docs.py,sha256=c1yfBS_x--gL5bs0N4ihMwqwX8l3IBWSkBAKNNIi6bQ,3801
|
|
159
159
|
modal_docs/gen_reference_docs.py,sha256=d_CQUGQ0rfw28u75I2mov9AlS773z9rG40-yq5o7g2U,6359
|
|
@@ -182,10 +182,10 @@ modal_proto/sandbox_router_pb2.py,sha256=INd9izYaIYqllESQt4MSv2Rj9Hf5bMjAvtCc9b4
|
|
|
182
182
|
modal_proto/sandbox_router_pb2.pyi,sha256=YCK0WnCgRos3-p7t4USQQ7x6WAuM278yeQX2IeU5mLg,13295
|
|
183
183
|
modal_proto/sandbox_router_pb2_grpc.py,sha256=zonC5flvCwxeZYJPENj1IJo2Mr0J58DpoC1_8IdPYik,8243
|
|
184
184
|
modal_proto/sandbox_router_pb2_grpc.pyi,sha256=4QgCB9b7_ykvH8YD-hfnogVH9CLyHVDC5QNb03l4_X8,2735
|
|
185
|
-
modal_version/__init__.py,sha256=
|
|
185
|
+
modal_version/__init__.py,sha256=3e5ryt7ekYjR4cNgfkj-g-du-v2GUyk9scb36Uf-mA0,121
|
|
186
186
|
modal_version/__main__.py,sha256=2FO0yYQQwDTh6udt1h-cBnGd1c4ZyHnHSI4BksxzVac,105
|
|
187
|
-
modal-1.1.5.
|
|
188
|
-
modal-1.1.5.
|
|
189
|
-
modal-1.1.5.
|
|
190
|
-
modal-1.1.5.
|
|
191
|
-
modal-1.1.5.
|
|
187
|
+
modal-1.1.5.dev61.dist-info/METADATA,sha256=GX2YB8OuwhQBR8LSKUTyvy__1oc3So7teAoTCLW70qI,2481
|
|
188
|
+
modal-1.1.5.dev61.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
|
|
189
|
+
modal-1.1.5.dev61.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
|
|
190
|
+
modal-1.1.5.dev61.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
|
|
191
|
+
modal-1.1.5.dev61.dist-info/RECORD,,
|
modal_version/__init__.py
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|