|
4 | 4 |
|
5 | 5 | import logging
|
6 | 6 | import os
|
7 |
| -import sys |
8 | 7 | from typing import Optional
|
9 | 8 |
|
10 | 9 | from vllm.config import KVTransferConfig
|
|
27 | 26 |
|
28 | 27 | logger = logging.getLogger(__name__)
|
29 | 28 |
|
30 |
| -DEFAULT_ENDPOINT = "dyn://dynamo.backend.generate" |
31 | 29 | DEFAULT_MODEL = "Qwen/Qwen3-0.6B"
|
32 | 30 |
|
33 | 31 | VALID_CONNECTORS = {"nixl", "lmcache", "kvbm", "null", "none"}
|
@@ -70,12 +68,6 @@ def parse_args() -> Config:
|
70 | 68 | parser.add_argument(
|
71 | 69 | "--version", action="version", version=f"Dynamo Backend VLLM {__version__}"
|
72 | 70 | )
|
73 |
| - parser.add_argument( |
74 |
| - "--endpoint", |
75 |
| - type=str, |
76 |
| - default=DEFAULT_ENDPOINT, |
77 |
| - help=f"Dynamo endpoint string in 'dyn://namespace.component.endpoint' format. Default: {DEFAULT_ENDPOINT}", |
78 |
| - ) |
79 | 71 | parser.add_argument(
|
80 | 72 | "--is-prefill-worker",
|
81 | 73 | action="store_true",
|
@@ -141,27 +133,9 @@ def parse_args() -> Config:
|
141 | 133 | # This becomes an `Option` on the Rust side
|
142 | 134 | config.served_model_name = None
|
143 | 135 |
|
144 |
| - namespace = os.environ.get("DYN_NAMESPACE", "dynamo") |
145 |
| - |
146 |
| - if args.is_prefill_worker: |
147 |
| - args.endpoint = f"dyn://{namespace}.prefill.generate" |
148 |
| - else: |
149 |
| - # For decode workers, also use the provided namespace instead of hardcoded "dynamo" |
150 |
| - args.endpoint = f"dyn://{namespace}.backend.generate" |
151 |
| - |
152 |
| - endpoint_str = args.endpoint.replace("dyn://", "", 1) |
153 |
| - endpoint_parts = endpoint_str.split(".") |
154 |
| - if len(endpoint_parts) != 3: |
155 |
| - logger.error( |
156 |
| - f"Invalid endpoint format: '{args.endpoint}'. Expected 'dyn://namespace.component.endpoint' or 'namespace.component.endpoint'." |
157 |
| - ) |
158 |
| - sys.exit(1) |
159 |
| - |
160 |
| - parsed_namespace, parsed_component_name, parsed_endpoint_name = endpoint_parts |
161 |
| - |
162 |
| - config.namespace = parsed_namespace |
163 |
| - config.component = parsed_component_name |
164 |
| - config.endpoint = parsed_endpoint_name |
| 136 | + config.namespace = os.environ.get("DYN_NAMESPACE", "dynamo") |
| 137 | + config.component = "prefill" if args.is_prefill_worker else "backend" |
| 138 | + config.endpoint = "generate" |
165 | 139 | config.engine_args = engine_args
|
166 | 140 | config.is_prefill_worker = args.is_prefill_worker
|
167 | 141 | config.migration_limit = args.migration_limit
|
|
0 commit comments