diff --git a/src/configs/sys_config.py b/src/configs/sys_config.py index bfc4147..c47a351 100644 --- a/src/configs/sys_config.py +++ b/src/configs/sys_config.py @@ -1,5 +1,4 @@ # System Configuration - system_config = { "num_users": 4, "experiment_path": "./experiments/", @@ -7,17 +6,9 @@ "dump_dir": "./expt_dump/", "dpath": "/data/unagi0/anakewat/imgs/", "seed": 2, - "device_ids": { - "iid_dispfl": {"node_0": [2], "node_1": [3], "node_2": [4], "node_3": [5], "node_4": [2]}, - "iid_defkt": {"node_0": [4], "node_1": [4], "node_2": [4], "node_3": [4]}, - "non_iid": {"node_0": [0], "node_1": [1], "node_2": [2], "node_3": [3]} - }, + "device_ids": {} "dataset_splits": { "iid": {"samples_per_user": 500}, "non_iid": {"samples_per_user": 32} } } - - -def get_device_ids(algo): - return system_config["device_ids"].get(algo, {}) diff --git a/src/scheduler.py b/src/scheduler.py index b27f80a..10b82bd 100644 --- a/src/scheduler.py +++ b/src/scheduler.py @@ -22,8 +22,7 @@ from algos.fl_data_repr import FedDataRepClient, FedDataRepServer from algos.fl_val import FedValClient, FedValServer from utils.log_utils import copy_source_code, check_and_create_path -from utils.config_utils import load_config, process_config -from configs.sys_config import get_device_ids +from utils.config_utils import load_config, process_config, get_device_ids import os # should be used as: algo_map[algo_name][rank>0](config) @@ -78,7 +77,7 @@ def merge_configs(self): "dpath": self.sys_config["dataset_path"] + "cifar10", "num_users": self.sys_config["num_users"], "samples_per_user": self.sys_config["dataset_splits"]["iid"]["samples_per_user"], - "device_ids": get_device_ids("iid_dispfl") + "device_ids": get_device_ids(num_clients=fedcentral_client, num_client_per_gpu=6, available_gpus=[0, 1,2, 3, 4, 5, 6, 7]) }) def initialize(self, copy_souce_code=True) -> None: