Skip to content

Commit

Permalink
modify cfgs of data
Browse files Browse the repository at this point in the history
  • Loading branch information
private-mechanism committed Mar 27, 2023
1 parent 6e79d8a commit 2d02565
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/test_robust_aggregators.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def set_config_multikrum(self, cfg):
cfg.merge_from_file(
'federatedscope/cv/baseline/fedavg_convnet2_on_femnist.yaml')

cfg.data.root = 'test_data/'
cfg.federate.client_num = 50
cfg.federate.total_round_num = 10
cfg.aggregator.byzantine_node_num = 10
Expand All @@ -38,6 +39,7 @@ def set_config_median(self, cfg):
import torch
cfg.merge_from_file(
'federatedscope/cv/baseline/fedavg_convnet2_on_femnist.yaml')
cfg.data.root = 'test_data/'
cfg.federate.client_num = 50
cfg.federate.total_round_num = 10

Expand All @@ -57,6 +59,7 @@ def set_config_trimmedmean(self, cfg):
import torch
cfg.merge_from_file(
'federatedscope/cv/baseline/fedavg_convnet2_on_femnist.yaml')
cfg.data.root = 'test_data/'
cfg.federate.client_num = 50
cfg.federate.total_round_num = 10

Expand All @@ -78,6 +81,7 @@ def set_config_bulyan(self, cfg):
cfg.merge_from_file(
'federatedscope/cv/baseline/fedavg_convnet2_on_femnist.yaml')

cfg.data.root = 'test_data/'
cfg.federate.client_num = 50
cfg.federate.total_round_num = 10

Expand All @@ -97,9 +101,9 @@ def set_config_normbounding(self, cfg):
cfg.merge_from_file(
'federatedscope/cv/baseline/fedavg_convnet2_on_femnist.yaml')

cfg.data.root = 'test_data/'
cfg.federate.client_num = 50
cfg.federate.total_round_num = 10

cfg.aggregator.robust_rule = 'normbounding'
cfg.aggregator.BFT_args.normbounding_norm_bound = 5
cfg.aggregator.byzantine_node_num = 10
Expand Down

0 comments on commit 2d02565

Please sign in to comment.