Skip to content

Commit 3868e6b

Browse files
authored
Merge branch 'main' into ishan/unify-trace
Signed-off-by: ishandhanani <[email protected]>
2 parents fb44cd0 + bd4366d commit 3868e6b

File tree

31 files changed

+2378
-660
lines changed

31 files changed

+2378
-660
lines changed

.github/actions/docker-build/action.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,26 @@ runs:
151151
# Exit with the build's exit code
152152
exit ${BUILD_EXIT_CODE}
153153
154+
- name: Run Sanity Check on Runtime Image
155+
if: inputs.target == 'runtime'
156+
shell: bash
157+
run: |
158+
IMAGE_TAG="${{ steps.build.outputs.image_tag }}"
159+
echo "Running sanity check on image: $IMAGE_TAG"
160+
161+
# Run the sanity check script inside the container
162+
# The script is located in /workspace/deploy/sanity_check.py in runtime containers
163+
set +e
164+
docker run --rm "$IMAGE_TAG" python /workspace/deploy/sanity_check.py --runtime-check --no-gpu-check
165+
SANITY_CHECK_EXIT_CODE=$?
166+
set -e
167+
if [ ${SANITY_CHECK_EXIT_CODE} -ne 0 ]; then
168+
echo "ERROR: Sanity check failed - ai-dynamo packages not properly installed"
169+
exit ${SANITY_CHECK_EXIT_CODE}
170+
else
171+
echo "✅ Sanity check passed"
172+
fi
173+
154174
- name: Capture Build Metrics
155175
id: metrics
156176
shell: bash

components/src/dynamo/planner/utils/planner_core.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
PrefillInterpolator,
2525
)
2626
from dynamo.planner.utils.pre_swept_results_utils import PreSweptResultsHelper
27-
from dynamo.planner.utils.prometheus import PrometheusAPIClient
27+
from dynamo.planner.utils.prometheus import MetricSource, PrometheusAPIClient
2828
from dynamo.planner.utils.trace_data_extractor import extract_metrics_from_mooncake
2929
from dynamo.runtime import DistributedRuntime
3030
from dynamo.runtime.logging import configure_dynamo_logging
@@ -150,9 +150,20 @@ def __init__(
150150
else:
151151
raise ValueError(f"Invalid environment: {args.environment}")
152152

153+
# Use backend metrics for vLLM (queries vllm:* metrics directly from workers)
154+
# Use frontend metrics for other backends (queries dynamo_frontend_* metrics)
155+
metric_source = (
156+
MetricSource.VLLM
157+
if args.backend.lower() == "vllm"
158+
else MetricSource.FRONTEND
159+
)
160+
logger.info(
161+
f"Initializing Prometheus client with metric_source='{metric_source}' for backend '{args.backend}'"
162+
)
153163
self.prometheus_api_client = PrometheusAPIClient(
154164
args.metric_pulling_prometheus_endpoint,
155165
args.namespace,
166+
metric_source=metric_source,
156167
)
157168

158169
self.num_req_predictor = LOAD_PREDICTORS[args.load_predictor](

0 commit comments

Comments
 (0)