Skip to content

Commit

Permalink
update the result_to_csv function
Browse files Browse the repository at this point in the history
  • Loading branch information
zza234s committed Jul 18, 2023
1 parent 8f94e06 commit 0563988
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion federatedscope/contrib/common_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,13 @@ def result_to_csv(result, init_cfg, best_round):
'client_num': [init_cfg.federate.client_num],
'local_updates': [init_cfg.train.local_update_steps],
'test_acc': [result['client_summarized_avg']['test_acc']],
'best_round': [best_round]
'best_round': [best_round],
'fml_alpha': [init_cfg.fml.alpha],
'fml_beta': [init_cfg.fml.beta],
'fedmd_public_subset_size': [init_cfg.fedmd.public_subset_size],
'fedmd_digest_epochs': [init_cfg.fedmd.digest_epochs],
'fedhenn_eta': [init_cfg.fedhenn.eta],

}

if len(init_cfg.data.splitter_args) != 0 and 'alpha' in init_cfg.data.splitter_args[0]:
Expand All @@ -434,6 +440,8 @@ def result_to_csv(result, init_cfg, best_round):
if out_dict['method'][0] == 'fedproto':
out_dict['proto_weight'] = init_cfg.fedproto.proto_weight



out_dict['local_eval_whole_test_dataset'] = [init_cfg.data.local_eval_whole_test_dataset]

df = pd.DataFrame(out_dict, columns=out_dict.keys())
Expand Down

0 comments on commit 0563988

Please sign in to comment.