Skip to content

Move sync code from step result to lightning module [6/n] #7651

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 24, 2021

Conversation

carmocca
Copy link
Contributor

What does this PR do?

  • Group sync code into function
  • Move it out to the LightningModule so we avoid passing all the sync arguments.

Part of #7183

Before submitting

  • Was this discussed/approved via a GitHub issue? (not for typos and docs)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • [n/a] Did you make sure to update the documentation with your changes? (if necessary)
  • [n/a] Did you write any new necessary tests? (not for typos and docs)
  • Did you verify new and existing tests pass locally with your changes?
  • [n/a] Did you update the CHANGELOG? (not for typos, docs, test updates, or internal minor changes/refactorings)

PR review

  • Is this pull request ready for review? (if not, please submit in draft mode)
  • Check that all items from Before submitting are resolved
  • Make sure the title is self-explanatory and the description concisely explains the PR
  • Add labels and milestones (and optionally projects) to the PR so it can be classified

@carmocca carmocca added this to the v1.4 milestone May 22, 2021
@carmocca carmocca self-assigned this May 22, 2021
@carmocca carmocca requested a review from williamFalcon as a code owner May 22, 2021 00:57
@codecov
Copy link

codecov bot commented May 22, 2021

Codecov Report

Merging #7651 (637fc3f) into master (110e49d) will increase coverage by 0%.
The diff coverage is 94%.

@@          Coverage Diff           @@
##           master   #7651   +/-   ##
======================================
  Coverage      92%     92%           
======================================
  Files         198     198           
  Lines       12809   12842   +33     
======================================
+ Hits        11810   11842   +32     
- Misses        999    1000    +1     

Comment on lines +412 to +413
@staticmethod
def __sync(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not move this out of the LighningModule completely to a utilities file?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think other places might use it?
Do you have an idea of where it would fit better?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it could be part of #7534

But this is definitely not a blocker for this refactoring

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, feel free to include it when that's done

@kaushikb11 kaushikb11 enabled auto-merge (squash) May 23, 2021 16:41
@carmocca carmocca added the ready PRs ready to be merged label May 24, 2021
Copy link
Contributor

@tchaton tchaton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM !

@kaushikb11 kaushikb11 merged commit 2103b5e into master May 24, 2021
@kaushikb11 kaushikb11 deleted the refactor/logger-connector-6 branch May 24, 2021 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready PRs ready to be merged refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants