From e95f0afe4cf330937b66150d9f3603e4d6839c0c Mon Sep 17 00:00:00 2001 From: Philipp Moritz Date: Fri, 14 Aug 2020 18:50:27 -0700 Subject: [PATCH] [autoscaler] Expand key path for hashing with expanduser (#10125) --- python/ray/autoscaler/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/ray/autoscaler/util.py b/python/ray/autoscaler/util.py index 2ae9af2de..f014c93b7 100644 --- a/python/ray/autoscaler/util.py +++ b/python/ray/autoscaler/util.py @@ -110,7 +110,7 @@ def hash_launch_conf(node_conf, auth): full_auth = auth.copy() for key_type in ["ssh_private_key", "ssh_public_key"]: if key_type in auth: - with open(auth[key_type]) as key: + with open(os.path.expanduser(auth[key_type])) as key: full_auth[key_type] = key.read() hasher.update( json.dumps([node_conf, full_auth], sort_keys=True).encode("utf-8"))