improve gpu detection functions and logging in model server

This commit is contained in:
Richard Kuo (Danswer)
2025-02-07 16:59:02 -08:00
parent ae37f01f62
commit bc2c56dfb6
5 changed files with 54 additions and 17 deletions

View File

@@ -28,3 +28,9 @@ class EmbeddingModelTextType:
@staticmethod
def get_type(provider: EmbeddingProvider, text_type: EmbedTextType) -> str:
return EmbeddingModelTextType.PROVIDER_TEXT_TYPE_MAP[provider][text_type]
class GPUStatus:
CUDA = "cuda"
MAC_MPS = "mps"
NONE = "none"