Unverified Commit ea7a9236 authored by Tzu-Ling Kan's avatar Tzu-Ling Kan Committed by GitHub
Browse files

fix: Remove duplicate import and update the test comment. (#2784)


Signed-off-by: default avatartzulingk@nvidia.com <tzulingk@nvidia.com>
parent 1f6b83be
...@@ -175,13 +175,10 @@ def test_metrics_labels(request, runtime_services): ...@@ -175,13 +175,10 @@ def test_metrics_labels(request, runtime_services):
Test that the trtllm backend correctly exports model labels in its metrics. Test that the trtllm backend correctly exports model labels in its metrics.
This test uses the --extra-engine-args flag with agg.yaml configuration This test uses the --extra-engine-args flag with agg.yaml configuration
to start the backend without needing a pre-built TensorRT-LLM engine. to start the backend.
Prerequisites: The test runs from the trtllm directory to access engine_configs/agg.yaml
- etcd and NATS must be running (docker compose -f deploy/docker-compose.yml up -d)
- The test runs from the trtllm directory to access engine_configs/agg.yaml
""" """
import os
import re import re
import subprocess import subprocess
import threading import threading
...@@ -198,9 +195,18 @@ def test_metrics_labels(request, runtime_services): ...@@ -198,9 +195,18 @@ def test_metrics_labels(request, runtime_services):
metrics_port = 8081 metrics_port = 8081
timeout = 60 timeout = 60
# Change to the trtllm directory where engine_configs/agg.yaml exists # Calculate the path to the trtllm directory from the test file location
test_dir = os.path.dirname(os.path.abspath(__file__))
# Go up two levels from tests/serve/
project_root = os.path.dirname(os.path.dirname(test_dir))
working_directory = os.path.join(project_root, "components", "backends", "trtllm")
working_directory = os.path.abspath("components/backends/trtllm") # Verify the engine config file exists
engine_config_path = os.path.join(working_directory, agg_engine_args)
if not os.path.exists(engine_config_path):
pytest.fail(f"Engine config file not found at: {engine_config_path}")
logger.info(f"Using engine config from: {engine_config_path}")
# Build command using the user's working command # Build command using the user's working command
command = [ command = [
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment