mirror of
https://github.com/handsomezhuzhu/vllm-npu-plugin.git
synced 2026-02-20 19:50:15 +00:00
fix: Improve vllm version parsing and assume compatibility for dev versions
This commit is contained in:
@@ -313,11 +313,15 @@ def vllm_version_is(target_vllm_version: str):
|
|||||||
try:
|
try:
|
||||||
return Version(vllm_version) == Version(target_vllm_version)
|
return Version(vllm_version) == Version(target_vllm_version)
|
||||||
except InvalidVersion:
|
except InvalidVersion:
|
||||||
raise ValueError(
|
# Dev versions like "0.1.dev9973+g..." are not PEP 440 compliant.
|
||||||
f"Invalid vllm version {vllm_version} found. A dev version of vllm "
|
# For the plugin, default to True for "0.11.0" since the user's
|
||||||
"is installed probably. Set the environment variable VLLM_VERSION "
|
# branch is based on vllm 0.11.0.
|
||||||
"to control it by hand. And please make sure the value follows the "
|
import logging
|
||||||
"format of x.y.z.")
|
logging.getLogger(__name__).warning(
|
||||||
|
f"Cannot parse vllm version '{vllm_version}'. "
|
||||||
|
f"Assuming compatibility with {target_vllm_version}. "
|
||||||
|
"Set VLLM_VERSION env var to override (format: x.y.z).")
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
def get_max_hidden_layers(hf_config) -> int:
|
def get_max_hidden_layers(hf_config) -> int:
|
||||||
|
|||||||
Reference in New Issue
Block a user