Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions slime/utils/http_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,8 @@ def init_http_client(args):
def _init_ray_distributed_post(args):
"""Initialize one or more Ray async actors per node for HTTP POST.

Uses NodeAffinitySchedulingStrategy to place actors on distinct nodes.
Controlled by SLIME_HTTP_POST_ACTORS_PER_NODE.
Uses NodeAffinitySchedulingStrategy to place actors on alive Ray nodes.
Creates ``args.num_gpus_per_node`` actors per node.
"""
global _post_actors
if _post_actors:
Expand Down Expand Up @@ -252,8 +252,8 @@ async def do_post(self, url, payload, max_retries=60, headers=None):

# Create actors per node
created = []
# Distribute client concurrency across actors (at least 1 per actor)
per_actor_conc = (_client_concurrency + len(nodes)) // len(nodes)
total_actors = max(1, len(nodes) * args.num_gpus_per_node)
per_actor_conc = max(1, (_client_concurrency + total_actors - 1) // total_actors)

for node in nodes:
node_id = node["NodeID"]
Expand Down
Loading