Skip to content

Commit b4bcab8

Browse files
committed
Fix ReplicaContext serialization error in DPRankAssigner
Remove unused replica_ctx parameter from DPRankAssigner.register() to fix serialization error when passing ReplicaContext across actor boundaries. Root cause: The addition of _handle_registration_callback field to ReplicaContext in PR ray-project#58345 Fixes ray-project#58474 and ray-project#58475 Signed-off-by: Nikhil Ghosh <nikhil@anyscale.com>
1 parent 62231dd commit b4bcab8

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

python/ray/llm/_internal/serve/serving_patterns/data_parallel/dp_rank_assigner.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,12 @@ def __init__(self, dp_size: int, dp_size_per_node: Optional[int] = None):
5555
)
5656

5757
async def register(
58-
self, replica_ctx: "serve.context.ReplicaContext", node_id: Optional[str] = None
58+
self, node_id: Optional[str] = None
5959
):
6060
"""
6161
Register a replica and assign a rank to it.
6262
6363
Args:
64-
replica_ctx: The replica context.
6564
node_id: The node id of the replica.
6665
6766
Returns:

python/ray/llm/_internal/serve/serving_patterns/data_parallel/dp_server.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,8 @@ class DPServer(LLMServer):
2424
async def __init__(self, llm_config: LLMConfig, dp_rank_assigner: DeploymentHandle):
2525
self.dp_rank_assigner = dp_rank_assigner
2626

27-
replica_ctx = serve.get_replica_context()
2827
node_id = get_runtime_context().get_node_id()
29-
self.dp_rank = await self.dp_rank_assigner.register.remote(replica_ctx, node_id)
28+
self.dp_rank = await self.dp_rank_assigner.register.remote(node_id)
3029

3130
logger.info(f"DP rank {self.dp_rank} registered with rank assigner")
3231

0 commit comments

Comments
 (0)