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

Fix typing on assertion for ReportsManager #276

Merged
merged 1 commit into from
Nov 1, 2024
Merged
Changes from all commits
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
3 changes: 2 additions & 1 deletion fl4health/server/nnunet_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from fl4health.checkpointing.checkpointer import TorchCheckpointer
from fl4health.parameter_exchange.parameter_exchanger_base import ParameterExchanger
from fl4health.reporting.base_reporter import BaseReporter
from fl4health.reporting.reports_manager import ReportsManager
from fl4health.server.base_server import FlServerWithCheckpointing, FlServerWithInitializer
from fl4health.utils.config import narrow_dict_type, narrow_dict_type_and_set_attribute
from fl4health.utils.nnunet_utils import NnunetConfig
Expand Down Expand Up @@ -285,7 +286,7 @@ def load_server_state(self) -> None:
# Standard attributes to load
narrow_dict_type_and_set_attribute(self, ckpt, "current_round", "current_round", int)
narrow_dict_type_and_set_attribute(self, ckpt, "server_name", "server_name", str)
narrow_dict_type_and_set_attribute(self, ckpt, "reports_manager", "reports_manager", list)
narrow_dict_type_and_set_attribute(self, ckpt, "reports_manager", "reports_manager", ReportsManager)
narrow_dict_type_and_set_attribute(self, ckpt, "history", "history", History)
narrow_dict_type_and_set_attribute(self, ckpt, "model", "parameters", nn.Module, func=get_all_model_parameters)
# Needed for when _hydrate_model_for_checkpointing is called
Expand Down