diff --git a/README.md b/README.md index c42279041..1a4518d5a 100644 --- a/README.md +++ b/README.md @@ -161,9 +161,9 @@ Here we demonstrate how to run a standard FL task with FederatedScope, with sett ```bash # Run with default configurations -python federatedscope/main.py --cfg federatedscope/example_configs/femnist.yaml +python federatedscope/main.py --cfg scripts/example_configs/femnist.yaml # Or with custom configurations -python federatedscope/main.py --cfg federatedscope/example_configs/femnist.yaml federated.total_round_num 50 data.batch_size 128 +python federatedscope/main.py --cfg scripts/example_configs/femnist.yaml federated.total_round_num 50 data.batch_size 128 ``` Then you can observe some monitored metrics during the training process as: @@ -203,12 +203,12 @@ We prepare a synthetic example for running with distributed mode: ```bash # For server -python main.py --cfg federatedscope/example_configs/distributed_server.yaml distribute.data_file 'PATH/TO/DATA' distribute.server_host x.x.x.x distribute.server_port xxxx +python federatedscope/main.py --cfg scripts/distributed_scripts/distributed_configs/distributed_server.yaml distribute.data_file 'PATH/TO/DATA' distribute.server_host x.x.x.x distribute.server_port xxxx # For clients -python main.py --cfg federatedscope/example_configs/distributed_client_1.yaml distribute.data_file 'PATH/TO/DATA' distribute.server_host x.x.x.x distribute.server_port xxxx distribute.client_host x.x.x.x distribute.client_port xxxx -python main.py --cfg federatedscope/example_configs/distributed_client_2.yaml distribute.data_file 'PATH/TO/DATA' distribute.server_host x.x.x.x distribute.server_port xxxx distribute.client_host x.x.x.x distribute.client_port xxxx -python main.py --cfg federatedscope/example_configs/distributed_client_3.yaml distribute.data_file 'PATH/TO/DATA' distribute.server_host x.x.x.x distribute.server_port xxxx distribute.client_host x.x.x.x distribute.client_port xxxx +python federatedscope/main.py --cfg scripts/distributed_scripts/distributed_configs/distributed_client_1.yaml distribute.data_file 'PATH/TO/DATA' distribute.server_host x.x.x.x distribute.server_port xxxx distribute.client_host x.x.x.x distribute.client_port xxxx +python federatedscope/main.py --cfg scripts/distributed_scripts/distributed_configs/distributed_client_2.yaml distribute.data_file 'PATH/TO/DATA' distribute.server_host x.x.x.x distribute.server_port xxxx distribute.client_host x.x.x.x distribute.client_port xxxx +python federatedscope/main.py --cfg scripts/distributed_scripts/distributed_configs/distributed_client_3.yaml distribute.data_file 'PATH/TO/DATA' distribute.server_host x.x.x.x distribute.server_port xxxx distribute.client_host x.x.x.x distribute.client_port xxxx ``` An executable example with generated toy data can be run with (a script can be found in `scripts/run_distributed_lr.sh`): @@ -217,14 +217,14 @@ An executable example with generated toy data can be run with (a script can be f python scripts/gen_data.py # Firstly start the server that is waiting for clients to join in -python federatedscope/main.py --cfg federatedscope/example_configs/distributed_server.yaml distribute.data_file toy_data/server_data distribute.server_host 127.0.0.1 distribute.server_port 50051 +python federatedscope/main.py --cfg scripts/distributed_scripts/distributed_configs/distributed_server.yaml distribute.data_file toy_data/server_data distribute.server_host 127.0.0.1 distribute.server_port 50051 # Start the client #1 (with another process) -python federatedscope/main.py --cfg federatedscope/example_configs/distributed_client_1.yaml distribute.data_file toy_data/client_1_data distribute.server_host 127.0.0.1 distribute.server_port 50051 distribute.client_host 127.0.0.1 distribute.client_port 50052 +python federatedscope/main.py --cfg scripts/distributed_scripts/distributed_configs/distributed_client_1.yaml distribute.data_file toy_data/client_1_data distribute.server_host 127.0.0.1 distribute.server_port 50051 distribute.client_host 127.0.0.1 distribute.client_port 50052 # Start the client #2 (with another process) -python federatedscope/main.py --cfg federatedscope/example_configs/distributed_client_2.yaml distribute.data_file toy_data/client_2_data distribute.server_host 127.0.0.1 distribute.server_port 50051 distribute.client_host 127.0.0.1 distribute.client_port 50053 +python federatedscope/main.py --cfg scripts/distributed_scripts/distributed_configs/distributed_client_2.yaml distribute.data_file toy_data/client_2_data distribute.server_host 127.0.0.1 distribute.server_port 50051 distribute.client_host 127.0.0.1 distribute.client_port 50053 # Start the client #3 (with another process) -python federatedscope/main.py --cfg federatedscope/example_configs/distributed_client_3.yaml distribute.data_file toy_data/client_3_data distribute.server_host 127.0.0.1 distribute.server_port 50051 distribute.client_host 127.0.0.1 distribute.client_port 50054 +python federatedscope/main.py --cfg scripts/distributed_scripts/distributed_configs/distributed_client_3.yaml distribute.data_file toy_data/client_3_data distribute.server_host 127.0.0.1 distribute.server_port 50051 distribute.client_host 127.0.0.1 distribute.client_port 50054 ``` And you can observe the results as (the IP addresses are anonymized with 'x.x.x.x'): diff --git a/demo/bbo.py b/demo/bbo.py index 286c1d361..5b9c2236f 100644 --- a/demo/bbo.py +++ b/demo/bbo.py @@ -23,8 +23,7 @@ def eval_fl_algo(x): from federatedscope.core.fed_runner import FedRunner init_cfg = global_cfg.clone() - init_cfg.merge_from_file( - "federatedscope/example_configs/single_process.yaml") + init_cfg.merge_from_file("scripts/example_configs/single_process.yaml") init_cfg.merge_from_list(["train.optimizer.lr", float(x[0])]) update_logger(init_cfg, True) diff --git a/demo/hpbandster/rs.py b/demo/hpbandster/rs.py index 1cfbb967e..bb990bf01 100644 --- a/demo/hpbandster/rs.py +++ b/demo/hpbandster/rs.py @@ -43,8 +43,7 @@ def eval_fl_algo(x, b): from federatedscope.core.fed_runner import FedRunner init_cfg = global_cfg.clone() - init_cfg.merge_from_file( - "federatedscope/example_configs/single_process.yaml") + init_cfg.merge_from_file("scripts/example_configs/single_process.yaml") # specify the configuration of interest init_cfg.merge_from_list([ "train.optimizer.lr", diff --git a/demo/smac/gp.py b/demo/smac/gp.py index a0a72e2ad..628863c6f 100644 --- a/demo/smac/gp.py +++ b/demo/smac/gp.py @@ -19,8 +19,7 @@ def eval_fl_algo(x): from federatedscope.core.fed_runner import FedRunner init_cfg = global_cfg.clone() - init_cfg.merge_from_file( - "federatedscope/example_configs/single_process.yaml") + init_cfg.merge_from_file("scripts/example_configs/single_process.yaml") # specify the configuration of interest init_cfg.merge_from_list([ "optimizer.lr", diff --git a/demo/smac/rf.py b/demo/smac/rf.py index 05478e5ba..6e2c1cd86 100644 --- a/demo/smac/rf.py +++ b/demo/smac/rf.py @@ -19,8 +19,7 @@ def eval_fl_algo(x): from federatedscope.core.fed_runner import FedRunner init_cfg = global_cfg.clone() - init_cfg.merge_from_file( - "federatedscope/example_configs/single_process.yaml") + init_cfg.merge_from_file("scripts/example_configs/single_process.yaml") # specify the configuration of interest init_cfg.merge_from_list([ "optimizer.lr", diff --git a/federatedscope/example_configs/cora/run.sh b/federatedscope/example_configs/cora/run.sh deleted file mode 100644 index fcb735f6d..000000000 --- a/federatedscope/example_configs/cora/run.sh +++ /dev/null @@ -1,8 +0,0 @@ -# SHA -python hpo.py --cfg federatedscope/example_configs/cora/sha.yaml - -# SHA wrap FedEX (FedEX related param) -python hpo.py --cfg federatedscope/example_configs/cora/sha_wrap_fedex.yaml - -# SHA wrap FedEX (arm) -python hpo.py --cfg federatedscope/example_configs/cora/sha_wrap_fedex_arm.yaml \ No newline at end of file diff --git a/federatedscope/example_configs/femnist/run.sh b/federatedscope/example_configs/femnist/run.sh deleted file mode 100644 index aaa695886..000000000 --- a/federatedscope/example_configs/femnist/run.sh +++ /dev/null @@ -1,8 +0,0 @@ -# SHA -python hpo.py --cfg federatedscope/example_configs/femnist/sha.yaml - -# SHA wrap FedEX (FedEX related param) -python hpo.py --cfg federatedscope/example_configs/femnist/sha_wrap_fedex.yaml - -# SHA wrap FedEX (arm) -python hpo.py --cfg federatedscope/example_configs/femnist/sha_wrap_fedex_arm.yaml \ No newline at end of file diff --git a/federatedscope/organizer/client.py b/federatedscope/organizer/client.py index 9db866b0b..e8568aabb 100644 --- a/federatedscope/organizer/client.py +++ b/federatedscope/organizer/client.py @@ -156,7 +156,7 @@ def do_create_room(self, line): ' command, extra command to launch FS\n' \ ' psw, password for room \n\n' \ 'Example:\n' \ - ' create_room --cfg ../../federatedscope/example_configs' \ + ' create_room --cfg ../../scripts/example_configs' \ '/distributed_femnist_server.yaml 12345\n' try: global organizer diff --git a/run_reorganized_standalone.sh b/run_reorganized_standalone.sh index 595fdc43c..0ecea9fa4 100755 --- a/run_reorganized_standalone.sh +++ b/run_reorganized_standalone.sh @@ -10,7 +10,7 @@ echo "Starts..." lr=0.01 -python federatedscope/main.py --cfg federatedscope/example_configs/single_process.yaml device ${cudaid} data.type toy data.splitter ooxx \ +python federatedscope/main.py --cfg scripts/example_configs/single_process.yaml device ${cudaid} data.type toy data.splitter ooxx \ optimizer.lr ${lr} model.type lr federate.mode standalone trainer.type general federate.total_round_num 50 \ >>out_reorganize/lr.out \ 2>>out_reorganize/lr.err diff --git a/scripts/README.md b/scripts/README.md new file mode 100644 index 000000000..800b590d7 --- /dev/null +++ b/scripts/README.md @@ -0,0 +1,58 @@ +## Scripts for Reproduction +We provide some scripts for reproducing existing algorithms with FederatedScope, which are constantly being updated. +We greatly appreciate any [contribution](https://federatedscope.io/docs/contributor/) to FederatedScope! + +- [Distribute Mode](#distribute-mode) +- [Asynchronous Training Strategy](#asynchronous-training-strategy) +- [Graph Federated Learning](#graph-federated-learning) + +### Distribute Mode +Users can train an LR on generated toy data with distribute mode via: +```shell script +bash distributed_scripts/run_distributed_lr.sh +``` +The FL course consists of 1 server and 3 clients, which executes on one device as simulation. Each client owns private data and the server holds a test set for global evaluation. +- For running with multiple devices, you need to specify the host/port of IP addresses in the configurations (i.e., the yaml files) and make sure these devices are connected. +Then you can launch the participants (i.e., `python federatedscope/main.py --cfg xxx.yaml`) on each provided device (Remember to launch the server first). +- For the situation that server doesn't own data and the evaluation is performed at clients, use `distributed_server_no_data.yaml` at this [line](https://github.com/alibaba/FederatedScope/blob/master/scripts/distributed_scripts/run_distributed_lr.sh#L11). + +Also, users can run distribute mode with other provided datasets and models. Take training ConvNet on FEMNIST as an example: +```shell script +bash distributed_scripts/run_distributed_conv_femnist.sh +``` + +### Federated Learning in Computer Vision (FL-CV) +We provide several configurations (yaml files) as examples to demonstrate how to apply FL in CV with FederatedScope. +Users can run the following comments for reproducing, and modify/add the yaml file for customization, such as using provided/customized datasets and models, tunning hyperparameters, etc. + +Train ConvNet on FEMNIST with vanilla FedAvg: +```shell script +cd .. +python federatedscope/main.py --cfg federatedscope/cv/baseline/fedavg_convnet2_on_femnist.yaml +# or +# python federatedscope/main.py --cfg scripts/example_configs/femnist.yaml +``` + +Train ConvNet on CelebA with vanilla FedAvg: +```shell script +cd .. +python federatedscope/main.py --cfg federatedscope/cv/baseline/fedavg_convnet2_on_celeba.yaml +``` + +Train ConvNet on FEMNIST with FedBN: +```shell script +cd .. +python federatedscope/main.py --cfg federatedscope/cv/baseline/fedbn_convnet2_on_femnist.yaml +``` + +### Asynchronous Training Strategy +We provide an example for training ConvNet on CIFAR-10 with asynchronous training strategies: +```shell script +cd .. +python federatedscope/main.py --cfg scritpes/example_configs/asyn_cifar10.yaml +``` +The FL courses consists of 1 server and 200 clients, which applies `goal_achieved` strategies and set the `min_received_num=10` and `staleness_toleration=10`. +Users can change the configurations related to asynchronous training for customization. Please see [configurations](https://github.com/alibaba/FederatedScope/tree/master/federatedscope/core/configs). + +### Graph Federated Learning +Please refer to [gfl](https://github.com/alibaba/FederatedScope/tree/master/federatedscope/gfl) for more details. diff --git a/federatedscope/example_configs/distributed_client_1.yaml b/scripts/distributed_scripts/distributed_configs/distributed_client_1.yaml similarity index 100% rename from federatedscope/example_configs/distributed_client_1.yaml rename to scripts/distributed_scripts/distributed_configs/distributed_client_1.yaml diff --git a/federatedscope/example_configs/distributed_client_2.yaml b/scripts/distributed_scripts/distributed_configs/distributed_client_2.yaml similarity index 100% rename from federatedscope/example_configs/distributed_client_2.yaml rename to scripts/distributed_scripts/distributed_configs/distributed_client_2.yaml diff --git a/federatedscope/example_configs/distributed_client_3.yaml b/scripts/distributed_scripts/distributed_configs/distributed_client_3.yaml similarity index 100% rename from federatedscope/example_configs/distributed_client_3.yaml rename to scripts/distributed_scripts/distributed_configs/distributed_client_3.yaml diff --git a/federatedscope/example_configs/distributed_femnist_client1.yaml b/scripts/distributed_scripts/distributed_configs/distributed_femnist_client_1.yaml similarity index 89% rename from federatedscope/example_configs/distributed_femnist_client1.yaml rename to scripts/distributed_scripts/distributed_configs/distributed_femnist_client_1.yaml index 62a3b2f44..7ea86b85d 100644 --- a/federatedscope/example_configs/distributed_femnist_client1.yaml +++ b/scripts/distributed_scripts/distributed_configs/distributed_femnist_client_1.yaml @@ -1,5 +1,5 @@ use_gpu: True -device: 1 +device: 0 early_stop: patience: 5 seed: 12345 @@ -8,11 +8,13 @@ federate: mode: 'distributed' make_global_eval: False online_aggr: False - total_round_num: 300 + total_round_num: 20 distribute: use: True server_host: '127.0.0.1' server_port: 50051 + client_host: '127.0.0.1' + client_port: 50052 role: 'client' data_idx: 2 data: @@ -40,7 +42,7 @@ criterion: trainer: type: cvtrainer eval: - freq: 1 + freq: 10 metrics: ['acc', 'correct'] report: [ 'weighted_avg', 'raw' ] count_flops: False \ No newline at end of file diff --git a/federatedscope/example_configs/distributed_femnist_client2.yaml b/scripts/distributed_scripts/distributed_configs/distributed_femnist_client_2.yaml similarity index 90% rename from federatedscope/example_configs/distributed_femnist_client2.yaml rename to scripts/distributed_scripts/distributed_configs/distributed_femnist_client_2.yaml index 55cf7c0ba..6d5374c8c 100644 --- a/federatedscope/example_configs/distributed_femnist_client2.yaml +++ b/scripts/distributed_scripts/distributed_configs/distributed_femnist_client_2.yaml @@ -8,11 +8,13 @@ federate: mode: 'distributed' make_global_eval: False online_aggr: False - total_round_num: 300 + total_round_num: 20 distribute: use: True server_host: '127.0.0.1' server_port: 50051 + client_host: '127.0.0.1' + client_port: 50053 role: 'client' data_idx: 3 data: @@ -40,7 +42,7 @@ criterion: trainer: type: cvtrainer eval: - freq: 1 + freq: 10 metrics: ['acc', 'correct'] report: [ 'weighted_avg', 'raw' ] count_flops: False \ No newline at end of file diff --git a/federatedscope/example_configs/distributed_femnist_client3.yaml b/scripts/distributed_scripts/distributed_configs/distributed_femnist_client_3.yaml similarity index 89% rename from federatedscope/example_configs/distributed_femnist_client3.yaml rename to scripts/distributed_scripts/distributed_configs/distributed_femnist_client_3.yaml index d0f7fbe60..83abc02b0 100644 --- a/federatedscope/example_configs/distributed_femnist_client3.yaml +++ b/scripts/distributed_scripts/distributed_configs/distributed_femnist_client_3.yaml @@ -1,5 +1,5 @@ use_gpu: True -device: 1 +device: 0 early_stop: patience: 5 seed: 12345 @@ -8,11 +8,13 @@ federate: mode: 'distributed' make_global_eval: False online_aggr: False - total_round_num: 300 + total_round_num: 20 distribute: use: True server_host: '127.0.0.1' server_port: 50051 + client_host: '127.0.0.1' + client_port: 50054 role: 'client' data_idx: 4 data: @@ -40,7 +42,7 @@ criterion: trainer: type: cvtrainer eval: - freq: 1 + freq: 10 metrics: ['acc', 'correct'] report: [ 'weighted_avg', 'raw' ] count_flops: False \ No newline at end of file diff --git a/federatedscope/example_configs/distributed_femnist_server.yaml b/scripts/distributed_scripts/distributed_configs/distributed_femnist_server.yaml similarity index 95% rename from federatedscope/example_configs/distributed_femnist_server.yaml rename to scripts/distributed_scripts/distributed_configs/distributed_femnist_server.yaml index 786b23453..05b4fb124 100644 --- a/federatedscope/example_configs/distributed_femnist_server.yaml +++ b/scripts/distributed_scripts/distributed_configs/distributed_femnist_server.yaml @@ -8,7 +8,7 @@ federate: mode: 'distributed' make_global_eval: False online_aggr: False - total_round_num: 300 + total_round_num: 20 distribute: use: True server_host: '127.0.0.1' @@ -40,7 +40,7 @@ criterion: trainer: type: cvtrainer eval: - freq: 1 + freq: 10 metrics: ['acc', 'correct'] report: ['weighted_avg', 'raw'] count_flops: False \ No newline at end of file diff --git a/federatedscope/example_configs/distributed_server.yaml b/scripts/distributed_scripts/distributed_configs/distributed_server.yaml similarity index 100% rename from federatedscope/example_configs/distributed_server.yaml rename to scripts/distributed_scripts/distributed_configs/distributed_server.yaml diff --git a/federatedscope/example_configs/distributed_server_no_data.yaml b/scripts/distributed_scripts/distributed_configs/distributed_server_no_data.yaml similarity index 100% rename from federatedscope/example_configs/distributed_server_no_data.yaml rename to scripts/distributed_scripts/distributed_configs/distributed_server_no_data.yaml diff --git a/scripts/gen_data.py b/scripts/distributed_scripts/gen_data.py similarity index 100% rename from scripts/gen_data.py rename to scripts/distributed_scripts/gen_data.py diff --git a/scripts/distributed_scripts/run_distributed_conv_femnist.sh b/scripts/distributed_scripts/run_distributed_conv_femnist.sh new file mode 100755 index 000000000..4f0fc2f58 --- /dev/null +++ b/scripts/distributed_scripts/run_distributed_conv_femnist.sh @@ -0,0 +1,17 @@ +set -e + +cd .. + +echo "Run distributed mode with ConvNet-2 on FEMNIST..." + +### server +python federatedscope/main.py --cfg scripts/distributed_scripts/distributed_configs/distributed_femnist_server.yaml & +sleep 2 + +# clients +python federatedscope/main.py --cfg scripts/distributed_scripts/distributed_configs/distributed_femnist_client_1.yaml & +sleep 2 +python federatedscope/main.py --cfg scripts/distributed_scripts/distributed_configs/distributed_femnist_client_2.yaml & +sleep 2 +python federatedscope/main.py --cfg scripts/distributed_scripts/distributed_configs/distributed_femnist_client_3.yaml & + diff --git a/scripts/distributed_scripts/run_distributed_lr.sh b/scripts/distributed_scripts/run_distributed_lr.sh new file mode 100755 index 000000000..361ebfcc4 --- /dev/null +++ b/scripts/distributed_scripts/run_distributed_lr.sh @@ -0,0 +1,22 @@ +set -e + +cd .. + +echo "Test distributed mode with LR..." + +echo "Data generation" +python scripts/gen_data.py + +### server owns global test data +python federatedscope/main.py --cfg scripts/distributed_scripts/distributed_configs/distributed_server.yaml & +### server doesn't own data +# python federatedscope/main.py --cfg scripts/distributed_scripts/distributed_configs/distributed_server_no_data.yaml & +sleep 2 + +# clients +python federatedscope/main.py --cfg scripts/distributed_scripts/distributed_configs/distributed_client_1.yaml & +sleep 2 +python federatedscope/main.py --cfg scripts/distributed_scripts/distributed_configs/distributed_client_2.yaml & +sleep 2 +python federatedscope/main.py --cfg scripts/distributed_scripts/distributed_configs/distributed_client_3.yaml & + diff --git a/federatedscope/example_configs/asyn_cifar10.yaml b/scripts/example_configs/asyn_cifar10.yaml similarity index 100% rename from federatedscope/example_configs/asyn_cifar10.yaml rename to scripts/example_configs/asyn_cifar10.yaml diff --git a/federatedscope/example_configs/cora/hpo_ss_fedex.yaml b/scripts/example_configs/cora/hpo_ss_fedex.yaml similarity index 100% rename from federatedscope/example_configs/cora/hpo_ss_fedex.yaml rename to scripts/example_configs/cora/hpo_ss_fedex.yaml diff --git a/federatedscope/example_configs/cora/hpo_ss_fedex_arm.yaml b/scripts/example_configs/cora/hpo_ss_fedex_arm.yaml similarity index 100% rename from federatedscope/example_configs/cora/hpo_ss_fedex_arm.yaml rename to scripts/example_configs/cora/hpo_ss_fedex_arm.yaml diff --git a/federatedscope/example_configs/cora/hpo_ss_fedex_arm_table.yaml b/scripts/example_configs/cora/hpo_ss_fedex_arm_table.yaml similarity index 100% rename from federatedscope/example_configs/cora/hpo_ss_fedex_arm_table.yaml rename to scripts/example_configs/cora/hpo_ss_fedex_arm_table.yaml diff --git a/federatedscope/example_configs/cora/hpo_ss_fedex_grid.yaml b/scripts/example_configs/cora/hpo_ss_fedex_grid.yaml similarity index 100% rename from federatedscope/example_configs/cora/hpo_ss_fedex_grid.yaml rename to scripts/example_configs/cora/hpo_ss_fedex_grid.yaml diff --git a/federatedscope/example_configs/cora/hpo_ss_sha.yaml b/scripts/example_configs/cora/hpo_ss_sha.yaml similarity index 100% rename from federatedscope/example_configs/cora/hpo_ss_sha.yaml rename to scripts/example_configs/cora/hpo_ss_sha.yaml diff --git a/scripts/example_configs/cora/run.sh b/scripts/example_configs/cora/run.sh new file mode 100644 index 000000000..3d57fb137 --- /dev/null +++ b/scripts/example_configs/cora/run.sh @@ -0,0 +1,8 @@ +# SHA +python hpo.py --cfg scripts/example_configs/cora/sha.yaml + +# SHA wrap FedEX (FedEX related param) +python hpo.py --cfg scripts/example_configs/cora/sha_wrap_fedex.yaml + +# SHA wrap FedEX (arm) +python hpo.py --cfg scripts/example_configs/cora/sha_wrap_fedex_arm.yaml \ No newline at end of file diff --git a/federatedscope/example_configs/cora/sha.yaml b/scripts/example_configs/cora/sha.yaml similarity index 92% rename from federatedscope/example_configs/cora/sha.yaml rename to scripts/example_configs/cora/sha.yaml index 7c9de06c5..b2eff0477 100644 --- a/federatedscope/example_configs/cora/sha.yaml +++ b/scripts/example_configs/cora/sha.yaml @@ -38,7 +38,7 @@ hpo: scheduler: sha num_workers: 0 init_cand_num: 81 - ss: 'federatedscope/example_configs/cora/hpo_ss_sha.yaml' + ss: 'scripts/example_configs/cora/hpo_ss_sha.yaml' sha: budgets: [2, 4, 12, 36] metric: 'server_global_eval.val_avg_loss' diff --git a/federatedscope/example_configs/cora/sha_wrap_fedex.yaml b/scripts/example_configs/cora/sha_wrap_fedex.yaml similarity index 85% rename from federatedscope/example_configs/cora/sha_wrap_fedex.yaml rename to scripts/example_configs/cora/sha_wrap_fedex.yaml index 9cb8da898..822bbc9da 100644 --- a/federatedscope/example_configs/cora/sha_wrap_fedex.yaml +++ b/scripts/example_configs/cora/sha_wrap_fedex.yaml @@ -38,10 +38,10 @@ hpo: scheduler: sha num_workers: 0 init_cand_num: 81 - ss: 'federatedscope/example_configs/cora/hpo_ss_fedex.yaml' + ss: 'scripts/example_configs/cora/hpo_ss_fedex.yaml' sha: budgets: [2, 4, 12, 36] fedex: use: True - ss: 'federatedscope/example_configs/cora/hpo_ss_fedex_grid.yaml' + ss: 'scripts/example_configs/cora/hpo_ss_fedex_grid.yaml' metric: 'server_global_eval.val_avg_loss' diff --git a/federatedscope/example_configs/cora/sha_wrap_fedex_arm.yaml b/scripts/example_configs/cora/sha_wrap_fedex_arm.yaml similarity index 85% rename from federatedscope/example_configs/cora/sha_wrap_fedex_arm.yaml rename to scripts/example_configs/cora/sha_wrap_fedex_arm.yaml index 25adaea66..2e9b726ec 100644 --- a/federatedscope/example_configs/cora/sha_wrap_fedex_arm.yaml +++ b/scripts/example_configs/cora/sha_wrap_fedex_arm.yaml @@ -38,9 +38,9 @@ hpo: scheduler: wrap_sha num_workers: 0 init_cand_num: 81 - ss: 'federatedscope/example_configs/cora/hpo_ss_fedex_arm_table.yaml' + ss: 'scripts/example_configs/cora/hpo_ss_fedex_arm_table.yaml' table: - ss: 'federatedscope/example_configs/cora/hpo_ss_fedex_arm.yaml' + ss: 'scripts/example_configs/cora/hpo_ss_fedex_arm.yaml' num: 4 cand: 81 sha: diff --git a/federatedscope/example_configs/fed_node_cls.yaml b/scripts/example_configs/fed_node_cls.yaml similarity index 100% rename from federatedscope/example_configs/fed_node_cls.yaml rename to scripts/example_configs/fed_node_cls.yaml diff --git a/federatedscope/example_configs/fedex_flat_search_space.yaml b/scripts/example_configs/fedex_flat_search_space.yaml similarity index 100% rename from federatedscope/example_configs/fedex_flat_search_space.yaml rename to scripts/example_configs/fedex_flat_search_space.yaml diff --git a/federatedscope/example_configs/fedex_for_lr.yaml b/scripts/example_configs/fedex_for_lr.yaml similarity index 71% rename from federatedscope/example_configs/fedex_for_lr.yaml rename to scripts/example_configs/fedex_for_lr.yaml index 9923564d1..e636968d0 100644 --- a/federatedscope/example_configs/fedex_for_lr.yaml +++ b/scripts/example_configs/fedex_for_lr.yaml @@ -21,6 +21,6 @@ model: hpo: fedex: use: True -# ss: 'federatedscope/example_configs/fedex_flat_search_space.yaml' - ss: 'federatedscope/example_configs/fedex_grid_search_space.yaml' +# ss: 'scripts/example_configs/fedex_flat_search_space.yaml' + ss: 'scripts/example_configs/fedex_grid_search_space.yaml' diff: True diff --git a/federatedscope/example_configs/fedex_grid_search_space.yaml b/scripts/example_configs/fedex_grid_search_space.yaml similarity index 100% rename from federatedscope/example_configs/fedex_grid_search_space.yaml rename to scripts/example_configs/fedex_grid_search_space.yaml diff --git a/federatedscope/example_configs/femnist.yaml b/scripts/example_configs/femnist.yaml similarity index 100% rename from federatedscope/example_configs/femnist.yaml rename to scripts/example_configs/femnist.yaml diff --git a/federatedscope/example_configs/femnist/avg/bo_gp.yaml b/scripts/example_configs/femnist/avg/bo_gp.yaml similarity index 94% rename from federatedscope/example_configs/femnist/avg/bo_gp.yaml rename to scripts/example_configs/femnist/avg/bo_gp.yaml index 5ae0d710a..a9730acab 100644 --- a/federatedscope/example_configs/femnist/avg/bo_gp.yaml +++ b/scripts/example_configs/femnist/avg/bo_gp.yaml @@ -42,7 +42,7 @@ eval: hpo: scheduler: bo_gp num_workers: 0 - ss: 'federatedscope/example_configs/femnist/avg/ss.yaml' + ss: 'scripts/example_configs/femnist/avg/ss.yaml' sha: budgets: [ 50, 50 ] elim_rate: 3 diff --git a/federatedscope/example_configs/femnist/avg/bo_gp_wrap.yaml b/scripts/example_configs/femnist/avg/bo_gp_wrap.yaml similarity index 94% rename from federatedscope/example_configs/femnist/avg/bo_gp_wrap.yaml rename to scripts/example_configs/femnist/avg/bo_gp_wrap.yaml index 63d7909d7..76664a5aa 100644 --- a/federatedscope/example_configs/femnist/avg/bo_gp_wrap.yaml +++ b/scripts/example_configs/femnist/avg/bo_gp_wrap.yaml @@ -44,7 +44,7 @@ hpo: scheduler: wrap_bo_gp num_workers: 0 init_cand_num: 100 - ss: 'federatedscope/example_configs/femnist/avg/ss.yaml' + ss: 'scripts/example_configs/femnist/avg/ss.yaml' sha: budgets: [ 50, 50 ] elim_rate: 3 diff --git a/federatedscope/example_configs/femnist/avg/bo_kde.yaml b/scripts/example_configs/femnist/avg/bo_kde.yaml similarity index 94% rename from federatedscope/example_configs/femnist/avg/bo_kde.yaml rename to scripts/example_configs/femnist/avg/bo_kde.yaml index 5982aa059..9d7550f23 100644 --- a/federatedscope/example_configs/femnist/avg/bo_kde.yaml +++ b/scripts/example_configs/femnist/avg/bo_kde.yaml @@ -42,7 +42,7 @@ eval: hpo: scheduler: bo_kde num_workers: 0 - ss: 'federatedscope/example_configs/femnist/avg/ss.yaml' + ss: 'scripts/example_configs/femnist/avg/ss.yaml' sha: budgets: [ 50, 50 ] elim_rate: 3 diff --git a/federatedscope/example_configs/femnist/avg/bo_kde_wrap.yaml b/scripts/example_configs/femnist/avg/bo_kde_wrap.yaml similarity index 94% rename from federatedscope/example_configs/femnist/avg/bo_kde_wrap.yaml rename to scripts/example_configs/femnist/avg/bo_kde_wrap.yaml index 2a2a58096..ac26cfba9 100644 --- a/federatedscope/example_configs/femnist/avg/bo_kde_wrap.yaml +++ b/scripts/example_configs/femnist/avg/bo_kde_wrap.yaml @@ -44,7 +44,7 @@ hpo: scheduler: wrap_bo_kde num_workers: 0 init_cand_num: 100 - ss: 'federatedscope/example_configs/femnist/avg/ss.yaml' + ss: 'scripts/example_configs/femnist/avg/ss.yaml' sha: budgets: [ 50, 50 ] elim_rate: 3 diff --git a/federatedscope/example_configs/femnist/avg/bo_rf.yaml b/scripts/example_configs/femnist/avg/bo_rf.yaml similarity index 94% rename from federatedscope/example_configs/femnist/avg/bo_rf.yaml rename to scripts/example_configs/femnist/avg/bo_rf.yaml index 4a14d3e1e..7eead0983 100644 --- a/federatedscope/example_configs/femnist/avg/bo_rf.yaml +++ b/scripts/example_configs/femnist/avg/bo_rf.yaml @@ -42,7 +42,7 @@ eval: hpo: scheduler: bo_rf num_workers: 0 - ss: 'federatedscope/example_configs/femnist/avg/ss.yaml' + ss: 'scripts/example_configs/femnist/avg/ss.yaml' sha: budgets: [ 50, 50 ] elim_rate: 3 diff --git a/federatedscope/example_configs/femnist/avg/bo_rf_wrap.yaml b/scripts/example_configs/femnist/avg/bo_rf_wrap.yaml similarity index 94% rename from federatedscope/example_configs/femnist/avg/bo_rf_wrap.yaml rename to scripts/example_configs/femnist/avg/bo_rf_wrap.yaml index 9cf716989..7ec192087 100644 --- a/federatedscope/example_configs/femnist/avg/bo_rf_wrap.yaml +++ b/scripts/example_configs/femnist/avg/bo_rf_wrap.yaml @@ -44,7 +44,7 @@ hpo: scheduler: wrap_bo_rf num_workers: 0 init_cand_num: 100 - ss: 'federatedscope/example_configs/femnist/avg/ss.yaml' + ss: 'scripts/example_configs/femnist/avg/ss.yaml' sha: budgets: [ 50, 50 ] elim_rate: 3 diff --git a/federatedscope/example_configs/femnist/avg/bohb.yaml b/scripts/example_configs/femnist/avg/bohb.yaml similarity index 94% rename from federatedscope/example_configs/femnist/avg/bohb.yaml rename to scripts/example_configs/femnist/avg/bohb.yaml index ea03274db..ee812d11b 100644 --- a/federatedscope/example_configs/femnist/avg/bohb.yaml +++ b/scripts/example_configs/femnist/avg/bohb.yaml @@ -42,7 +42,7 @@ eval: hpo: scheduler: bo_kde num_workers: 0 - ss: 'federatedscope/example_configs/femnist/avg/ss.yaml' + ss: 'scripts/example_configs/femnist/avg/ss.yaml' sha: budgets: [ 9, 81 ] elim_rate: 3 diff --git a/federatedscope/example_configs/femnist/avg/bohb_wrap.yaml b/scripts/example_configs/femnist/avg/bohb_wrap.yaml similarity index 94% rename from federatedscope/example_configs/femnist/avg/bohb_wrap.yaml rename to scripts/example_configs/femnist/avg/bohb_wrap.yaml index 891c5d53f..c9aedae64 100644 --- a/federatedscope/example_configs/femnist/avg/bohb_wrap.yaml +++ b/scripts/example_configs/femnist/avg/bohb_wrap.yaml @@ -43,7 +43,7 @@ eval: hpo: scheduler: wrap_bo_kde num_workers: 0 - ss: 'federatedscope/example_configs/femnist/avg/ss.yaml' + ss: 'scripts/example_configs/femnist/avg/ss.yaml' sha: budgets: [ 9, 81 ] elim_rate: 3 diff --git a/federatedscope/example_configs/femnist/avg/rs.yaml b/scripts/example_configs/femnist/avg/rs.yaml similarity index 94% rename from federatedscope/example_configs/femnist/avg/rs.yaml rename to scripts/example_configs/femnist/avg/rs.yaml index c6fb9777b..611cdb6d5 100644 --- a/federatedscope/example_configs/femnist/avg/rs.yaml +++ b/scripts/example_configs/femnist/avg/rs.yaml @@ -43,7 +43,7 @@ hpo: scheduler: sha num_workers: 0 init_cand_num: 10 - ss: 'federatedscope/example_configs/femnist/avg/ss.yaml' + ss: 'scripts/example_configs/femnist/avg/ss.yaml' sha: budgets: [50] elim_rate: 10 diff --git a/federatedscope/example_configs/femnist/avg/rs_wrap.yaml b/scripts/example_configs/femnist/avg/rs_wrap.yaml similarity index 94% rename from federatedscope/example_configs/femnist/avg/rs_wrap.yaml rename to scripts/example_configs/femnist/avg/rs_wrap.yaml index 5b50a3295..f23e629ff 100644 --- a/federatedscope/example_configs/femnist/avg/rs_wrap.yaml +++ b/scripts/example_configs/femnist/avg/rs_wrap.yaml @@ -44,7 +44,7 @@ hpo: scheduler: wrap_sha num_workers: 0 init_cand_num: 10 - ss: 'federatedscope/example_configs/femnist/avg/ss.yaml' + ss: 'scripts/example_configs/femnist/avg/ss.yaml' sha: budgets: [50] elim_rate: 10 diff --git a/federatedscope/example_configs/femnist/avg/sha.yaml b/scripts/example_configs/femnist/avg/sha.yaml similarity index 94% rename from federatedscope/example_configs/femnist/avg/sha.yaml rename to scripts/example_configs/femnist/avg/sha.yaml index 9b5f210a9..c07af3842 100644 --- a/federatedscope/example_configs/femnist/avg/sha.yaml +++ b/scripts/example_configs/femnist/avg/sha.yaml @@ -43,7 +43,7 @@ hpo: scheduler: sha num_workers: 0 init_cand_num: 27 - ss: 'federatedscope/example_configs/femnist/avg/ss.yaml' + ss: 'scripts/example_configs/femnist/avg/ss.yaml' sha: budgets: [12, 13, 19] metric: 'client_summarized_weighted_avg.val_avg_loss' diff --git a/federatedscope/example_configs/femnist/avg/sha_wrap.yaml b/scripts/example_configs/femnist/avg/sha_wrap.yaml similarity index 94% rename from federatedscope/example_configs/femnist/avg/sha_wrap.yaml rename to scripts/example_configs/femnist/avg/sha_wrap.yaml index c0c976de6..481c1d5a6 100644 --- a/federatedscope/example_configs/femnist/avg/sha_wrap.yaml +++ b/scripts/example_configs/femnist/avg/sha_wrap.yaml @@ -44,7 +44,7 @@ hpo: scheduler: wrap_sha num_workers: 0 init_cand_num: 27 - ss: 'federatedscope/example_configs/femnist/avg/ss.yaml' + ss: 'scripts/example_configs/femnist/avg/ss.yaml' table: num: 27 sha: diff --git a/federatedscope/example_configs/femnist/avg/ss.yaml b/scripts/example_configs/femnist/avg/ss.yaml similarity index 100% rename from federatedscope/example_configs/femnist/avg/ss.yaml rename to scripts/example_configs/femnist/avg/ss.yaml diff --git a/federatedscope/example_configs/femnist/hpo_ss_fedex.yaml b/scripts/example_configs/femnist/hpo_ss_fedex.yaml similarity index 100% rename from federatedscope/example_configs/femnist/hpo_ss_fedex.yaml rename to scripts/example_configs/femnist/hpo_ss_fedex.yaml diff --git a/federatedscope/example_configs/femnist/hpo_ss_fedex_arm.yaml b/scripts/example_configs/femnist/hpo_ss_fedex_arm.yaml similarity index 100% rename from federatedscope/example_configs/femnist/hpo_ss_fedex_arm.yaml rename to scripts/example_configs/femnist/hpo_ss_fedex_arm.yaml diff --git a/federatedscope/example_configs/femnist/hpo_ss_fedex_arm_table.yaml b/scripts/example_configs/femnist/hpo_ss_fedex_arm_table.yaml similarity index 100% rename from federatedscope/example_configs/femnist/hpo_ss_fedex_arm_table.yaml rename to scripts/example_configs/femnist/hpo_ss_fedex_arm_table.yaml diff --git a/federatedscope/example_configs/femnist/hpo_ss_fedex_grid.yaml b/scripts/example_configs/femnist/hpo_ss_fedex_grid.yaml similarity index 100% rename from federatedscope/example_configs/femnist/hpo_ss_fedex_grid.yaml rename to scripts/example_configs/femnist/hpo_ss_fedex_grid.yaml diff --git a/federatedscope/example_configs/femnist/hpo_ss_sha.yaml b/scripts/example_configs/femnist/hpo_ss_sha.yaml similarity index 100% rename from federatedscope/example_configs/femnist/hpo_ss_sha.yaml rename to scripts/example_configs/femnist/hpo_ss_sha.yaml diff --git a/scripts/example_configs/femnist/run.sh b/scripts/example_configs/femnist/run.sh new file mode 100644 index 000000000..803e70cc9 --- /dev/null +++ b/scripts/example_configs/femnist/run.sh @@ -0,0 +1,8 @@ +# SHA +python hpo.py --cfg scripts/example_configs/femnist/sha.yaml + +# SHA wrap FedEX (FedEX related param) +python hpo.py --cfg scripts/example_configs/femnist/sha_wrap_fedex.yaml + +# SHA wrap FedEX (arm) +python hpo.py --cfg scripts/example_configs/femnist/sha_wrap_fedex_arm.yaml \ No newline at end of file diff --git a/federatedscope/example_configs/femnist/sha.yaml b/scripts/example_configs/femnist/sha.yaml similarity index 93% rename from federatedscope/example_configs/femnist/sha.yaml rename to scripts/example_configs/femnist/sha.yaml index b7f380166..2207777a9 100644 --- a/federatedscope/example_configs/femnist/sha.yaml +++ b/scripts/example_configs/femnist/sha.yaml @@ -43,7 +43,7 @@ hpo: scheduler: sha num_workers: 0 init_cand_num: 27 - ss: 'federatedscope/example_configs/femnist/hpo_ss_sha.yaml' + ss: 'scripts/example_configs/femnist/hpo_ss_sha.yaml' sha: budgets: [12, 13, 19] metric: 'client_summarized_weighted_avg.val_avg_loss' diff --git a/federatedscope/example_configs/femnist/sha_wrap_fedex.yaml b/scripts/example_configs/femnist/sha_wrap_fedex.yaml similarity index 87% rename from federatedscope/example_configs/femnist/sha_wrap_fedex.yaml rename to scripts/example_configs/femnist/sha_wrap_fedex.yaml index 808bc515e..56d3602a3 100644 --- a/federatedscope/example_configs/femnist/sha_wrap_fedex.yaml +++ b/scripts/example_configs/femnist/sha_wrap_fedex.yaml @@ -43,10 +43,10 @@ hpo: scheduler: sha num_workers: 0 init_cand_num: 81 - ss: 'federatedscope/example_configs/femnist/hpo_ss_fedex.yaml' + ss: 'scripts/example_configs/femnist/hpo_ss_fedex.yaml' sha: budgets: [2, 4, 12, 36] fedex: use: True - ss: 'federatedscope/example_configs/femnist/hpo_ss_fedex_grid.yaml' + ss: 'scripts/example_configs/femnist/hpo_ss_fedex_grid.yaml' metric: 'client_summarized_weighted_avg.val_avg_loss' diff --git a/federatedscope/example_configs/femnist_global_train.yaml b/scripts/example_configs/femnist_global_train.yaml similarity index 100% rename from federatedscope/example_configs/femnist_global_train.yaml rename to scripts/example_configs/femnist_global_train.yaml diff --git a/federatedscope/example_configs/openml_lr.yaml b/scripts/example_configs/openml_lr.yaml similarity index 100% rename from federatedscope/example_configs/openml_lr.yaml rename to scripts/example_configs/openml_lr.yaml diff --git a/federatedscope/example_configs/quadratic.yaml b/scripts/example_configs/quadratic.yaml similarity index 100% rename from federatedscope/example_configs/quadratic.yaml rename to scripts/example_configs/quadratic.yaml diff --git a/federatedscope/example_configs/quadratic_clientwise.yaml b/scripts/example_configs/quadratic_clientwise.yaml similarity index 100% rename from federatedscope/example_configs/quadratic_clientwise.yaml rename to scripts/example_configs/quadratic_clientwise.yaml diff --git a/federatedscope/example_configs/sha_wrap_fedex.yaml b/scripts/example_configs/sha_wrap_fedex.yaml similarity index 66% rename from federatedscope/example_configs/sha_wrap_fedex.yaml rename to scripts/example_configs/sha_wrap_fedex.yaml index 8ca271af1..5bf9240c0 100644 --- a/federatedscope/example_configs/sha_wrap_fedex.yaml +++ b/scripts/example_configs/sha_wrap_fedex.yaml @@ -20,11 +20,11 @@ hpo: scheduler: sha num_workers: 1 init_cand_num: 5 - ss: federatedscope/example_configs/sha_wrap_fedex_ss.yaml + ss: scripts/example_configs/sha_wrap_fedex_ss.yaml sha: budgets: [2, 4] fedex: use: True - ss: 'federatedscope/example_configs/fedex_flat_search_space.yaml' -# ss: 'federatedscope/example_configs/fedex_grid_search_space.yaml' + ss: 'scripts/example_configs/fedex_flat_search_space.yaml' +# ss: 'scripts/example_configs/fedex_grid_search_space.yaml' diff: True diff --git a/federatedscope/example_configs/sha_wrap_fedex_arm.yaml b/scripts/example_configs/sha_wrap_fedex_arm.yaml similarity index 86% rename from federatedscope/example_configs/sha_wrap_fedex_arm.yaml rename to scripts/example_configs/sha_wrap_fedex_arm.yaml index b534988a5..8fdda9d2b 100644 --- a/federatedscope/example_configs/sha_wrap_fedex_arm.yaml +++ b/scripts/example_configs/sha_wrap_fedex_arm.yaml @@ -23,7 +23,7 @@ hpo: #num_workers: 1 num_workers: 0 init_cand_num: 5 - ss: 'federatedscope/example_configs/sha_wrap_fedex_ss_table.yaml' + ss: 'scripts/example_configs/sha_wrap_fedex_ss_table.yaml' table: num: 4 sha: diff --git a/federatedscope/example_configs/sha_wrap_fedex_ss.yaml b/scripts/example_configs/sha_wrap_fedex_ss.yaml similarity index 100% rename from federatedscope/example_configs/sha_wrap_fedex_ss.yaml rename to scripts/example_configs/sha_wrap_fedex_ss.yaml diff --git a/federatedscope/example_configs/sha_wrap_fedex_ss_table.yaml b/scripts/example_configs/sha_wrap_fedex_ss_table.yaml similarity index 100% rename from federatedscope/example_configs/sha_wrap_fedex_ss_table.yaml rename to scripts/example_configs/sha_wrap_fedex_ss_table.yaml diff --git a/federatedscope/example_configs/single_process.yaml b/scripts/example_configs/single_process.yaml similarity index 100% rename from federatedscope/example_configs/single_process.yaml rename to scripts/example_configs/single_process.yaml diff --git a/federatedscope/example_configs/toy_hpo_ss.yaml b/scripts/example_configs/toy_hpo_ss.yaml similarity index 100% rename from federatedscope/example_configs/toy_hpo_ss.yaml rename to scripts/example_configs/toy_hpo_ss.yaml diff --git a/federatedscope/example_configs/toy_rs.yaml b/scripts/example_configs/toy_rs.yaml similarity index 81% rename from federatedscope/example_configs/toy_rs.yaml rename to scripts/example_configs/toy_rs.yaml index 4a27d5121..dbc6fe433 100644 --- a/federatedscope/example_configs/toy_rs.yaml +++ b/scripts/example_configs/toy_rs.yaml @@ -15,4 +15,4 @@ data: hpo: num_workers: 3 init_cand_num: 3 - ss: federatedscope/example_configs/toy_hpo_ss.yaml + ss: scripts/example_configs/toy_hpo_ss.yaml diff --git a/federatedscope/example_configs/toy_sha.yaml b/scripts/example_configs/toy_sha.yaml similarity index 84% rename from federatedscope/example_configs/toy_sha.yaml rename to scripts/example_configs/toy_sha.yaml index 0aa8d0c32..ed72cc924 100644 --- a/federatedscope/example_configs/toy_sha.yaml +++ b/scripts/example_configs/toy_sha.yaml @@ -17,6 +17,6 @@ hpo: scheduler: sha num_workers: 0 init_cand_num: 5 - ss: federatedscope/example_configs/toy_hpo_ss.yaml + ss: scripts/example_configs/toy_hpo_ss.yaml sha: budgets: [1, 1] diff --git a/scripts/run_distributed_lr.sh b/scripts/run_distributed_lr.sh deleted file mode 100755 index 864a5da4a..000000000 --- a/scripts/run_distributed_lr.sh +++ /dev/null @@ -1,20 +0,0 @@ -set -e - -echo "Test distributed mode with LR..." - -echo "Data generation" -python scripts/gen_data.py - -### server owns global test data -python federatedscope/main.py --cfg federatedscope/example_configs/distributed_server.yaml & -### server doesn't own data -# python federatedscope/main.py --cfg federatedscope/example_configs/distributed_server_no_data.yaml & -sleep 2 - -# clients -python federatedscope/main.py --cfg federatedscope/example_configs/distributed_client_1.yaml & -sleep 2 -python federatedscope/main.py --cfg federatedscope/example_configs/distributed_client_2.yaml & -sleep 2 -python federatedscope/main.py --cfg federatedscope/example_configs/distributed_client_3.yaml & - diff --git a/tests/test_efficient_simulation.py b/tests/test_efficient_simulation.py index f6f332374..e90b8cf21 100644 --- a/tests/test_efficient_simulation.py +++ b/tests/test_efficient_simulation.py @@ -14,8 +14,7 @@ def setUp(self): def test_toy_example_standalone_cmp_sim_impl(self): case_cfg = global_cfg.clone() - case_cfg.merge_from_file( - 'federatedscope/example_configs/single_process.yaml') + case_cfg.merge_from_file('scripts/example_configs/single_process.yaml') setup_seed(case_cfg.seed) update_logger(case_cfg) diff --git a/tests/test_yaml.py b/tests/test_yaml.py index d320a9ee4..ff0570377 100644 --- a/tests/test_yaml.py +++ b/tests/test_yaml.py @@ -10,9 +10,7 @@ class YAMLTest(unittest.TestCase): def setUp(self): - self.exclude_all = [ - 'benchmark', 'scripts', 'federatedscope/example_configs' - ] + self.exclude_all = ['benchmark', 'scripts'] self.exclude_file = [ '.pre-commit-config.yaml', 'meta.yaml', 'federatedscope/gfl/baseline/isolated_gin_minibatch_on_cikmcup_per_client.yaml',