Skip to content

Commit

Permalink
fix merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
SYangster committed Apr 8, 2024
1 parent be0b941 commit 1046f93
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions nvflare/app_common/workflows/model_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,9 @@ def start_controller(self, fl_ctx: FLContext) -> None:

def _build_shareable(self, data: FLModel = None) -> Shareable:
data_shareable: Shareable = FLModelUtils.to_shareable(data)
if not data_shareable.get_header(AppConstants.CURRENT_ROUND):
data_shareable.set_header(AppConstants.CURRENT_ROUND, self._current_round)
if not data_shareable.get_header(AppConstants.NUM_ROUNDS):
data_shareable.set_header(AppConstants.NUM_ROUNDS, self._num_rounds)
data_shareable.add_cookie(AppConstants.CONTRIBUTION_ROUND, self._current_round)
data_shareable.add_cookie(
AppConstants.CONTRIBUTION_ROUND, data_shareable.get_header(AppConstants.CURRENT_ROUND)
)

return data_shareable

Expand Down

0 comments on commit 1046f93

Please sign in to comment.