ray-embedding 0.9.6__py3-none-any.whl → 0.9.8__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.

@@ -76,6 +76,8 @@ class EmbeddingModel:
76
76
 
77
77
  @serve.batch(max_batch_size=8, batch_wait_timeout_s=0.25)
78
78
  async def __create_embeddings_batch(self, requests_batch: List[EmbeddingRequest]) -> List[EmbeddingResponse]:
79
+ self_0 = self[0] if isinstance(self, list) else self
80
+
79
81
  # Batch the text inputs
80
82
  inputs = []
81
83
  truncate_dims = []
@@ -83,12 +85,12 @@ class EmbeddingModel:
83
85
  if isinstance(request.input, str):
84
86
  request.input = [request.input]
85
87
  inputs.extend(request.input)
86
- truncate_dims.append(request.dimensions or self.matryoshka_dim)
88
+ truncate_dims.append(request.dimensions or self_0.matryoshka_dim)
87
89
 
88
90
  # Compute embeddings for the batch of text inputs
89
- embeddings = self.embedding_model.encode(
91
+ embeddings = self_0.embedding_model.encode(
90
92
  inputs, convert_to_tensor=True, normalize_embeddings=True, show_progress_bar=False,
91
- ).to(self.torch_device)
93
+ ).to(self_0.torch_device)
92
94
 
93
95
  # Truncate the embeddings; note that the truncate_dim can be different for each request
94
96
  # so we need to this step one by one
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ray-embedding
3
- Version: 0.9.6
3
+ Version: 0.9.8
4
4
  Summary: Deploy SentenceTransformers embedding models to a ray cluster
5
5
  Author: Crispin Almodovar
6
6
  Author-email: crispin.almodovar@docorto.ai
@@ -0,0 +1,8 @@
1
+ ray_embedding/__init__.py,sha256=OYJT0rVaaGzY613JqgfktsCgroDnBkGOHxR2FE9UtRU,49
2
+ ray_embedding/deploy.py,sha256=YD_udSm13QbFPgSAkCrTQso15DmtIn0QEhErOFNg7jM,1841
3
+ ray_embedding/dto.py,sha256=e91ejZbM_NB9WTjF1YnfuV71cajYIh0vOX8oV_g2OwM,595
4
+ ray_embedding/embedding_model.py,sha256=aeNgO01Qu8tnhi8ScrdBJDmIoJnNwutRqKUVjqvZM08,5211
5
+ ray_embedding-0.9.8.dist-info/METADATA,sha256=XjQh_exJnrlmNryxnOFgVmzlU9XugcNK_0PnUquD8h0,712
6
+ ray_embedding-0.9.8.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
7
+ ray_embedding-0.9.8.dist-info/top_level.txt,sha256=ziCblpJq1YsrryshFqxTRuRMgNuO1_tgvAAkGShATNA,14
8
+ ray_embedding-0.9.8.dist-info/RECORD,,
@@ -1,8 +0,0 @@
1
- ray_embedding/__init__.py,sha256=OYJT0rVaaGzY613JqgfktsCgroDnBkGOHxR2FE9UtRU,49
2
- ray_embedding/deploy.py,sha256=YD_udSm13QbFPgSAkCrTQso15DmtIn0QEhErOFNg7jM,1841
3
- ray_embedding/dto.py,sha256=e91ejZbM_NB9WTjF1YnfuV71cajYIh0vOX8oV_g2OwM,595
4
- ray_embedding/embedding_model.py,sha256=zs_tnHb6QACQ-pmpMiK6c2AHFeU40rzDl0V2OQgs59Y,5141
5
- ray_embedding-0.9.6.dist-info/METADATA,sha256=DllF-xgzzdEG56q2rsVMcIbP996J-Bf_guCq9YH2sC4,712
6
- ray_embedding-0.9.6.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
7
- ray_embedding-0.9.6.dist-info/top_level.txt,sha256=ziCblpJq1YsrryshFqxTRuRMgNuO1_tgvAAkGShATNA,14
8
- ray_embedding-0.9.6.dist-info/RECORD,,