Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Refactor FedRunner, optimize trainer module and optimize CI #415

Merged
merged 22 commits into from
Nov 16, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix minor bugs in test
  • Loading branch information
rayrayraykk committed Oct 31, 2022
commit ab4ccb655f62285b18303f623e7a3335c7576816
2 changes: 1 addition & 1 deletion tests/test_CRA_gan_attack.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from federatedscope.core.auxiliaries.utils import setup_seed
from federatedscope.core.auxiliaries.logging import update_logger
from federatedscope.core.configs.config import global_cfg
from federatedscope.core.fed_runner import get_runner
from federatedscope.core.auxiliaries.runner_builder import get_runner
from federatedscope.core.auxiliaries.worker_builder import get_server_cls, get_client_cls


Expand Down
2 changes: 1 addition & 1 deletion tests/test_MIA_gradient_ascent.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from federatedscope.core.auxiliaries.utils import setup_seed
from federatedscope.core.auxiliaries.logging import update_logger
from federatedscope.core.configs.config import global_cfg
from federatedscope.core.fed_runner import get_runner
from federatedscope.core.auxiliaries.runner_builder import get_runner
from federatedscope.core.auxiliaries.worker_builder import get_server_cls, get_client_cls


Expand Down
2 changes: 1 addition & 1 deletion tests/test_PIA_toy.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from federatedscope.core.auxiliaries.utils import setup_seed
from federatedscope.core.auxiliaries.logging import update_logger
from federatedscope.core.configs.config import global_cfg
from federatedscope.core.fed_runner import get_runner
from federatedscope.core.auxiliaries.runner_builder import get_runner
from federatedscope.core.auxiliaries.worker_builder import get_server_cls, get_client_cls


Expand Down
2 changes: 1 addition & 1 deletion tests/test_asyn_cifar10.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from federatedscope.core.auxiliaries.utils import setup_seed
from federatedscope.core.auxiliaries.logging import update_logger
from federatedscope.core.configs.config import global_cfg
from federatedscope.core.fed_runner import get_runner
from federatedscope.core.auxiliaries.runner_builder import get_runner
from federatedscope.core.auxiliaries.worker_builder import get_server_cls, get_client_cls


Expand Down
2 changes: 1 addition & 1 deletion tests/test_backdoor_attack.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from federatedscope.core.auxiliaries.utils import setup_seed
from federatedscope.core.auxiliaries.logging import update_logger
from federatedscope.core.configs.config import global_cfg
from federatedscope.core.fed_runner import get_runner
from federatedscope.core.auxiliaries.runner_builder import get_runner
from federatedscope.core.auxiliaries.worker_builder import get_server_cls, get_client_cls


Expand Down
2 changes: 1 addition & 1 deletion tests/test_ditto.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from federatedscope.core.auxiliaries.utils import setup_seed
from federatedscope.core.auxiliaries.logging import update_logger
from federatedscope.core.configs.config import global_cfg
from federatedscope.core.fed_runner import get_runner
from federatedscope.core.auxiliaries.runner_builder import get_runner
from federatedscope.core.auxiliaries.worker_builder import get_server_cls, get_client_cls


Expand Down
2 changes: 1 addition & 1 deletion tests/test_efficient_simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from federatedscope.core.auxiliaries.utils import setup_seed
from federatedscope.core.auxiliaries.logging import update_logger
from federatedscope.core.configs.config import global_cfg
from federatedscope.core.fed_runner import get_runner
from federatedscope.core.auxiliaries.runner_builder import get_runner
from federatedscope.core.auxiliaries.worker_builder import get_server_cls, get_client_cls


Expand Down
2 changes: 1 addition & 1 deletion tests/test_external_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from federatedscope.core.auxiliaries.utils import setup_seed
from federatedscope.core.auxiliaries.logging import update_logger
from federatedscope.core.configs.config import global_cfg
from federatedscope.core.fed_runner import get_runner
from federatedscope.core.auxiliaries.runner_builder import get_runner
from federatedscope.core.auxiliaries.worker_builder import get_server_cls, get_client_cls


Expand Down
2 changes: 1 addition & 1 deletion tests/test_fedem.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from federatedscope.core.auxiliaries.utils import setup_seed
from federatedscope.core.auxiliaries.logging import update_logger
from federatedscope.core.configs.config import global_cfg
from federatedscope.core.fed_runner import get_runner
from federatedscope.core.auxiliaries.runner_builder import get_runner
from federatedscope.core.auxiliaries.worker_builder import get_server_cls, get_client_cls


Expand Down
2 changes: 1 addition & 1 deletion tests/test_fedopt.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from federatedscope.core.auxiliaries.utils import setup_seed
from federatedscope.core.auxiliaries.logging import update_logger
from federatedscope.core.configs.config import global_cfg
from federatedscope.core.fed_runner import get_runner
from federatedscope.core.auxiliaries.runner_builder import get_runner
from federatedscope.core.auxiliaries.worker_builder import get_server_cls, get_client_cls


Expand Down
2 changes: 1 addition & 1 deletion tests/test_fedprox.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from federatedscope.core.auxiliaries.utils import setup_seed
from federatedscope.core.auxiliaries.logging import update_logger
from federatedscope.core.configs.config import global_cfg
from federatedscope.core.fed_runner import get_runner
from federatedscope.core.auxiliaries.runner_builder import get_runner
from federatedscope.core.auxiliaries.worker_builder import get_server_cls, get_client_cls


Expand Down
2 changes: 1 addition & 1 deletion tests/test_fedsageplus.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from federatedscope.core.auxiliaries.utils import setup_seed
from federatedscope.core.auxiliaries.logging import update_logger
from federatedscope.core.configs.config import global_cfg
from federatedscope.core.fed_runner import get_runner
from federatedscope.core.auxiliaries.runner_builder import get_runner
from federatedscope.core.auxiliaries.worker_builder import get_server_cls, get_client_cls


Expand Down
2 changes: 1 addition & 1 deletion tests/test_femnist.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from federatedscope.core.auxiliaries.utils import setup_seed
from federatedscope.core.auxiliaries.logging import update_logger
from federatedscope.core.configs.config import global_cfg
from federatedscope.core.fed_runner import get_runner
from federatedscope.core.auxiliaries.runner_builder import get_runner
from federatedscope.core.auxiliaries.worker_builder import get_server_cls, get_client_cls

SAMPLE_CLIENT_NUM = 5
Expand Down
2 changes: 1 addition & 1 deletion tests/test_finetune_lr.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from federatedscope.core.auxiliaries.utils import setup_seed
from federatedscope.core.auxiliaries.logging import update_logger
from federatedscope.core.configs.config import global_cfg
from federatedscope.core.fed_runner import get_runner
from federatedscope.core.auxiliaries.runner_builder import get_runner
from federatedscope.core.auxiliaries.worker_builder import get_server_cls, get_client_cls


Expand Down
2 changes: 1 addition & 1 deletion tests/test_global_train_lr.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from federatedscope.core.auxiliaries.utils import setup_seed
from federatedscope.core.auxiliaries.logging import update_logger
from federatedscope.core.configs.config import global_cfg
from federatedscope.core.fed_runner import get_runner
from federatedscope.core.auxiliaries.runner_builder import get_runner
from federatedscope.core.auxiliaries.worker_builder import get_server_cls, get_client_cls


Expand Down
2 changes: 1 addition & 1 deletion tests/test_graph_node_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from federatedscope.core.auxiliaries.utils import setup_seed
from federatedscope.core.auxiliaries.logging import update_logger
from federatedscope.core.configs.config import global_cfg
from federatedscope.core.fed_runner import get_runner
from federatedscope.core.auxiliaries.runner_builder import get_runner
from federatedscope.core.auxiliaries.worker_builder import get_server_cls, get_client_cls


Expand Down
2 changes: 1 addition & 1 deletion tests/test_local_train_lr.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from federatedscope.core.auxiliaries.utils import setup_seed
from federatedscope.core.auxiliaries.logging import update_logger
from federatedscope.core.configs.config import global_cfg
from federatedscope.core.fed_runner import get_runner
from federatedscope.core.auxiliaries.runner_builder import get_runner
from federatedscope.core.auxiliaries.worker_builder import get_server_cls, \
get_client_cls

Expand Down
2 changes: 1 addition & 1 deletion tests/test_mf.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from federatedscope.core.auxiliaries.utils import setup_seed
from federatedscope.core.auxiliaries.logging import update_logger
from federatedscope.core.configs.config import global_cfg
from federatedscope.core.fed_runner import get_runner
from federatedscope.core.auxiliaries.runner_builder import get_runner
from federatedscope.core.auxiliaries.worker_builder import get_server_cls, get_client_cls


Expand Down
2 changes: 1 addition & 1 deletion tests/test_nbafl.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from federatedscope.core.auxiliaries.utils import setup_seed
from federatedscope.core.auxiliaries.logging import update_logger
from federatedscope.core.configs.config import global_cfg
from federatedscope.core.fed_runner import get_runner
from federatedscope.core.auxiliaries.runner_builder import get_runner
from federatedscope.core.auxiliaries.worker_builder import get_server_cls, get_client_cls


Expand Down
2 changes: 1 addition & 1 deletion tests/test_optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from federatedscope.core.auxiliaries.utils import setup_seed
from federatedscope.core.auxiliaries.logging import update_logger
from federatedscope.core.configs.config import global_cfg
from federatedscope.core.fed_runner import get_runner
from federatedscope.core.auxiliaries.runner_builder import get_runner
from federatedscope.core.auxiliaries.worker_builder import get_server_cls, get_client_cls


Expand Down
2 changes: 1 addition & 1 deletion tests/test_pfedme.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from federatedscope.core.auxiliaries.utils import setup_seed
from federatedscope.core.auxiliaries.logging import update_logger
from federatedscope.core.configs.config import global_cfg
from federatedscope.core.fed_runner import get_runner
from federatedscope.core.auxiliaries.runner_builder import get_runner
from federatedscope.core.auxiliaries.worker_builder import get_server_cls, get_client_cls


Expand Down
2 changes: 1 addition & 1 deletion tests/test_rec_IG_opt_attack.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from federatedscope.core.auxiliaries.utils import setup_seed
from federatedscope.core.auxiliaries.logging import update_logger
from federatedscope.core.configs.config import global_cfg
from federatedscope.core.fed_runner import get_runner
from federatedscope.core.auxiliaries.runner_builder import get_runner
from federatedscope.core.auxiliaries.worker_builder import get_server_cls, get_client_cls


Expand Down
2 changes: 1 addition & 1 deletion tests/test_rec_opt_attack.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from federatedscope.core.auxiliaries.utils import setup_seed
from federatedscope.core.auxiliaries.logging import update_logger
from federatedscope.core.configs.config import global_cfg
from federatedscope.core.fed_runner import get_runner
from federatedscope.core.auxiliaries.runner_builder import get_runner
from federatedscope.core.auxiliaries.worker_builder import get_server_cls, get_client_cls


Expand Down
2 changes: 1 addition & 1 deletion tests/test_toy_lr.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from federatedscope.core.auxiliaries.utils import setup_seed
from federatedscope.core.auxiliaries.logging import update_logger
from federatedscope.core.configs.config import global_cfg
from federatedscope.core.fed_runner import get_runner
from federatedscope.core.auxiliaries.runner_builder import get_runner
from federatedscope.core.auxiliaries.worker_builder import get_server_cls, get_client_cls


Expand Down
2 changes: 1 addition & 1 deletion tests/test_unseen_clients_lr.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from federatedscope.core.auxiliaries.utils import setup_seed
from federatedscope.core.auxiliaries.logging import update_logger
from federatedscope.core.configs.config import global_cfg
from federatedscope.core.fed_runner import get_runner
from federatedscope.core.auxiliaries.runner_builder import get_runner
from federatedscope.core.auxiliaries.worker_builder import get_server_cls, get_client_cls


Expand Down
2 changes: 1 addition & 1 deletion tests/test_vertical_fl.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from federatedscope.core.auxiliaries.utils import setup_seed
from federatedscope.core.auxiliaries.logging import update_logger
from federatedscope.core.configs.config import global_cfg
from federatedscope.core.fed_runner import get_runner
from federatedscope.core.auxiliaries.runner_builder import get_runner


class vFLTest(unittest.TestCase):
Expand Down