ray-embedding 0.11.0__tar.gz → 0.11.2__tar.gz

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.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ray-embedding
3
- Version: 0.11.0
3
+ Version: 0.11.2
4
4
  Summary: Deploy SentenceTransformers embedding models to a ray cluster
5
5
  Author: Crispin Almodovar
6
6
  Author-email:
@@ -10,7 +10,7 @@ from ray_embedding.embedding_service import EmbeddingService
10
10
 
11
11
 
12
12
  def build_model(model_config: ModelDeploymentConfig) -> DeploymentHandle:
13
- deployment_name = model_config.deployment_name
13
+ deployment_name = model_config.deployment
14
14
  model = model_config.model
15
15
  device = model_config.device
16
16
  backend = model_config.backend or "torch"
@@ -34,6 +34,9 @@ class EmbeddingService:
34
34
 
35
35
  # Resize the inputs into batch_size items, and dispatch in parallel
36
36
  batches = [inputs[i:i+batch_size] for i in range(0, len(inputs), batch_size)]
37
+ if len(inputs) > batch_size:
38
+ self.logger.info(f"Original input is greater than {batch_size}. "
39
+ f"It was resized to {len(batches)} mini-batches of size {batch_size}")
37
40
  tasks = [model_handle.remote(batch, dimensions) for batch in batches]
38
41
  all_results = await asyncio.gather(*tasks, return_exceptions=True)
39
42
 
@@ -55,6 +58,7 @@ class EmbeddingService:
55
58
  raise all_results[i]
56
59
 
57
60
  # Flatten the results because all_results is a list of lists
61
+ self.logger.info(f"Successfully computed embeddings from {len(batches)} mini-batches")
58
62
  return [emb for result in all_results for emb in result]
59
63
 
60
64
  @web_api.post("/v1/embeddings", response_model=EmbeddingResponse)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ray-embedding
3
- Version: 0.11.0
3
+ Version: 0.11.2
4
4
  Summary: Deploy SentenceTransformers embedding models to a ray cluster
5
5
  Author: Crispin Almodovar
6
6
  Author-email:
@@ -1,6 +1,6 @@
1
1
  [metadata]
2
2
  name = ray-embedding
3
- version = 0.11.0
3
+ version = 0.11.2
4
4
  author = Crispin Almodovar
5
5
  author_email =
6
6
  description = Deploy SentenceTransformers embedding models to a ray cluster
File without changes