ray.serve.context.GangContext#

class ray.serve.context.GangContext(gang_id: str, rank: int, world_size: int, member_replica_ids: List[str])[source]#

Context information for a replica that is part of a gang.

DeveloperAPI: This API may change across minor Ray releases.

Methods

Attributes

gang_id

Unique identifier for this gang.

rank

This replica's rank within the gang (0-indexed).

world_size

Total number of replicas in this gang.

member_replica_ids

List of replica IDs in this gang, ordered by rank.