当前遇到的挑战:
训练后的模型将根据每个客户的测试数据进行独立的自动评估。(系统正在开发中。。。)
Graph-DC数据的三种聚合方式:1)Equal-weight; 2)Data-size related weighted aggregation; 3)Customized-weight aggregation
不同任务的数据集:使用改进率可以确保聚合的值具有相同的含义,聚合值表示该基线上的平均改进。将默认的比较基线设置为“isolated”,其中客户端只使用自己的数据来生成模型。在这种情况下,聚合的改进比表示联邦学习获得的增益。
四种比较方法:
-第一类 “isolated”,这意味着每个客户端只使用自己的数据生成一个模型
(测试结果)
(cfs) PS E:\1zyq\FederatedScope> python federatedscope/main.py --cfg federatedscope/gfl/baseline/isolated_gin_minibatch_on_cikmcup.yaml --client_cfg federatedscope/gfl/baseline/isolated_gin_minibatch_on_cikmcup_per_client.yaml
2022-07-28 16:03:10,511 (cfg_fl_setting:104)WARNING: In local/global training mode, the sampling related configs are in-valid, we will use all clients.
2022-07-28 16:03:10,512 (cfg_fl_setting:104)WARNING: In local/global training mode, the sampling related configs are in-valid, we will use all clients.
2022-07-28 16:03:10,532 (utils:129)INFO: the current machine is at 10.1.28.112
2022-07-28 16:03:10,533 (utils:131)INFO: the current dir is E:\1zyq\FederatedScope
2022-07-28 16:03:10,533 (utils:132)INFO: the output dir is exp\local_gin_on_cikmcup_lr0.1_lstep21_\sub_exp_20220728160310
2022-07-28 16:03:11,632 (cikm_cup:57)INFO: Loading CIKMCUP data from E:\1zyq\FederatedScope\data\CIKM22Competition.
Processing...
Done!
2022-07-28 16:03:11,635 (cfg_fl_setting:104)WARNING: In local/global training mode, the sampling related configs are in-valid, we will use all clients.
2022-07-28 16:03:11,635 (cikm_cup:67)INFO: Loading CIKMCUP data for Client #1.
2022-07-28 16:03:12,333 (cikm_cup:67)INFO: Loading CIKMCUP data for Client #2.
2022-07-28 16:03:12,367 (cikm_cup:67)INFO: Loading CIKMCUP data for Client #3.
2022-07-28 16:03:13,319 (cikm_cup:67)INFO: Loading CIKMCUP data for Client #4.
2022-07-28 16:03:13,339 (cikm_cup:67)INFO: Loading CIKMCUP data for Client #5.
2022-07-28 16:03:13,377 (cikm_cup:67)INFO: Loading CIKMCUP data for Client #6.
2022-07-28 16:03:14,175 (cikm_cup:67)INFO: Loading CIKMCUP data for Client #7.
2022-07-28 16:03:15,036 (cikm_cup:67)INFO: Loading CIKMCUP data for Client #8.
2022-07-28 16:03:15,490 (cikm_cup:67)INFO: Loading CIKMCUP data for Client #9.
2022-07-28 16:03:52,574 (cikm_cup:67)INFO: Loading CIKMCUP data for Client #10.
2022-07-28 16:04:23,293 (cikm_cup:67)INFO: Loading CIKMCUP data for Client #11.
2022-07-28 16:04:24,356 (cikm_cup:67)INFO: Loading CIKMCUP data for Client #12.
2022-07-28 16:04:24,600 (cikm_cup:67)INFO: Loading CIKMCUP data for Client #13.
2022-07-28 16:04:45,514 (cfg_fl_setting:104)WARNING: In local/global training mode, the sampling related configs are in-valid, we will use all clients.
2022-07-28 16:04:45,515 (cfg_fl_setting:104)WARNING: In local/global training mode, the sampling related configs are in-valid, we will use all clients.
2022-07-28 16:04:45,533 (config:261)INFO: the used configs are:
asyn:
……
2022-07-29 16:42:09,105 (client:259)INFO: {'Role': 'Client #1', 'Round': 9, 'Results_raw': {'train_acc': 0.849175, 'train_total': 26229, 'train_loss': 8790.357205, 'train_avg_loss': 0.335139}}
2022-07-29 16:42:09,106 (server:332)INFO: Server #0: Training is finished! Starting evaluation.
2022-07-29 16:43:33,691 (server:487)INFO: {'Role': 'Server #', 'Round': 10, 'Results_avg': {'test_acc': 0.526233, 'test_total': 8350.846154, 'test_loss': 8779.004091, 'test_avg_loss': 2.026364, 'val_acc': 0.737841, 'val_total': 8350.461538, 'val_loss': 403.105243, 'val_avg_loss': 0.485652, 'test_mse': 3.65888, 'val_mse': 0.430482}}
2022-07-29 16:43:33,693 (server:386)INFO: Server #0: Final evaluation is finished! Starting merging results.
2022-07-29 16:43:33,693 (server:416)INFO: {'Role': 'Server #', 'Round': 'Final', 'Results_raw': {'client_best_individual': {'val_loss': 14.630754, 'test_acc': 0.0, 'test_total': 34.0, 'test_loss': 33.747309, 'test_avg_loss': 0.164675, 'val_acc': 0.555556, 'val_total': 34.0, 'val_avg_loss': 0.004378, 'test_mse': 0.164675, 'val_mse': 0.004378}, 'client_summarized_avg': {'val_loss': 403.105243, 'test_acc': 0.526233, 'test_total': 8350.846154, 'test_loss': 8779.004091, 'test_avg_loss': 2.026364, 'val_acc': 0.737841, 'val_total': 8350.461538, 'val_avg_loss': 0.485652, 'test_mse': 3.65888, 'val_mse': 0.430482}}}
2022-07-29 16:43:33,695 (server:437)INFO: {'Role': 'Client #1', 'Round': 10, 'Results_raw': {'test_acc': 0.618705, 'test_total': 417, 'test_loss': 231.550332, 'test_avg_loss': 0.555277, 'val_acc': 0.891827, 'val_total': 416, 'val_loss': 121.947417, 'val_avg_loss': 0.293143}}
2022-07-29 16:43:33,696 (server:437)INFO: {'Role': 'Client #2', 'Round': 10, 'Results_raw': {'test_acc': 0.836066, 'test_total': 61, 'test_loss': 33.747309, 'test_avg_loss': 0.553235, 'val_acc': 0.633333, 'val_total': 60, 'val_loss': 37.215865, 'val_avg_loss': 0.620264}}
2022-07-29 16:43:33,697 (server:437)INFO: {'Role': 'Client #3', 'Round': 10, 'Results_raw': {'test_acc': 0.65, 'test_total': 740, 'test_loss': 459.380432, 'test_avg_loss': 0.620784, 'val_acc': 0.694595, 'val_total': 740, 'val_loss': 472.198664, 'val_avg_loss': 0.638106}}
2022-07-29 16:43:33,698 (server:437)INFO: {'Role': 'Client #4', 'Round': 10, 'Results_raw': {'test_acc': 0.411765, 'test_total': 34, 'test_loss': 43.255468, 'test_avg_loss': 1.27222, 'val_acc': 0.764706, 'val_total': 34, 'val_loss': 14.630754, 'val_avg_loss': 0.430316}}
2022-07-29 16:43:33,698 (server:437)INFO: {'Role': 'Client #5', 'Round': 10, 'Results_raw': {'test_acc': 1.0, 'test_total': 63, 'test_loss': 37.144565, 'test_avg_loss': 0.589596, 'val_acc': 0.555556, 'val_total': 63, 'val_loss': 43.623181, 'val_avg_loss': 0.692431}}
2022-07-29 16:43:33,699 (server:437)INFO: {'Role': 'Client #6', 'Round': 10, 'Results_raw': {'test_acc': 0.0, 'test_total': 367, 'test_loss': 434.167709, 'test_avg_loss': 1.183018, 'val_acc': 0.757493, 'val_total': 367, 'val_loss': 199.774627, 'val_avg_loss': 0.544345}}
2022-07-29 16:43:33,700 (server:437)INFO: {'Role': 'Client #7', 'Round': 10, 'Results_raw': {'test_acc': 0.670256, 'test_total': 743, 'test_loss': 414.619449, 'test_avg_loss': 0.558034, 'val_acc': 0.713324, 'val_total': 743, 'val_loss': 423.399025, 'val_avg_loss': 0.569851}}
2022-07-29 16:43:33,701 (server:437)INFO: {'Role': 'Client #8', 'Round': 10, 'Results_raw': {'test_acc': 0.023077, 'test_total': 260, 'test_loss': 706.203096, 'test_avg_loss': 2.716166, 'val_acc': 0.891892, 'val_total': 259, 'val_loss': 96.503626, 'val_avg_loss': 0.372601}}
2022-07-29 16:43:33,702 (server:437)INFO: {'Role': 'Client #9', 'Round': 10, 'Results_raw': {'test_total': 44902, 'test_mse': 2.083826, 'test_loss': 93567.969848, 'test_avg_loss': 2.083826, 'val_total': 44902, 'val_mse': 0.060478, 'val_loss': 2715.594501, 'val_avg_loss': 0.060478}}
2022-07-29 16:43:33,702 (server:437)INFO: {'Role': 'Client #10', 'Round': 10, 'Results_raw': {'test_total': 36465, 'test_mse': 0.164675, 'test_loss': 6004.87626, 'test_avg_loss': 0.164675, 'val_total': 36464, 'val_mse': 0.006996, 'val_loss': 255.089729, 'val_avg_loss': 0.006996}}
2022-07-29 16:43:33,703 (server:437)INFO: {'Role': 'Client #11', 'Round': 10, 'Results_raw': {'test_total': 756, 'test_mse': 5.267134, 'test_loss': 3981.953695, 'test_avg_loss': 5.267135, 'val_total': 756, 'val_mse': 0.605658, 'val_loss': 457.877535, 'val_avg_loss': 0.605658}}
2022-07-29 16:43:33,704 (server:437)INFO: {'Role': 'Client #12', 'Round': 10, 'Results_raw': {'test_total': 203, 'test_mse': 10.520739, 'test_loss': 2135.710085, 'test_avg_loss': 10.520739, 'val_total': 203, 'val_mse': 1.474901, 'val_loss': 299.404961, 'val_avg_loss': 1.474901}}
2022-07-29 16:43:33,705 (server:437)INFO: {'Role': 'Client #13', 'Round': 10, 'Results_raw': {'test_total': 23550, 'test_mse': 0.258024, 'test_loss': 6076.474935, 'test_avg_loss': 0.258024, 'val_total': 23549, 'val_mse': 0.004378, 'val_loss': 103.10828, 'val_avg_loss': 0.004378}}
2022-07-29 16:43:33,706 (monitor:121)INFO: In worker #0, the system-related metrics are: {'id': 0, 'fl_end_time_minutes': 1478.794508, 'total_model_size': 0, 'total_flops': 0, 'total_upload_bytes': 9984, 'total_download_bytes': 46864, 'global_convergence_round': 0, 'local_convergence_round': 0, 'global_convergence_time_minutes': 0, 'local_convergence_time_minutes': 0}
2022-07-29 16:43:33,707 (client:440)INFO: ================= client 1 received finish message =================
2022-07-29 16:43:33,892 (client:453)INFO: Client #1 finished saving prediction results in E:\1zyq\FederatedScope\exp\local_gin_on_cikmcup_lr0.1_lstep21_\sub_exp_20220728160310\prediction.csv
2022-07-29 16:43:33,892 (monitor:121)INFO: In worker #1, the system-related metrics are: {'id': 1, 'fl_end_time_minutes': 1478.79707, 'total_model_size': 304514, 'total_flops': 0, 'total_upload_bytes': 3680, 'total_download_bytes': 768, 'global_convergence_round': 0, 'local_convergence_round': 0, 'global_convergence_time_minutes': 0, 'local_convergence_time_minutes': 0}
2022-07-29 16:43:33,894 (client:440)INFO: ================= client 2 received finish message =================
2022-07-29 16:43:33,938 (client:453)INFO: Client #2 finished saving prediction results in E:\1zyq\FederatedScope\exp\local_gin_on_cikmcup_lr0.1_lstep21_\sub_exp_20220728160310\prediction.csv
2022-07-29 16:43:33,939 (monitor:121)INFO: In worker #2, the system-related metrics are: {'id': 2, 'fl_end_time_minutes': 1478.79723, 'total_model_size': 278786, 'total_flops': 0, 'total_upload_bytes': 3680, 'total_download_bytes': 768, 'global_convergence_round': 0, 'local_convergence_round': 0, 'global_convergence_time_minutes': 0, 'local_convergence_time_minutes': 0}
2022-07-29 16:43:33,940 (client:440)INFO: ================= client 3 received finish message =================
2022-07-29 16:43:34,244 (client:453)INFO: Client #3 finished saving prediction results in E:\1zyq\FederatedScope\exp\local_gin_on_cikmcup_lr0.1_lstep21_\sub_exp_20220728160310\prediction.csv
2022-07-29 16:43:34,245 (monitor:121)INFO: In worker #3, the system-related metrics are: {'id': 3, 'fl_end_time_minutes': 1478.801718, 'total_model_size': 497474, 'total_flops': 0, 'total_upload_bytes': 3680, 'total_download_bytes': 768, 'global_convergence_round': 0, 'local_convergence_round': 0, 'global_convergence_time_minutes': 0, 'local_convergence_time_minutes': 0}
2022-07-29 16:43:34,246 (client:440)INFO: ================= client 4 received finish message =================
2022-07-29 16:43:34,271 (client:453)INFO: Client #4 finished saving prediction results in E:\1zyq\FederatedScope\exp\local_gin_on_cikmcup_lr0.1_lstep21_\sub_exp_20220728160310\prediction.csv
2022-07-29 16:43:34,271 (monitor:121)INFO: In worker #4, the system-related metrics are: {'id': 4, 'fl_end_time_minutes': 1478.801635, 'total_model_size': 111554, 'total_flops': 0, 'total_upload_bytes': 3616, 'total_download_bytes': 768, 'global_convergence_round': 0, 'local_convergence_round': 0, 'global_convergence_time_minutes': 0, 'local_convergence_time_minutes': 0}
2022-07-29 16:43:34,272 (client:440)INFO: ================= client 5 received finish message =================
2022-07-29 16:43:34,307 (client:453)INFO: Client #5 finished saving prediction results in E:\1zyq\FederatedScope\exp\local_gin_on_cikmcup_lr0.1_lstep21_\sub_exp_20220728160310\prediction.csv
2022-07-29 16:43:34,308 (monitor:121)INFO: In worker #5, the system-related metrics are: {'id': 5, 'fl_end_time_minutes': 1478.801711, 'total_model_size': 253058, 'total_flops': 0, 'total_upload_bytes': 3616, 'total_download_bytes': 768, 'global_convergence_round': 0, 'local_convergence_round': 0, 'global_convergence_time_minutes': 0, 'local_convergence_time_minutes': 0}
2022-07-29 16:43:34,309 (client:440)INFO: ================= client 6 received finish message =================
2022-07-29 16:43:34,477 (client:453)INFO: Client #6 finished saving prediction results in E:\1zyq\FederatedScope\exp\local_gin_on_cikmcup_lr0.1_lstep21_\sub_exp_20220728160310\prediction.csv
2022-07-29 16:43:34,478 (monitor:121)INFO: In worker #6, the system-related metrics are: {'id': 6, 'fl_end_time_minutes': 1478.803981, 'total_model_size': 304514, 'total_flops': 0, 'total_upload_bytes': 3680, 'total_download_bytes': 768, 'global_convergence_round': 0, 'local_convergence_round': 0, 'global_convergence_time_minutes': 0, 'local_convergence_time_minutes': 0}
2022-07-29 16:43:34,479 (client:440)INFO: ================= client 7 received finish message =================
2022-07-29 16:43:34,783 (client:453)INFO: Client #7 finished saving prediction results in E:\1zyq\FederatedScope\exp\local_gin_on_cikmcup_lr0.1_lstep21_\sub_exp_20220728160310\prediction.csv
2022-07-29 16:43:34,783 (monitor:121)INFO: In worker #7, the system-related metrics are: {'id': 7, 'fl_end_time_minutes': 1478.808447, 'total_model_size': 510338, 'total_flops': 0, 'total_upload_bytes': 3680, 'total_download_bytes': 768, 'global_convergence_round': 0, 'local_convergence_round': 0, 'global_convergence_time_minutes': 0, 'local_convergence_time_minutes': 0}
2022-07-29 16:43:34,784 (client:440)INFO: ================= client 8 received finish message =================
2022-07-29 16:43:34,920 (client:453)INFO: Client #8 finished saving prediction results in E:\1zyq\FederatedScope\exp\local_gin_on_cikmcup_lr0.1_lstep21_\sub_exp_20220728160310\prediction.csv
2022-07-29 16:43:34,921 (monitor:121)INFO: In worker #8, the system-related metrics are: {'id': 8, 'fl_end_time_minutes': 1478.810207, 'total_model_size': 265922, 'total_flops': 0, 'total_upload_bytes': 3680, 'total_download_bytes': 768, 'global_convergence_round': 0, 'local_convergence_round': 0, 'global_convergence_time_minutes': 0, 'local_convergence_time_minutes': 0}
2022-07-29 16:43:34,922 (client:440)INFO: ================= client 9 received finish message =================
2022-07-29 16:43:52,559 (client:453)INFO: Client #9 finished saving prediction results in E:\1zyq\FederatedScope\exp\local_gin_on_cikmcup_lr0.1_lstep21_\sub_exp_20220728160310\prediction.csv
2022-07-29 16:43:52,559 (monitor:121)INFO: In worker #9, the system-related metrics are: {'id': 9, 'fl_end_time_minutes': 1479.103508, 'total_model_size': 381633, 'total_flops': 0, 'total_upload_bytes': 3744, 'total_download_bytes': 768, 'global_convergence_round': 0, 'local_convergence_round': 0, 'global_convergence_time_minutes': 0, 'local_convergence_time_minutes': 0}
2022-07-29 16:43:52,560 (client:440)INFO: ================= client 10 received finish message =================
2022-07-29 16:44:06,783 (client:453)INFO: Client #10 finished saving prediction results in E:\1zyq\FederatedScope\exp\local_gin_on_cikmcup_lr0.1_lstep21_\sub_exp_20220728160310\prediction.csv
2022-07-29 16:44:06,783 (monitor:121)INFO: In worker #10, the system-related metrics are: {'id': 10, 'fl_end_time_minutes': 1479.340012, 'total_model_size': 99210, 'total_flops': 0, 'total_upload_bytes': 3744, 'total_download_bytes': 768, 'global_convergence_round': 0, 'local_convergence_round': 0, 'global_convergence_time_minutes': 0, 'local_convergence_time_minutes': 0}
2022-07-29 16:44:06,784 (client:440)INFO: ================= client 11 received finish message =================
2022-07-29 16:44:07,097 (client:453)INFO: Client #11 finished saving prediction results in E:\1zyq\FederatedScope\exp\local_gin_on_cikmcup_lr0.1_lstep21_\sub_exp_20220728160310\prediction.csv
2022-07-29 16:44:07,098 (monitor:121)INFO: In worker #11, the system-related metrics are: {'id': 11, 'fl_end_time_minutes': 1479.344716, 'total_model_size': 304449, 'total_flops': 0, 'total_upload_bytes': 3744, 'total_download_bytes': 768, 'global_convergence_round': 0, 'local_convergence_round': 0, 'global_convergence_time_minutes': 0, 'local_convergence_time_minutes': 0}
2022-07-29 16:44:07,099 (client:440)INFO: ================= client 12 received finish message =================
2022-07-29 16:44:07,197 (client:453)INFO: Client #12 finished saving prediction results in E:\1zyq\FederatedScope\exp\local_gin_on_cikmcup_lr0.1_lstep21_\sub_exp_20220728160310\prediction.csv
2022-07-29 16:44:07,197 (monitor:121)INFO: In worker #12, the system-related metrics are: {'id': 12, 'fl_end_time_minutes': 1479.345804, 'total_model_size': 304449, 'total_flops': 0, 'total_upload_bytes': 3680, 'total_download_bytes': 768, 'global_convergence_round': 0, 'local_convergence_round': 0, 'global_convergence_time_minutes': 0, 'local_convergence_time_minutes': 0}
2022-07-29 16:44:07,198 (client:440)INFO: ================= client 13 received finish message =================
2022-07-29 16:44:16,579 (client:453)INFO: Client #13 finished saving prediction results in E:\1zyq\FederatedScope\exp\local_gin_on_cikmcup_lr0.1_lstep21_\sub_exp_20220728160310\prediction.csv
2022-07-29 16:44:16,580 (monitor:121)INFO: In worker #13, the system-related metrics are: {'id': 13, 'fl_end_time_minutes': 1479.501636, 'total_model_size': 163660, 'total_flops': 0, 'total_upload_bytes': 3744, 'total_download_bytes': 768, 'global_convergence_round': 0, 'local_convergence_round': 0, 'global_convergence_time_minutes': 0, 'local_convergence_time_minutes': 0}
2022-07-29 16:44:16,581 (monitor:278)INFO: We will compress the file eval_results.raw into a .gz file, and delete the old one
2022-07-29 16:44:16,585 (monitor:195)INFO: After merging the system metrics from all works, we got avg: defaultdict(None, {'id': 'sys_avg', 'sys_avg/fl_end_time_minutes': 1478.989442, 'sys_avg/total_model_size': '263.64K', 'sys_avg/total_flops': '0.0', 'sys_avg/total_upload_bytes': '4.04K', 'sys_avg/total_download_bytes': '3.97K', 'sys_avg/global_convergence_round': 0.0, 'sys_avg/local_convergence_round': 0.0, 'sys_avg/global_convergence_time_minutes': 0.0, 'sys_avg/local_convergence_time_minutes': 0.0})
2022-07-29 16:44:16,586 (monitor:198)INFO: After merging the system metrics from all works, we got std: defaultdict(None, {'id': 'sys_std', 'sys_std/fl_end_time_minutes': 0.263012, 'sys_std/total_model_size': '134.51K', 'sys_std/total_flops': '0.0', 'sys_std/total_upload_bytes': '1.58K', 'sys_std/total_download_bytes': '11.59K', 'sys_std/global_convergence_round': 0.0, 'sys_std/local_convergence_round': 0.0, 'sys_std/global_convergence_time_minutes': 0.0, 'sys_std/local_convergence_time_minutes': 0.0})
(cfs) PS E:\1zyq\FederatedScope>