[Misc] Add generated git commit hash as vllm.__commit__ (#6386)

This commit is contained in:
Michael Goin
2024-07-12 22:52:15 +00:00
committed by GitHub
parent 75f64d8b94
commit 111fc6e7ec
5 changed files with 47 additions and 1 deletions
+2 -1
View File
@@ -12,9 +12,10 @@ from vllm.outputs import (CompletionOutput, EmbeddingOutput,
from vllm.pooling_params import PoolingParams
from vllm.sampling_params import SamplingParams
from .version import __version__
from .version import __commit__, __version__
__all__ = [
"__commit__",
"__version__",
"LLM",
"ModelRegistry",
+11
View File
@@ -1 +1,12 @@
import warnings
try:
import vllm.commit_id
__commit__ = vllm.commit_id.__commit__
except Exception as e:
warnings.warn(f"Failed to read commit hash:\n{e}",
RuntimeWarning,
stacklevel=2)
__commit__ = "COMMIT_HASH_PLACEHOLDER"
__version__ = "0.5.1"