From 3ff7cfceeacca3495c863b374dabd815d21eeedc Mon Sep 17 00:00:00 2001 From: bene-ges Date: Thu, 16 May 2024 19:31:12 +0300 Subject: [PATCH] fix bug in set_device_map for trpc device_list is a dictionary and we need to map to its values, not keys --- python/fedml/core/distributed/communication/trpc/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/fedml/core/distributed/communication/trpc/utils.py b/python/fedml/core/distributed/communication/trpc/utils.py index 636750edf2..4960389e32 100644 --- a/python/fedml/core/distributed/communication/trpc/utils.py +++ b/python/fedml/core/distributed/communication/trpc/utils.py @@ -7,6 +7,6 @@ def set_device_map(options, worker_idx, device_list): local_device = device_list[worker_idx] for index, remote_device in enumerate(device_list): - logging.warn(f"Setting device map for client {index} as {remote_device}") + logging.warn(f"Setting device map for client {index} as {device_list[remote_device]}") if index != worker_idx: - options.set_device_map(WORKER_NAME.format(index), {local_device: remote_device}) \ No newline at end of file + options.set_device_map(WORKER_NAME.format(index), {local_device: device_list[remote_device]})