openfl icon indicating copy to clipboard operation
openfl copied to clipboard

Remove recursion from LocalRuntime during execution of FLFlow steps

Open KeertiX opened this issue 2 years ago • 0 comments

TITLE: Remove recursion from LocalRuntime during execution of FLFlow steps

SUMMARY OF CHANGES: Currently FLFlow steps are executed in a nested manner. This PR attemppts to remove recursion from LocalRuntime, following approach is followed:

  1. call start()
  2. call execute_task - Function is executed till flow ends and arguments to execute the next step are updated by the FLSpec.next() method - This method is now split into 3 parts based on type of steps being executed:
    • execute_foreach_task: For executing collaborator steps
    • execute_agg_task: For executing aggregator steps
    • execute_end_task: For executing the last step in the flow

VERIFICATION SUMMARY:

  • Changes verified in Jupyter notebook and python file, with ray and single process backend

NEXT STEPS:

  • Further optimization to avoid serialization of clones in every collaborator step

KeertiX avatar Apr 14 '23 15:04 KeertiX