Skip to content

Commit 58a4fcd

Browse files
[Doc][Serve] Add missing imports to autoscaling policy example (#57896)
## Description Add missing imports to autoscaling policy example ## Related issues Link related issues: #57876 (comment) --------- Signed-off-by: daiping8 <dai.ping88@zte.com.cn> Signed-off-by: Ping Dai <dai.ping88@zte.com.cn> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent 9cbe131 commit 58a4fcd

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

doc/source/serve/doc_code/autoscaling_policy.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ def scheduled_batch_processing_policy(
2424

2525

2626
# __begin_custom_metrics_autoscaling_policy__
27+
from typing import Any, Dict
28+
from ray.serve.config import AutoscalingContext
29+
30+
2731
def custom_metrics_autoscaling_policy(
2832
ctx: AutoscalingContext,
2933
) -> tuple[int, Dict[str, Any]]:
@@ -46,10 +50,12 @@ def custom_metrics_autoscaling_policy(
4650

4751

4852
# __begin_application_level_autoscaling_policy__
49-
from ray.serve._private.common import DeploymentID
5053
from typing import Dict, Tuple
5154
from ray.serve.config import AutoscalingContext
5255

56+
from ray.serve._private.common import DeploymentID
57+
from ray.serve.config import AutoscalingContext
58+
5359

5460
def coordinated_scaling_policy(
5561
contexts: Dict[DeploymentID, AutoscalingContext]

0 commit comments

Comments
 (0)