Skip to content

Commit bb98036

Browse files
committed
refactor: move planner arg validation to planner_core for better cohesion
Signed-off-by: Daiyaan <darfeen@nvidia.com>
1 parent 0ea00e8 commit bb98036

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

components/src/dynamo/planner/planner_sla.py

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,7 @@
1818

1919
from pydantic import BaseModel
2020

21-
from dynamo.planner.utils.planner_argparse import (
22-
create_sla_planner_parser,
23-
validate_planner_args,
24-
)
21+
from dynamo.planner.utils.planner_argparse import create_sla_planner_parser
2522
from dynamo.planner.utils.planner_core import start_sla_planner
2623
from dynamo.runtime import DistributedRuntime, dynamo_worker
2724

@@ -38,19 +35,12 @@ class RequestType(BaseModel):
3835

3936
@dynamo_worker()
4037
async def init_planner(runtime: DistributedRuntime, args):
41-
# Validate args
42-
validate_planner_args(args)
43-
44-
component = runtime.namespace(args.namespace).component("Planner")
45-
46-
# Planner always runs its observation/prediction/decision loop
47-
# In local mode: executes scaling directly via KubernetesConnector
48-
# In delegating mode: sends scale requests to GlobalPlanner
4938
await asyncio.sleep(INIT_PLANNER_START_DELAY)
5039

5140
await start_sla_planner(runtime, args)
5241

53-
# Serve dummy generate endpoint
42+
component = runtime.namespace(args.namespace).component("Planner")
43+
5444
async def generate(request: RequestType):
5545
"""Dummy endpoint to satisfy that each component has an endpoint"""
5646
yield "mock endpoint"

0 commit comments

Comments
 (0)