Skip to content

Commit

Permalink
Fixing a few name changes that were left behind in the vscode refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
emersodb committed Nov 19, 2024
1 parent 1697afb commit dca63bc
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
18 changes: 9 additions & 9 deletions fl4health/servers/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Note: This is commented out until logging issues resolved
# Import server classes so that they can be directly imported from fl4health.server
# from fl4health.server.base_server import FlServer, FlServerWithCheckpointing, FlServerWithInitializer
# from fl4health.server.client_level_dp_fed_avg_server import ClientLevelDPFedAvgServer
# from fl4health.server.evaluate_server import EvaluateServer
# from fl4health.server.fedpm_server import FedPmServer
# from fl4health.server.instance_level_dp_server import InstanceLevelDpServer
# from fl4health.server.model_merge_server import ModelMergeServer
# from fl4health.server.nnunet_server import NnunetServer
# from fl4health.server.scaffold_server import ScaffoldServer, DPScaffoldServer
# from fl4health.server.tabular_feature_alignment_server import TabularFeatureAlignmentServer
# from fl4health.servers.base_server import FlServer, FlServerWithCheckpointing, FlServerWithInitializer
# from fl4health.servers.client_level_dp_fed_avg_server import ClientLevelDPFedAvgServer
# from fl4health.servers.evaluate_server import EvaluateServer
# from fl4health.servers.fedpm_server import FedPmServer
# from fl4health.servers.instance_level_dp_server import InstanceLevelDpServer
# from fl4health.servers.model_merge_server import ModelMergeServer
# from fl4health.servers.nnunet_server import NnunetServer
# from fl4health.servers.scaffold_server import ScaffoldServer, DPScaffoldServer
# from fl4health.servers.tabular_feature_alignment_server import TabularFeatureAlignmentServer
6 changes: 3 additions & 3 deletions tests/servers/test_base_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def test_fl_server_with_checkpointing(tmp_path: Path) -> None:
assert torch.equal(updated_model.linear.weight, loaded_model.linear.weight)


@patch("fl4health.server.base_server.Server.fit")
@patch("fl4health.servers.base_server.Server.fit")
@freeze_time("2012-12-12 12:12:12")
def test_metrics_reporter_fit(mock_fit: Mock) -> None:
test_history = History()
Expand Down Expand Up @@ -128,7 +128,7 @@ def test_metrics_reporter_fit(mock_fit: Mock) -> None:
assert len(errors) == 0, f"Metrics check failed. Errors: {errors}, {reporter.metrics}"


@patch("fl4health.server.base_server.Server.fit_round")
@patch("fl4health.servers.base_server.Server.fit_round")
@freeze_time("2012-12-12 12:12:12")
def test_metrics_reporter_fit_round(mock_fit_round: Mock) -> None:
test_round = 2
Expand Down Expand Up @@ -237,7 +237,7 @@ def test_handle_result_aggregation() -> None:
)


@patch("fl4health.server.base_server.FlServer._evaluate_round")
@patch("fl4health.servers.base_server.FlServer._evaluate_round")
@freeze_time("2012-12-12 12:12:12")
def test_metrics_reporter_evaluate_round(mock_evaluate_round: Mock) -> None:
test_round = 2
Expand Down
2 changes: 1 addition & 1 deletion tests/servers/test_evaluate_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from tests.test_utils.assert_metrics_dict import assert_metrics_dict


@patch("fl4health.server.evaluate_server.EvaluateServer.federated_evaluate")
@patch("fl4health.servers.evaluate_server.EvaluateServer.federated_evaluate")
@freeze_time("2012-12-12 12:12:12")
def test_metrics_reporter_fit(mock_federated_evaluate: Mock) -> None:
pass
Expand Down

0 comments on commit dca63bc

Please sign in to comment.