Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
065cb2a
feat: update k8s deploy yamls to use binary/python3
hhzhang16 Jul 11, 2025
aee478c
config part working
tedzhouhk Jul 11, 2025
9455ad1
feat: add component type worker and bump image
hhzhang16 Jul 12, 2025
f3dd01a
fix: merge conflicts
mohammedabdulwahhab Jul 14, 2025
7de97ef
fix: using health checks exposed by dynamo-run
mohammedabdulwahhab Jul 14, 2025
16fd7f2
Merge branch 'main' of github.com:ai-dynamo/dynamo into hannahz/dep-2…
hhzhang16 Jul 14, 2025
3a29913
Merge branch 'hannahz/dep-216-create-deploy-crds-for-vllm_v1-example'…
hhzhang16 Jul 14, 2025
51835db
fix: check for message in logs
mohammedabdulwahhab Jul 14, 2025
39b377f
Merge branch 'hannahz/dep-216-create-deploy-crds-for-vllm_v1-example'…
mohammedabdulwahhab Jul 14, 2025
dddb45f
Merge branch 'hannahz/dep-216-create-deploy-crds-for-vllm_v1-example'…
tedzhouhk Jul 14, 2025
34bc79c
define apis
tedzhouhk Jul 14, 2025
8c22d14
update script
tedzhouhk Jul 14, 2025
9856dde
fix: add dynamodeployment lib
mohammedabdulwahhab Jul 14, 2025
61a215b
fix: working client lib
mohammedabdulwahhab Jul 14, 2025
5141334
fix: working client lib
mohammedabdulwahhab Jul 14, 2025
8e25a29
integrate with utils.dynamo_deployment
tedzhouhk Jul 15, 2025
1d87164
fix: port forward works
mohammedabdulwahhab Jul 15, 2025
aaf4544
Merge branch 'hzhou/profile_vllmv1_k8s' of https://github.com/ai-dyna…
mohammedabdulwahhab Jul 15, 2025
65dec07
pc
tedzhouhk Jul 15, 2025
0af209b
add dep; bug fix
tedzhouhk Jul 15, 2025
918733a
Merge branch 'main' of https://github.com/ai-dynamo/dynamo into hzhou…
tedzhouhk Jul 15, 2025
3f900ef
staging, port forward not working
tedzhouhk Jul 15, 2025
bd12d40
stage
tedzhouhk Jul 15, 2025
7ac43a9
Merge branch 'main' of https://github.com/ai-dynamo/dynamo into hzhou…
mohammedabdulwahhab Jul 15, 2025
9971acf
fix: running script
mohammedabdulwahhab Jul 16, 2025
a5d8aca
fix: fix
mohammedabdulwahhab Jul 16, 2025
7b1d99a
Merge branch 'main' of https://github.com/ai-dynamo/dynamo into hzhou…
tedzhouhk Jul 16, 2025
f8f9363
add logic to find a free port
tedzhouhk Jul 16, 2025
8e292f6
feat: add Kubernetes service account configuration for SLA profiling …
hhzhang16 Jul 17, 2025
d62731f
feat: use service DNS for interfacing with deployments when profiling…
hhzhang16 Jul 17, 2025
a1aea5a
Revert "feat: use service DNS for interfacing with deployments when p…
hhzhang16 Jul 17, 2025
06bfe3b
feat: use service DNS instead of port forwarding for K8s-deployed SLA…
hhzhang16 Jul 18, 2025
ff96b9e
add try-catch waiting for deployment
tedzhouhk Jul 18, 2025
5419885
Merge branch 'main' of https://github.com/ai-dynamo/dynamo into hzhou…
tedzhouhk Jul 21, 2025
d2b6b00
feat: clean up outlying DGDs upon SLA profiling failure (#2016)
hhzhang16 Jul 21, 2025
450d371
add debug info
tedzhouhk Jul 22, 2025
d8ffe1a
Merge branch 'hzhou/profile_vllmv1_k8s' of https://github.com/ai-dyna…
tedzhouhk Jul 22, 2025
769c98e
sla planner
tedzhouhk Jul 22, 2025
e726d43
add choices
tedzhouhk Jul 22, 2025
3663c5c
Merge branch 'main' of github.com:ai-dynamo/dynamo into hzhou/sla-pla…
hhzhang16 Jul 22, 2025
ff6c491
feat: vllm_v1 -> vllm and remove vllm_v0 from planner
hhzhang16 Jul 22, 2025
6ebfe73
feat: remove local connector from init
hhzhang16 Jul 22, 2025
fb89fc2
feat: remove LocalConnector from core
hhzhang16 Jul 22, 2025
047cecb
feat: rework prometheus file for planner deployment
hhzhang16 Jul 22, 2025
894f2e7
Merge branch 'main' of github.com:ai-dynamo/dynamo into hannahz/dep-2…
hhzhang16 Jul 23, 2025
cd268ca
Merge branch 'main' of github.com:ai-dynamo/dynamo into hzhou/sla-pla…
hhzhang16 Jul 23, 2025
0f5082c
deprecate old docs
tedzhouhk Jul 23, 2025
9751e65
Merge branch 'main' of https://github.com/ai-dynamo/dynamo into hzhou…
tedzhouhk Jul 23, 2025
c33713f
Merge branch 'hzhou/sla-planner-ux-refac' of github.com:ai-dynamo/dyn…
hhzhang16 Jul 24, 2025
33371db
feat: update prometheus to work
hhzhang16 Jul 24, 2025
60dd89d
feat: k8s connector scaling P/D in one call (#2103)
tedzhouhk Jul 25, 2025
61a5e9a
Merge branch 'main' of github.com:ai-dynamo/dynamo into hannahz/dep-2…
hhzhang16 Jul 25, 2025
41f1ca0
fix: vllm_v1 -> vllm
hhzhang16 Jul 25, 2025
1584cd0
feat: remove unneeded files
hhzhang16 Jul 25, 2025
dd3f161
docs: update docs
hhzhang16 Jul 25, 2025
97f3f88
fix: vllm config in profiler
hhzhang16 Jul 25, 2025
9b34ee9
feat: wip but tentatively working planner, with documentation
hhzhang16 Jul 25, 2025
eb56dbb
fi: use provided namespace for decode
hhzhang16 Jul 25, 2025
b68779d
feat: use k8s deployment info instead of hardcoding prometheus endpoint
hhzhang16 Jul 25, 2025
c8e394d
fix: if no requests have been made yet, don't try to access list
hhzhang16 Jul 25, 2025
1bbfd8d
feat: use SLAPLannerDefaults port
hhzhang16 Jul 25, 2025
ba6b5c1
docs: clean up sla planner deployment docs
hhzhang16 Jul 25, 2025
e533dda
feat: use DYNAMO_NAMESPACE env var instead of --namespace arg
hhzhang16 Jul 26, 2025
a548d74
feat: fixes for working planner
hhzhang16 Jul 26, 2025
f6af0d5
feat: skip adjustments if no traffic
hhzhang16 Jul 26, 2025
445fe74
docs: doc updates for planner deployment
hhzhang16 Jul 26, 2025
f0999da
Merge branch 'main' of github.com:ai-dynamo/dynamo into hannahz/dep-2…
hhzhang16 Jul 26, 2025
bab714c
feat: delete k8s.sh
hhzhang16 Jul 26, 2025
a29c397
docs: slight doc modification
hhzhang16 Jul 26, 2025
daa3c4e
update resources
tedzhouhk Jul 26, 2025
539ff3e
update readme
tedzhouhk Jul 26, 2025
f994128
feat: address coderabbit MR comments
hhzhang16 Jul 28, 2025
d44b042
Merge branch 'main' of github.com:ai-dynamo/dynamo into hannahz/dep-2…
hhzhang16 Jul 28, 2025
f601f88
fix pytest
tedzhouhk Jul 28, 2025
69d64dc
mypy
tedzhouhk Jul 28, 2025
1fdf3e9
feat: addressing MR comments
hhzhang16 Jul 28, 2025
bf58bd0
feat: addressing MR comments
hhzhang16 Jul 28, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'main' of github.com:ai-dynamo/dynamo into hannahz/dep-253
…-deploy-sla-planner-to-k8s
  • Loading branch information
hhzhang16 committed Jul 25, 2025
commit 61a5e9adaf6dfbc9a2638f6a70cc0504a859fc86
291 changes: 174 additions & 117 deletions benchmarks/profiler/profile_sla.py

Large diffs are not rendered by default.

15 changes: 8 additions & 7 deletions benchmarks/profiler/utils/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,13 +198,14 @@ def get_port(cls, config: dict) -> int:
"args"
]
args = break_arguments(args)
for arg in args:
if arg.startswith("port="):
return int(arg.split("=")[1])
logger.warning(
f"Port not found in configuration args, using default port: {DYNAMO_RUN_DEFAULT_PORT}"
)
return DYNAMO_RUN_DEFAULT_PORT
try:
idx = args.index("--http-port")
return int(args[idx + 1])
except ValueError:
logger.warning(
f"Port not found in configuration args, using default port: {DYNAMO_RUN_DEFAULT_PORT}"
)
return DYNAMO_RUN_DEFAULT_PORT

@classmethod
def get_kv_cache_size_from_dynamo_log(cls, dynamo_log_fn: str) -> int:
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/profiler/utils/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@
]

DEFAULT_MODEL_NAME = "Qwen/Qwen3-0.6B"
DYNAMO_RUN_DEFAULT_PORT = 8080
DYNAMO_RUN_DEFAULT_PORT = 8000
49 changes: 39 additions & 10 deletions benchmarks/profiler/utils/dynamo_deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def __init__(
namespace: str,
model_name: str = "Qwen/Qwen3-0.6B",
deployment_name: str = "vllm-v1-agg",
frontend_port: int = 8000,
base_log_dir: Optional[str] = None,
service_name: Optional[str] = None,
):
Expand All @@ -66,6 +67,7 @@ def __init__(
Dict[str, Any]
] = None # Will store the full deployment spec
self.base_log_dir = Path(base_log_dir) if base_log_dir else Path("logs")
self.frontend_port = frontend_port

def _init_kubernetes(self):
"""Initialize kubernetes client"""
Expand All @@ -84,9 +86,7 @@ def get_service_url(self) -> str:
"""
Get the service URL using Kubernetes service DNS.
"""
service_url = (
f"http://{self.service_name}.{self.namespace}.svc.cluster.local:8000"
)
service_url = f"http://{self.service_name}.{self.namespace}.svc.cluster.local:{self.frontend_port}"
print(f"Using service URL: {service_url}")
return service_url

Expand All @@ -107,11 +107,6 @@ async def create_deployment(self, deployment: Union[dict, str]):
else:
self.deployment_spec = deployment

# Ensure deployment_spec is not None
assert (
self.deployment_spec is not None
), "deployment_spec should not be None after assignment"

# Extract component names
self.components = [
svc.lower() for svc in self.deployment_spec["spec"]["services"].keys()
Expand All @@ -129,18 +124,20 @@ async def create_deployment(self, deployment: Union[dict, str]):
plural="dynamographdeployments",
body=self.deployment_spec,
)
print(f"Successfully created deployment {self.deployment_name}")
except kubernetes.client.rest.ApiException as e:
if e.status == 409: # Already exists
print(f"Deployment {self.deployment_name} already exists")
else:
print(f"Failed to create deployment {self.deployment_name}: {e}")
raise

async def wait_for_deployment_ready(self, timeout: int = 600):
async def wait_for_deployment_ready(self, timeout: int = 1800):
"""
Wait for the custom resource to be ready.

Args:
timeout: Maximum time to wait in seconds
timeout: Maximum time to wait in seconds, default to 30 mins (image pulling can take a while)
"""
start_time = time.time()
# TODO: A little brittle, also should output intermediate status every so often.
Expand Down Expand Up @@ -255,6 +252,38 @@ async def delete_deployment(self):
raise


async def cleanup_remaining_deployments(deployment_clients, namespace):
"""Clean up any remaining tracked deployments, handling errors gracefully."""
import logging

logger = logging.getLogger(__name__)

if not deployment_clients:
logger.info("No deployments to clean up")
return

logger.info(f"Cleaning up {len(deployment_clients)} remaining deployments...")
for deployment_client in deployment_clients:
try:
logger.info(
f"Attempting to delete deployment {deployment_client.deployment_name}..."
)
await deployment_client.delete_deployment()
logger.info(
f"Successfully deleted deployment {deployment_client.deployment_name}"
)
except Exception as e:
# If deployment doesn't exist (404), that's fine - it was already cleaned up
if "404" in str(e) or "not found" in str(e).lower():
logger.info(
f"Deployment {deployment_client.deployment_name} was already deleted"
)
else:
logger.error(
f"Failed to delete deployment {deployment_client.deployment_name}: {e}"
)


async def main():
parser = argparse.ArgumentParser(
description="Deploy and manage DynamoGraphDeployment CRDs"
Expand Down
8 changes: 4 additions & 4 deletions components/backends/vllm/deploy/disagg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ spec:
failureThreshold: 10
resources:
requests:
cpu: "10"
cpu: "32"
memory: "40Gi"
gpu: "1"
limits:
cpu: "10"
cpu: "32"
memory: "40Gi"
gpu: "1"
extraPodSpec:
Expand Down Expand Up @@ -113,11 +113,11 @@ spec:
failureThreshold: 10
resources:
requests:
cpu: "10"
cpu: "32"
memory: "40Gi"
gpu: "1"
limits:
cpu: "10"
cpu: "32"
memory: "40Gi"
gpu: "1"
extraPodSpec:
Expand Down
28 changes: 15 additions & 13 deletions components/backends/vllm/deploy/disagg_planner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,11 @@ spec:
memory: "2Gi"
extraPodSpec:
mainContainer:
image: nvcr.io/nvidian/nim-llm-dev/vllm-runtime:dep-253.5
workingDir: /workspace/components/planner/src
# env:
# - name: DYNAMO_SERVICE_CONFIG
# value: '{"Prometheus":{"global":{"scrape_interval":"5s"},"scrape_configs":[{"job_name":"prometheus","static_configs":[{"targets":["localhost:9090"]}]},{"job_name":"frontend","static_configs":[{"targets":["localhost:8000"]}]}]}}'
# - name: PYTHONPATH
# value: "/workspace/components/planner/src"
image: nvcr.io/nvidian/nim-llm-dev/vllm-runtime:dep-233.17
workingDir: /workspace/components/backends/vllm
command:
- /bin/sh
- -c
args:
- python
- -m
Expand Down Expand Up @@ -180,8 +178,11 @@ spec:
gpu: "1"
extraPodSpec:
mainContainer:
image: nvcr.io/nvidian/nim-llm-dev/vllm-runtime:dep-253.5
workingDir: /workspace/examples/vllm
image: nvcr.io/nvidian/nim-llm-dev/vllm-runtime:dep-233.17
workingDir: /workspace/components/backends/vllm
command:
- /bin/sh
- -c
args:
- /bin/sh
- -c
Expand Down Expand Up @@ -221,9 +222,10 @@ spec:
gpu: "1"
extraPodSpec:
mainContainer:
image: nvcr.io/nvidian/nim-llm-dev/vllm-runtime:dep-253.5
workingDir: /workspace/examples/vllm
args:
image: nvcr.io/nvidian/nim-llm-dev/vllm-runtime:dep-233.17
workingDir: /workspace/components/backends/vllm
command:
- /bin/sh
- -c
- "python3 -m dynamo.vllm --model Qwen/Qwen3-0.6B --enforce-eager --is-prefill-worker 2>&1 | tee /tmp/vllm.log"
args:
- python3 -m dynamo.vllm --model Qwen/Qwen3-0.6B --enforce-eager --is-prefill-worker 2>&1 | tee /tmp/vllm.log
2 changes: 1 addition & 1 deletion components/planner/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ See the License for the specific language governing permissions and
limitations under the License.
-->

Please refer to [planner docs](../../docs/architecture/planner_intro.rst) for planner documentation.
Please refer to [planner docs](../../docs/architecture/planner_intro.rst) for planner documentation.
You are viewing a condensed version of this merge commit. You can view the full changes here.