Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updates to straggler handling functionality (securefederatedai#996)
* v1.0 straggler handling added Signed-off-by: Parth Mandaliya <[email protected]> * Added start_straggler_cutoff_timer abstract function in StragglerHandlingFunction abstract class. Renamed start_timer and __timer_expired functions to start_straggler_cutoff_timer and _straggler_cutoff_time_elapsed respectively. Added docstring to both functions mentioned above. Signed-off-by: Parth Mandaliya <[email protected]> * Updated logs straggler handling in aggregator.py. If one or more collaborator(s) does not even 1 task results in time, all tasks results sent by that collaborator is excluded from aggregation. Signed-off-by: Parth Mandaliya <[email protected]> * Only time based straggler handling policies require timer thread, removing start_straggler_cutoff_timer function from parent class StragglerHandlingFunction Signed-off-by: Parth Mandaliya <[email protected]> * Find all unfinished tasks and straggler collaborators Signed-off-by: Parth Mandaliya <[email protected]> * Review comments incorporated Signed-off-by: Parth Mandaliya <[email protected]> * Added inline comments Signed-off-by: Parth Mandaliya <[email protected]> * Changed logic to keep track of collaborators which have reported results for all tasks Changed straggler handling logs Added docstring for functions in all straggler handling policies Signed-off-by: Parth Mandaliya <[email protected]> * 1. StragglerHandlingFunction: Added an interface method start_policy 2. CutoffTimeBasedStragglerHandling: start_policy method implements a timer to wait for cutoff-time and then call provided call callback method 3. Aggregator: - sendlocaltaskresults: update collaborators_done to keep track of collaborators that have finished ALL tasks - _straggler_cutoff_time_elapsed: call back function that is called after cutoff time has elapsed and applies the straggler policy Signed-off-by: Parth Mandaliya <[email protected]> * Removed logger argument from start_policy & Added logger argument to get_straggler_handling_policy in plan.py Signed-off-by: Parth Mandaliya <[email protected]> * If cutoff time is set to infinite, do not start the timer thread. Signed-off-by: Parth Mandaliya <[email protected]> * Resolved lint issues. Signed-off-by: Parth Mandaliya <[email protected]> * Pytest and code coverage test case failure resolved Signed-off-by: Parth Mandaliya <[email protected]> * Default logger value is set to None Signed-off-by: Parth Mandaliya <[email protected]> * Redesigned percentage based straggler policy. minimum_reporting cannot be set 0 in any straggler policy Signed-off-by: Parth Mandaliya <[email protected]> * Code cleanup Signed-off-by: Parth Mandaliya <[email protected]> * Only collaborators_done are used for aggregation Signed-off-by: Parth Mandaliya <[email protected]> * Internal review comments incorporated Logs updated Logger argument removed from straggler handling policy classes Signed-off-by: Parth Mandaliya <[email protected]> * Resolving potential issues found during testing Signed-off-by: Parth Mandaliya <[email protected]> * Use _collaborator_task_completed method to check if all given tasks to collaborator are completed or not Signed-off-by: Parth Mandaliya <[email protected]> * Few test cases failing issue resolved Signed-off-by: Parth Mandaliya <[email protected]> * Potential issue in aggregator based workflow tutorial resolved Signed-off-by: Parth Mandaliya <[email protected]> * Corner case issue discovered during testing is patched. Signed-off-by: Parth Mandaliya <[email protected]> * Added reset_policy_for_round function in straggler handling policy base class. Signed-off-by: Parth Mandaliya <[email protected]> * This commit includes following changes: 1. In cutoff time based policy after cutoff time expires wait for all collaborators not just minimum required. 2. Irregardless of tasks assigned to collaborators if minimum required collaborators report resultsw in time apply straggler handling policy. Signed-off-by: Parth Mandaliya <[email protected]> * Code cleanup Signed-off-by: Parth Mandaliya <[email protected]> * Logs modified Signed-off-by: Parth Mandaliya <[email protected]> * Review comments on PR incorporated. Signed-off-by: Parth Mandaliya <[email protected]> * Log updated Signed-off-by: Parth Mandaliya <[email protected]> * Condition in straggler_cutoff_check fixed Signed-off-by: Parth Mandaliya <[email protected]> * If straggler cutoff time set to infinite only wait for minimum required collaborators to report results. Signed-off-by: Parth Mandaliya <[email protected]> * If straggler cutoff time is set to infinite wait for ALL collaborators not only for minimum_reporting collaborators Signed-off-by: Parth Mandaliya <[email protected]> * Teodor's review comments and internal review comments incorporated. flake8 issues resovled. Signed-off-by: Parth Mandaliya <[email protected]> * Changed minimum_reporting validation. Merged conditions in straggler_cutoff_check function in CutoffTimeBasedStragglerHandling class. Signed-off-by: Parth Mandaliya <[email protected]> * Resolved all flake8 issues. Signed-off-by: Parth Mandaliya <[email protected]> * Modified single inline comment Signed-off-by: Parth Mandaliya <[email protected]> * Review comments incorporated. Signed-off-by: Parth Mandaliya <[email protected]> * Lint fixes Signed-off-by: Ishant Thakare <[email protected]> * Incorporated Micah's review comments and removed unused code Signed-off-by: Ishant Thakare <[email protected]> * Incorporated Teo's review comments Signed-off-by: Ishant Thakare <[email protected]> * Incorporated review comments & added mutex in aggregator for thread safety Signed-off-by: Ishant Thakare <[email protected]> * Review comments incorporated and updated logs Signed-off-by: Ishant Thakare <[email protected]> * Reverted a comment for Pytest and code coverage fix Signed-off-by: Ishant Thakare <[email protected]> --------- Signed-off-by: Parth Mandaliya <[email protected]> Signed-off-by: Ishant Thakare <[email protected]> Co-authored-by: Ishant Thakare <[email protected]>
- Loading branch information