Skip to content

Commit

Permalink
While taking aggregator step remove private attributes before taking …
Browse files Browse the repository at this point in the history
…checkpoint and set it back to ctx after checkpoint

Signed-off-by: Parth Mandaliya <parthx.mandaliya@intel.com>
  • Loading branch information
ParthM-GitHub committed Sep 28, 2023
1 parent 8b64790 commit 9cc04a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions openfl/experimental/component/aggregator/aggregator.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,11 +331,11 @@ def do_task(self, f_name: str) -> Any:
# TODO: Try to remove this else
else: f()

self.__delete_agg_attrs_from_clone(self.flow, "Private attributes: Not Available.")
# Take the checkpoint of executed step
# TODO: Think of different approach than deep-copying the
# flow object.
self.call_checkpoint(deepcopy(self.flow), f,
reserved_attributes=list(self.__private_attrs.keys()))
self.__set_attributes_to_clone(self.flow)

# Next function in the flow
_, f, parent_func = self.flow.execute_task_args[:3]
Expand Down

0 comments on commit 9cc04a4

Please sign in to comment.