A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 15, 22:15 UTC
[ci] Add logic to change model to S3 path only when S3 CI env var is on (#13727)
Signed-off-by: <> Co-authored-by: EC2 Default User <ec2-user@ip-172-31-63-253.us-west-2.compute.internal>
Kevin H. Luu committed
Feb 23, 2025 at 22:32 UTC
f90a37559315defd369441c4d2461989a10b9fc1
1 file changed
+7
-3
tests/metrics/test_metrics.py
+7
-3
@@ -7,6 +7,7 @@ import pytest
7
import ray
8
from prometheus_client import REGISTRY
9
10
+import vllm.envs as envs
11
from vllm import EngineArgs, LLMEngine
12
from vllm.distributed import cleanup_dist_env_and_memory
13
from vllm.engine.arg_utils import AsyncEngineArgs
@@ -141,8 +142,10 @@ def test_metric_set_tag_model_name(vllm_runner, model: str, dtype: str,
142
stat_logger = vllm_model.model.llm_engine.stat_loggers['prometheus']
143
metrics_tag_content = stat_logger.labels["model_name"]
144
145
+ if envs.VLLM_CI_USE_S3:
146
+ model = f"{MODEL_WEIGHTS_S3_BUCKET}/{model}"
147
if served_model_name is None or served_model_name == []:
145
- assert metrics_tag_content == f"{MODEL_WEIGHTS_S3_BUCKET}/{model}", (
148
+ assert metrics_tag_content == model, (
149
f"Metrics tag model_name is wrong! expect: {model!r}\n"
150
f"actual: {metrics_tag_content!r}")
151
else:
@@ -215,8 +218,9 @@ def test_engine_log_metrics_regression(
218
while engine.has_unfinished_requests():
219
engine.step()
220
218
- assert_metrics(f"{MODEL_WEIGHTS_S3_BUCKET}/{model}", engine,
219
- disable_log_stats, len(example_prompts))
221
+ if envs.VLLM_CI_USE_S3:
222
+ model = f"{MODEL_WEIGHTS_S3_BUCKET}/{model}"
223
+ assert_metrics(model, engine, disable_log_stats, len(example_prompts))
224
225
226
@pytest.mark.parametrize("model", MODELS)