Skip to content

Conversation

@rohitgr7
Copy link
Contributor

@rohitgr7 rohitgr7 commented Feb 17, 2021

What does this PR do?

Updated the docs for automatic_optimization. It's a LightningModule property now. Added docs for a few more properties. Also, update the automatic_optimization code wherever it's required. Other whitespace changes are made by pre-commit.

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?
  • Did you make sure to update the documentation with your changes? (if necessary)
  • Did you write any new necessary tests? (not for typos and docs)
  • Did you verify new and existing tests pass locally with your changes?
  • Did you update the CHANGELOG? (not for typos, docs, test updates, or internal minor changes/refactorings)

PR review

Anyone in the community is free to review the PR once the tests have passed.
Before you start reviewing make sure you have read Review guidelines. In short, see the following bullet-list:

  • 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

Did you have fun?

Make sure you had fun coding 🙃

@rohitgr7 rohitgr7 added the docs Documentation related label Feb 17, 2021
@rohitgr7 rohitgr7 added this to the 1.2.x milestone Feb 17, 2021
@rohitgr7 rohitgr7 enabled auto-merge (squash) February 17, 2021 18:59
@codecov
Copy link

codecov bot commented Feb 17, 2021

Codecov Report

Merging #6037 (2c2664f) into master (e01446c) will increase coverage by 0%.
The diff coverage is 97%.

@@          Coverage Diff           @@
##           master   #6037   +/-   ##
======================================
  Coverage      93%     93%           
======================================
  Files         160     160           
  Lines       11343   11400   +57     
======================================
+ Hits        10554   10621   +67     
+ Misses        789     779   -10     

def __init__(self):
self.automatic_optimization = False
def training_step(self, batch, batch_idx, optimizer_idx):
Copy link
Contributor

Choose a reason for hiding this comment

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

we should probably also make it so that the opt idx is not even part of the signature when doing manual opt, right? or perhaps it is already like this and just outdated docs.

Copy link
Contributor Author

@rohitgr7 rohitgr7 Feb 17, 2021

Choose a reason for hiding this comment

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

it's not like that in the code too. opt_idx is a part of the signature and agreed it shouldn't be in case of manual_optimization. @tchaton wdys?

@rohitgr7 rohitgr7 requested a review from tchaton February 17, 2021 20:17
@rohitgr7 rohitgr7 requested a review from SkafteNicki February 17, 2021 20:31
Copy link
Collaborator

@SkafteNicki SkafteNicki left a comment

Choose a reason for hiding this comment

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

LGTM

@Borda Borda requested a review from awaelchli February 18, 2021 10:55
@Borda Borda added the ready PRs ready to be merged label Feb 18, 2021
@carmocca carmocca removed the ready PRs ready to be merged label Feb 18, 2021
@Borda Borda added the ready PRs ready to be merged label Feb 18, 2021
@Borda Borda requested a review from carmocca February 18, 2021 14:47
@carmocca carmocca disabled auto-merge February 18, 2021 14:59
@carmocca
Copy link
Contributor

Please, do not merge until all comments are resolved :)

@Borda Borda changed the title Update auto-opt docs Update auto-opt docs [wip] Feb 18, 2021
@rohitgr7 rohitgr7 changed the title Update auto-opt docs [wip] Update auto-opt docs [wip] [skip ci] Feb 18, 2021
@rohitgr7 rohitgr7 changed the title Update auto-opt docs [wip] [skip ci] Update auto-opt docs Feb 18, 2021
@Borda Borda enabled auto-merge (squash) February 18, 2021 19:33
@Borda Borda merged commit b0074a4 into master Feb 18, 2021
@Borda Borda deleted the docs/auto_opt branch February 18, 2021 19:51
@Borda Borda modified the milestones: 1.2.x, 1.2 Feb 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation related ready PRs ready to be merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants