Skip to content

Commit

Permalink
Merge pull request #276 from VectorInstitute/nnunet-checkpointing-fix
Browse files Browse the repository at this point in the history
Fix typing on assertion for ReportsManager
  • Loading branch information
jewelltaylor authored Nov 1, 2024
2 parents a2a21bc + efd7802 commit 86430b4
Showing 1 changed file with 2 additions and 1 deletion.
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

0 comments on commit 86430b4

Please sign in to comment.