[Misc] Add generated git commit hash as vllm.__commit__ (#6386)
This commit is contained in:
+2
-1
@@ -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",
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user