From 7933bdc810144ab92bfb942637d9ea4eb47e172d Mon Sep 17 00:00:00 2001 From: noopur Date: Tue, 22 Oct 2024 09:23:54 +0000 Subject: [PATCH] Logging fix - No of rounds saved vs started Signed-off-by: noopur --- .github/workflows/pytest_coverage.yml | 3 ++- openfl/component/aggregator/aggregator.py | 9 +++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pytest_coverage.yml b/.github/workflows/pytest_coverage.yml index 32e89ceb69..6d50288ca8 100644 --- a/.github/workflows/pytest_coverage.yml +++ b/.github/workflows/pytest_coverage.yml @@ -1,4 +1,4 @@ -# This workflow will install Python dependencies, run tests and lint with a single version of Python +# This workflow will run code coverage # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions name: Pytest and code coverage @@ -6,6 +6,7 @@ name: Pytest and code coverage on: pull_request: branches: [ develop ] + workflow_dispatch: permissions: contents: read diff --git a/openfl/component/aggregator/aggregator.py b/openfl/component/aggregator/aggregator.py index 81d3e7411a..0ec816276b 100644 --- a/openfl/component/aggregator/aggregator.py +++ b/openfl/component/aggregator/aggregator.py @@ -968,16 +968,17 @@ def _end_of_round_check(self): # Once all of the task results have been processed self._end_of_round_check_done[self.round_number] = True + + # Save the latest model + self.logger.info("Saving round %s model...", self.round_number) + self._save_model(self.round_number, self.last_state_path) + self.round_number += 1 # resetting stragglers for task for a new round self.stragglers = [] # resetting collaborators_done for next round self.collaborators_done = [] - # Save the latest model - self.logger.info("Saving round %s model...", self.round_number) - self._save_model(self.round_number, self.last_state_path) - # TODO This needs to be fixed! if self._time_to_quit(): self.logger.info("Experiment Completed. Cleaning up...")