From 203c00596846aea67db15e4568da2ccf7b054c73 Mon Sep 17 00:00:00 2001 From: Antoni Baum Date: Mon, 20 Mar 2023 17:46:11 +0000 Subject: [PATCH] Fix lint Signed-off-by: Antoni Baum --- xgboost_ray/data_sources/_distributed.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/xgboost_ray/data_sources/_distributed.py b/xgboost_ray/data_sources/_distributed.py index 66c21b42..11086880 100644 --- a/xgboost_ray/data_sources/_distributed.py +++ b/xgboost_ray/data_sources/_distributed.py @@ -11,14 +11,12 @@ def get_actor_rank_ips(actors: Sequence[ActorHandle]) -> Dict[int, str]: """Get a dict mapping from actor ranks to their IPs""" no_obj = ray.put(None) # Build a dict mapping actor ranks to their IP addresses - actor_rank_ips: Dict[int, str] = { - rank: ip - for rank, ip in enumerate( + actor_rank_ips: Dict[int, str] = dict( + enumerate( ray.get([ actor.ip.remote() if actor is not None else no_obj for actor in actors - ])) - } + ]))) return actor_rank_ips