diff --git a/edml/config/battery/resnet110_cifar100_cost.yaml b/edml/config/battery/resnet110_cifar100_cost.yaml new file mode 100644 index 0000000000000000000000000000000000000000..4e7f11bd130182c5a7e5c39364d299c9b23fb31e --- /dev/null +++ b/edml/config/battery/resnet110_cifar100_cost.yaml @@ -0,0 +1,4 @@ +deduction_per_second: 0.02 +deduction_per_mflop: 0.00000005 +deduction_per_mbyte_received: 0.0002 +deduction_per_mbyte_sent: 0.0002 diff --git a/edml/config/topology/equal_batteries_10_devices.yaml b/edml/config/topology/equal_batteries_10_devices.yaml new file mode 100644 index 0000000000000000000000000000000000000000..ea81cd38a17f91a049a4bb82440a87239e00cbbf --- /dev/null +++ b/edml/config/topology/equal_batteries_10_devices.yaml @@ -0,0 +1,62 @@ +devices: [ + { + device_id: "d0", + address: "localhost:50051", + battery_capacity: 1000000, + torch_device: cuda:0 + }, + { + device_id: "d1", + address: "localhost:50052", + battery_capacity: 1000000, + torch_device: cuda:1 + }, + { + device_id: "d2", + address: "localhost:50053", + battery_capacity: 1000000, + torch_device: cuda:2 + }, + { + device_id: "d3", + address: "localhost:50054", + battery_capacity: 1000000, + torch_device: cuda:0 + }, + { + device_id: "d4", + address: "localhost:50055", + battery_capacity: 1000000, + torch_device: cuda:1 + }, + { + device_id: "d5", + address: "localhost:50056", + battery_capacity: 1000000, + torch_device: cuda:2 + }, + { + device_id: "d6", + address: "localhost:50057", + battery_capacity: 1000000, + torch_device: cuda:0 + }, + { + device_id: "d7", + address: "localhost:50058", + battery_capacity: 1000000, + torch_device: cuda:1 + }, + { + device_id: "d8", + address: "localhost:50059", + battery_capacity: 1000000, + torch_device: cuda:2 + }, + { + device_id: "d9", + address: "localhost:50060", + battery_capacity: 1000000, + torch_device: cuda:0 + } +] diff --git a/edml/config/topology/resnet110_cifar100_batteries.yaml b/edml/config/topology/resnet110_cifar100_batteries.yaml new file mode 100644 index 0000000000000000000000000000000000000000..b05e705bb3bda4d62bcf40b682eeef77573a1d26 --- /dev/null +++ b/edml/config/topology/resnet110_cifar100_batteries.yaml @@ -0,0 +1,28 @@ +devices: [ + { + device_id: "d0", + address: "localhost:50051", + battery_capacity: 400, + + }, + { + device_id: "d1", + address: "localhost:50052", + battery_capacity: 400 + }, + { + device_id: "d2", + address: "localhost:50053", + battery_capacity: 300 + }, + { + device_id: "d3", + address: "localhost:50054", + battery_capacity: 200 + }, + { + device_id: "d4", + address: "localhost:50055", + battery_capacity: 200 + } +] diff --git a/edml/core/server.py b/edml/core/server.py index 7503389f0c080b2eddb33bf9b932bbbdcf76d758..4b9ef80fd876d618075a98a14d61e03d83369b66 100644 --- a/edml/core/server.py +++ b/edml/core/server.py @@ -298,7 +298,9 @@ class DeviceServer: print( f"\n{Fore.RED}ADAPTIVE TRESHOLD REACHED, NEXT BATCH\n{Fore.RESET}" ) - self.node_device.log({"adaptive_learning_threshold_applied": True}) + self.node_device.log( + {"adaptive_learning_threshold_applied": server_gradients.size(0)} + ) continue num_client_gradients = len(client_forward_pass_responses)