[Ray Collective] Fix the incorrect Redis password issue. (#24111)

This PR fixes the issue that we are not able to use GLOO as collective lib for the Ray cluster which is set Redis password.
This commit is contained in:
Qing Wang 2022-04-24 16:23:41 +08:00 committed by GitHub
parent f1a1f97992
commit a7a6465936
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -68,7 +68,9 @@ class Rendezvous:
redisStore = pygloo.rendezvous.RedisStore(
self._redis_ip_address, int(self._redis_port)
)
redis_password = ray_constants.REDIS_DEFAULT_PASSWORD
redis_password = ray.worker._global_node.redis_password
if redis_password is None or len(redis_password) == 0:
redis_password = ray_constants.REDIS_DEFAULT_PASSWORD
redisStore.authorize(redis_password)
self._store = redisStore
elif store_type == "file":