python/ray/serve/deployment_state.py
def _map_actor_names_to_deployment(
        self, all_current_actor_names: List[str]
    ) -> Dict[str, List[str]]:
        """
        Given a list of all actor names queried from current ray cluster,
        map them to corresponding deployments.

        Example:
            Args:
                [A#zxc123, B#xcv234, A#qwe234]
            Returns:
                {
                    A: [A#zxc123, A#qwe234]
                    B: [B#xcv234]
                }
        """
        all_replica_names = [
            actor_name
            for actor_name in all_current_actor_names
            if ReplicaName.is_replica_name(actor_name)
        ]
        deployment_to_current_replicas = defaultdict(list)
        if len(all_replica_names) > 0:
            # Each replica tag is formatted as "deployment_name#random_letter"
            for replica_name in all_replica_names:
                replica_tag = ReplicaName.from_str(replica_name)
                deployment_to_current_replicas[replica_tag.deployment_tag].append(
                    replica_name
                )

        return deployment_to_current_replicas

        Given a list of all actor names queried from current ray cluster,
        map them to corresponding deployments.

        Example:
            Args:
                [A#zxc123, B#xcv234, A#qwe234]
            Returns:
                {
                    A: [A#zxc123, A#qwe234]
                    B: [B#xcv234]
                }
        
Given a list of all actor names queried from current ray cluster,
map them to corresponding deployments.
Given a list of all actor names queried from current ray cluster map them to corresponding deployments .
def _map_actor_names_to_deployment(
        self, all_current_actor_names: List[str]
    ) -> Dict[str, List[str]]:
        all_replica_names = [
            actor_name
            for actor_name in all_current_actor_names
            if ReplicaName.is_replica_name(actor_name)
        ]
        deployment_to_current_replicas = defaultdict(list)
        if len(all_replica_names) > 0:
            for replica_name in all_replica_names:
                replica_tag = ReplicaName.from_str(replica_name)
                deployment_to_current_replicas[replica_tag.deployment_tag].append(
                    replica_name
                )
        return deployment_to_current_replicas
def _map_actor_names_to_deployment ( self , all_current_actor_names : List [ str ] ) -> Dict [ str , List [ str ] ] : all_replica_names = [ actor_name for actor_name in all_current_actor_names if ReplicaName . is_replica_name ( actor_name ) ] deployment_to_current_replicas = defaultdict ( list ) if len ( all_replica_names ) > 0 : for replica_name in all_replica_names : replica_tag = ReplicaName . from_str ( replica_name ) deployment_to_current_replicas [ replica_tag . deployment_tag ] . append ( replica_name ) return deployment_to_current_replicas
Given a list of all actor names queried from current ray cluster,
map them to corresponding deployments.
Given a list of all actor names queried from current ray cluster map them to corresponding deployments .
"""
        Given a list of all actor names queried from current ray cluster,
        map them to corresponding deployments.

        Example:
            Args:
                [A#zxc123, B#xcv234, A#qwe234]
            Returns:
                {
                    A: [A#zxc123, A#qwe234]
                    B: [B#xcv234]
                }
        """ # Each replica tag is formatted as "deployment_name#random_letter"
self
all_current_actor_names
List[str]
examples
None