-
Notifications
You must be signed in to change notification settings - Fork 266
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reduce
_generate_checkpoint_and_upkeep
code complexity (#783)
Summary: Pull Request resolved: #783 The function _generate_checkpoint_and_upkeep is important for the checkpointing logic. But it has a linter warning indicating that it is too complex, and a there is a TODO to extract some logic into a separate function. Let's do a small refactor to improve readability and reduce function complexity, but avoid breaking changes or regressions. **Potential Future Changes** Note that while doing this change, I found two small bugs that we can fix. They are documented in this Bento notebook: https://fburl.com/anp/gqoezved I did not fix any of them here to avoid having a refactor + logic changes. Additionally, there is this user request that we can handle in this function. Again it was not modified here but we can decide what to do and change later: https://fb.workplace.com/groups/cu.training.framework.users/permalink/1147131179616886/ Reviewed By: galrotem Differential Revision: D55881050 fbshipit-source-id: 46d0777a2dc5208763628fecdac8c12a5573e407
- Loading branch information
1 parent
fd78425
commit 05d1458
Showing
2 changed files
with
116 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters