openfl
openfl copied to clipboard
Remove recursion from LocalRuntime during execution of FLFlow steps
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:
- call start()
- 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