ray-embedding 0.10.12__py3-none-any.whl → 0.10.15__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of ray-embedding might be problematic. Click here for more details.

@@ -7,6 +7,7 @@ import torch
7
7
  from fastapi import FastAPI, HTTPException
8
8
  from ray import serve
9
9
  from sentence_transformers import SentenceTransformer
10
+ from pynvml import nvmlInit, nvmlDeviceGetCount
10
11
 
11
12
  from ray_embedding.dto import EmbeddingResponse, EmbeddingRequest
12
13
 
@@ -106,8 +107,12 @@ class EmbeddingModel:
106
107
  self.check_health()
107
108
 
108
109
  def check_health(self):
109
- if self.init_device == "cuda" and not torch.cuda.is_available():
110
+ if self.init_device == "cuda":
110
111
  # Even though CUDA was available at init time,
111
112
  # CUDA can become unavailable - this is a known problem in AWS EC2
112
113
  # https://github.com/ray-project/ray/issues/49594
113
- raise RuntimeError("CUDA device is not available")
114
+ try:
115
+ nvmlInit()
116
+ assert nvmlDeviceGetCount() >= 1
117
+ except:
118
+ raise RuntimeError("CUDA device is not available")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ray-embedding
3
- Version: 0.10.12
3
+ Version: 0.10.15
4
4
  Summary: Deploy SentenceTransformers embedding models to a ray cluster
5
5
  Author: Crispin Almodovar
6
6
  Author-email:
@@ -0,0 +1,8 @@
1
+ ray_embedding/__init__.py,sha256=OYJT0rVaaGzY613JqgfktsCgroDnBkGOHxR2FE9UtRU,49
2
+ ray_embedding/deploy.py,sha256=ZGxcG4589WcRtaM6H84YJarw0m1XqHNgfOf3PLAhM5M,1995
3
+ ray_embedding/dto.py,sha256=e91ejZbM_NB9WTjF1YnfuV71cajYIh0vOX8oV_g2OwM,595
4
+ ray_embedding/embedding_model.py,sha256=NBhpA5RJIWt1LTi_nbNQHm1gGf_g6Qkk_MjEN1C78jw,4965
5
+ ray_embedding-0.10.15.dist-info/METADATA,sha256=KwGD6vAbv8oHqOCMnQr1c9WsHxjhsMbgl_tOlcGrUDo,1095
6
+ ray_embedding-0.10.15.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
7
+ ray_embedding-0.10.15.dist-info/top_level.txt,sha256=ziCblpJq1YsrryshFqxTRuRMgNuO1_tgvAAkGShATNA,14
8
+ ray_embedding-0.10.15.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.3.1)
2
+ Generator: setuptools (80.4.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,8 +0,0 @@
1
- ray_embedding/__init__.py,sha256=OYJT0rVaaGzY613JqgfktsCgroDnBkGOHxR2FE9UtRU,49
2
- ray_embedding/deploy.py,sha256=ZGxcG4589WcRtaM6H84YJarw0m1XqHNgfOf3PLAhM5M,1995
3
- ray_embedding/dto.py,sha256=e91ejZbM_NB9WTjF1YnfuV71cajYIh0vOX8oV_g2OwM,595
4
- ray_embedding/embedding_model.py,sha256=JfNt0rJYXGlbNjg5xmY14k4jQmNZKHnTQZnTi5SbNSc,4829
5
- ray_embedding-0.10.12.dist-info/METADATA,sha256=7EjNTy3P2zGYP6JzjrigmpbAujjaroJA-e1slz_Ra1E,1095
6
- ray_embedding-0.10.12.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
7
- ray_embedding-0.10.12.dist-info/top_level.txt,sha256=ziCblpJq1YsrryshFqxTRuRMgNuO1_tgvAAkGShATNA,14
8
- ray_embedding-0.10.12.dist-info/RECORD,,