mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2025-12-10 03:15:20 +08:00
[Bugfix][Failing Test] Fix test_vllm_port.py (#18618)
Signed-off-by: rabi <ramishra@redhat.com>
This commit is contained in:
parent
c3bb9f2331
commit
5f1d0c8118
@ -199,8 +199,9 @@ steps:
|
|||||||
- tests/test_sequence
|
- tests/test_sequence
|
||||||
- tests/test_config
|
- tests/test_config
|
||||||
- tests/test_logger
|
- tests/test_logger
|
||||||
|
- tests/test_vllm_port
|
||||||
commands:
|
commands:
|
||||||
- pytest -v -s engine test_sequence.py test_config.py test_logger.py
|
- pytest -v -s engine test_sequence.py test_config.py test_logger.py test_vllm_port.py
|
||||||
# OOM in the CI unless we run this separately
|
# OOM in the CI unless we run this separately
|
||||||
- pytest -v -s tokenization
|
- pytest -v -s tokenization
|
||||||
|
|
||||||
|
|||||||
18
vllm/envs.py
18
vllm/envs.py
@ -159,17 +159,13 @@ def get_vllm_port() -> Optional[int]:
|
|||||||
return int(port)
|
return int(port)
|
||||||
except ValueError as err:
|
except ValueError as err:
|
||||||
from urllib.parse import urlparse
|
from urllib.parse import urlparse
|
||||||
try:
|
parsed = urlparse(port)
|
||||||
parsed = urlparse(port)
|
if parsed.scheme:
|
||||||
if parsed.scheme:
|
raise ValueError(
|
||||||
raise ValueError(
|
f"VLLM_PORT '{port}' appears to be a URI. "
|
||||||
f"VLLM_PORT '{port}' appears to be a URI. "
|
"This may be caused by a Kubernetes service discovery issue,"
|
||||||
"This may be caused by a Kubernetes service discovery issue"
|
"check the warning in: https://docs.vllm.ai/en/stable/serving/env_vars.html"
|
||||||
"check the warning in: https://docs.vllm.ai/en/stable/usage/env_vars.html"
|
) from None
|
||||||
)
|
|
||||||
except Exception:
|
|
||||||
pass
|
|
||||||
|
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
f"VLLM_PORT '{port}' must be a valid integer") from err
|
f"VLLM_PORT '{port}' must be a valid integer") from err
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user