python/ray/autoscaler/_private/kuberay/node_provider.py
def non_terminated_nodes(self, tag_filters: Dict[str, str]) -> List[str]:
        """Return a list of node ids filtered by the specified tags dict."""
        label_filters = to_label_selector(
            {
                "ray.io/cluster": self.cluster_name,
            }
        )
        data = self._get("pods?labelSelector=" + requests.utils.quote(label_filters))
        result = []
        for pod in data["items"]:
            labels = pod["metadata"]["labels"]
            tags = make_node_tags(labels, status_tag(pod))
            if tag_filters.items() <= tags.items():
                result.append(pod["metadata"]["name"])
        return result
Return a list of node ids filtered by the specified tags dict.
Return a list of node ids filtered by the specified tags dict.
Return a list of node ids filtered by the specified tags dict .
def non_terminated_nodes(self, tag_filters: Dict[str, str]) -> List[str]:
        label_filters = to_label_selector(
            {
                "ray.io/cluster": self.cluster_name,
            }
        )
        data = self._get("pods?labelSelector=" + requests.utils.quote(label_filters))
        result = []
        for pod in data["items"]:
            labels = pod["metadata"]["labels"]
            tags = make_node_tags(labels, status_tag(pod))
            if tag_filters.items() <= tags.items():
                result.append(pod["metadata"]["name"])
        return result
def non_terminated_nodes ( self , tag_filters : Dict [ str , str ] ) -> List [ str ] : label_filters = to_label_selector ( { "ray.io/cluster" : self . cluster_name , } ) data = self . _get ( "pods?labelSelector=" + requests . utils . quote ( label_filters ) ) result = [ ] for pod in data [ "items" ] : labels = pod [ "metadata" ] [ "labels" ] tags = make_node_tags ( labels , status_tag ( pod ) ) if tag_filters . items ( ) <= tags . items ( ) : result . append ( pod [ "metadata" ] [ "name" ] ) return result
Return a list of node ids filtered by the specified tags dict.
Return a list of node ids filtered by the specified tags dict .
"""Return a list of node ids filtered by the specified tags dict."""
self
tag_filters
Dict[str, str]