@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 5f1d0c8118
Fork 0

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, 07:15 UTC

[Bugfix][Failing Test] Fix test_vllm_port.py (#18618)

Signed-off-by: rabi <ramishra@redhat.com>

Rabi Mishra committed May 30, 2025 at 14:43 UTC 5f1d0c8118b099ca0a08435f5f0312aa50f21142
2 files changed +9 -12
.buildkite/test-pipeline.yaml
+2 -1
@@ -199,8 +199,9 @@ steps:
199 - tests/test_sequence
200 - tests/test_config
201 - tests/test_logger
202 + - tests/test_vllm_port
203 commands:
203 - - pytest -v -s engine test_sequence.py test_config.py test_logger.py
204 + - pytest -v -s engine test_sequence.py test_config.py test_logger.py test_vllm_port.py
205 # OOM in the CI unless we run this separately
206 - pytest -v -s tokenization
207
vllm/envs.py
+7 -11
@@ -159,17 +159,13 @@ def get_vllm_port() -> Optional[int]:
159 return int(port)
160 except ValueError as err:
161 from urllib.parse import urlparse
162 - try:
163 - parsed = urlparse(port)
164 - if parsed.scheme:
165 - raise ValueError(
166 - f"VLLM_PORT '{port}' appears to be a URI. "
167 - "This may be caused by a Kubernetes service discovery issue"
168 - "check the warning in: https://docs.vllm.ai/en/stable/usage/env_vars.html"
169 - )
170 - except Exception:
171 - pass
172 -
162 + parsed = urlparse(port)
163 + if parsed.scheme:
164 + raise ValueError(
165 + f"VLLM_PORT '{port}' appears to be a URI. "
166 + "This may be caused by a Kubernetes service discovery issue,"
167 + "check the warning in: https://docs.vllm.ai/en/stable/serving/env_vars.html"
168 + ) from None
169 raise ValueError(
170 f"VLLM_PORT '{port}' must be a valid integer") from err
171