From 749d4e55d1e70ce22119e7db3915d13aab1869a0 Mon Sep 17 00:00:00 2001 From: Charles Beauville Date: Tue, 16 Jul 2024 21:16:37 +0200 Subject: [PATCH] fix(framework:skip) Fix TOML fields renaming (#3818) --- src/py/flwr/cli/run/run.py | 4 ++-- src/py/flwr/client/supernode/app.py | 2 +- src/py/flwr/server/run_serverapp.py | 2 +- src/py/flwr/superexec/simulation.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/py/flwr/cli/run/run.py b/src/py/flwr/cli/run/run.py index 512da83d13fe..288cf0838a52 100644 --- a/src/py/flwr/cli/run/run.py +++ b/src/py/flwr/cli/run/run.py @@ -171,8 +171,8 @@ def on_channel_state_change(channel_connectivity: str) -> None: def _run_without_superexec( config: Dict[str, Any], federation: Dict[str, Any], federation_name: str ) -> None: - server_app_ref = config["tool"]["flwr"]["components"]["serverapp"] - client_app_ref = config["tool"]["flwr"]["components"]["clientapp"] + server_app_ref = config["tool"]["flwr"]["app"]["components"]["serverapp"] + client_app_ref = config["tool"]["flwr"]["app"]["components"]["clientapp"] try: num_supernodes = federation["options"]["num-supernodes"] diff --git a/src/py/flwr/client/supernode/app.py b/src/py/flwr/client/supernode/app.py index a364318c766c..0ef0a145b1b6 100644 --- a/src/py/flwr/client/supernode/app.py +++ b/src/py/flwr/client/supernode/app.py @@ -248,7 +248,7 @@ def _load(fab_id: str, fab_version: str) -> ClientApp: dir_path = Path(project_dir).absolute() # Set app reference - client_app_ref = config["tool"]["flwr"]["components"]["clientapp"] + client_app_ref = config["tool"]["flwr"]["app"]["components"]["clientapp"] # Set sys.path nonlocal inserted_path diff --git a/src/py/flwr/server/run_serverapp.py b/src/py/flwr/server/run_serverapp.py index efaba24f05f9..0169946e237d 100644 --- a/src/py/flwr/server/run_serverapp.py +++ b/src/py/flwr/server/run_serverapp.py @@ -186,7 +186,7 @@ def run_server_app() -> None: # pylint: disable=too-many-branches run_ = driver.run server_app_dir = str(get_project_dir(run_.fab_id, run_.fab_version, flwr_dir)) config = get_project_config(server_app_dir) - server_app_attr = config["tool"]["flwr"]["components"]["serverapp"] + server_app_attr = config["tool"]["flwr"]["app"]["components"]["serverapp"] server_app_run_config = get_fused_config(run_, flwr_dir) else: # User provided `server-app`, but not `--run-id` diff --git a/src/py/flwr/superexec/simulation.py b/src/py/flwr/superexec/simulation.py index fa7a8ad9b0d3..e71e39e38e36 100644 --- a/src/py/flwr/superexec/simulation.py +++ b/src/py/flwr/superexec/simulation.py @@ -112,7 +112,7 @@ def start_run( ) # Get ClientApp and SeverApp components - flower_components = config["tool"]["flwr"]["components"] + flower_components = config["tool"]["flwr"]["app"]["components"] clientapp = flower_components["clientapp"] serverapp = flower_components["serverapp"]