ray-embedding 0.13.2__tar.gz → 0.13.4__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ray-embedding
3
- Version: 0.13.2
3
+ Version: 0.13.4
4
4
  Summary: Deploy SentenceTransformers embedding models to a ray cluster
5
5
  Author: Crispin Almodovar
6
6
  Author-email:
@@ -8,7 +8,7 @@ from ray._private.services import get_node_ip_address
8
8
  from ray.util.state import list_actors
9
9
 
10
10
 
11
- @serve.deployment(autoscaling_config=dict(min_replicas=1, max_replicas=1),
11
+ @serve.deployment(autoscaling_config=dict(min_replicas=0, max_replicas=1),
12
12
  ray_actor_options=dict(num_cpus=0.1))
13
13
  class NodeHealthTracker:
14
14
  """Maintains a list of bad nodes, as reported by replicas that call the report_bad_node func.
@@ -41,12 +41,15 @@ class NodeHealthTracker:
41
41
  async def is_bad_gpu_node(self, node_ip: str) -> bool:
42
42
  self.logger.info(f"Checking if node {node_ip} is marked bad.")
43
43
  with self.lock:
44
- return node_ip in self.bad_gpu_node_ips
44
+ is_bad_gpu_node = node_ip in self.bad_gpu_node_ips
45
+ self.logger.info(f"Node {node_ip} is marked bad: {is_bad_gpu_node}")
46
+ return is_bad_gpu_node
45
47
 
46
48
  async def is_bad_gpu_or_no_model_replica_on_node(self, node_ip: str):
47
49
  self.logger.info(f"Checking if node {node_ip} is marked bad or no model replica running on the node.")
48
- return (await self.is_bad_gpu_node(node_ip) or
49
- not await self.is_model_replica_running_on_node(node_ip))
50
+ is_bad_gpu_node = await self.is_bad_gpu_node(node_ip)
51
+ is_no_model_replica_running_on_node = not await self.is_model_replica_running_on_node(node_ip)
52
+ return is_bad_gpu_node or is_no_model_replica_running_on_node
50
53
 
51
54
  async def check_health(self):
52
55
  """Called periodically by Ray Serve. Used here to clean up stale node IDs."""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ray-embedding
3
- Version: 0.13.2
3
+ Version: 0.13.4
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.13.2
3
+ version = 0.13.4
4
4
  author = Crispin Almodovar
5
5
  author_email =
6
6
  description = Deploy SentenceTransformers embedding models to a ray cluster
File without changes