usage lib get version another way (#3735)

This commit is contained in:
Simon Mo 2024-03-29 15:57:08 -07:00 committed by GitHub
parent 9765b5c406
commit 8b2d3cbc1b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -11,7 +11,6 @@ from typing import Dict, Optional
from uuid import uuid4
import cpuinfo
import pkg_resources
import psutil
import requests
import torch
@ -161,8 +160,9 @@ class UsageMessage:
])
# vLLM information
import vllm # delayed import to prevent circular import
self.context = usage_context.value
self.vllm_version = pkg_resources.get_distribution("vllm").version
self.vllm_version = vllm.__version__
self.model_architecture = model_architecture
# Metadata