Skip to content

Commit

Permalink
fix dashbord
Browse files Browse the repository at this point in the history
  • Loading branch information
Wrede committed Aug 16, 2023
1 parent 0c073b9 commit 9cd551f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions fedn/fedn/network/controller/controlbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ def get_helper(self):
""" Get a helper instance from global config.
:return: Helper instance.
:rtype: :class:`fedn.utils.plugins.helperbase.HelperBase`
"""
helper_type = self.statestore.get_helper()
helper = fedn.utils.helpers.get_helper(helper_type)
Expand All @@ -91,16 +92,18 @@ def get_helper(self):
return helper

def get_state(self):
"""
""" Get the current state of the controller.
:return:
:return: The current state.
:rtype: :class:`fedn.network.state.ReducerState`
"""
return self._state

def idle(self):
"""
""" Check if the controller is idle.
:return:
:return: True if idle, False otherwise.
:rtype: bool
"""
if self._state == ReducerState.idle:
return True
Expand Down
2 changes: 1 addition & 1 deletion fedn/fedn/network/dashboard/restservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ def control():
seed_model_id = None
latest_model_id = None
try:
seed_model_id = self.control.get_first_model()
seed_model_id = self.statestore.get_initial_model()
latest_model_id = self.statestore.get_latest_model()
except Exception:
pass
Expand Down

0 comments on commit 9cd551f

Please sign in to comment.