Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add automatic optimization property setter to lightning module #5169

Merged
merged 3 commits into from Jan 11, 2021

Conversation

ananthsub
Copy link
Contributor

What does this PR do?

This speeds up the deprecation of the automatic_optimization flag from the Trainer by making this property settable on the module. So someone could do self.automatic_optimization = False without running into an attribute error

Fixes # (issue)

Before submitting

  • Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
  • 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? Otherwise, we ask you to create a separate PR for every change.
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?
  • Did you verify new and existing tests pass locally with your changes?
  • If you made a notable change (that affects users), did you update the CHANGELOG?

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; Bugfixes should be including in bug-fix release milestones (m.f.X) and features should be included in (m.X.b) releases.

Did you have fun?

Make sure you had fun coding 馃檭

Copy link
Contributor

@rohitgr7 rohitgr7 left a comment

Choose a reason for hiding this comment

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

this looks better to me. Mind update other tests too?

Copy link
Member

@awaelchli awaelchli left a comment

Choose a reason for hiding this comment

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

I thought it already was like this 馃槃

@awaelchli awaelchli added design Includes a design discussion feature Is an improvement or enhancement labels Dec 18, 2020
@awaelchli awaelchli added this to the 1.1.x milestone Dec 18, 2020
@ananthsub
Copy link
Contributor Author

this looks better to me. Mind update other tests too?

will do!

@tchaton tchaton enabled auto-merge (squash) January 11, 2021 12:36
@tchaton tchaton added the ready PRs ready to be merged label Jan 11, 2021
@tchaton tchaton merged commit 8748293 into Lightning-AI:master Jan 11, 2021
@codecov
Copy link

codecov bot commented Jan 11, 2021

Codecov Report

Merging #5169 (bb42800) into master (92bbf2f) will increase coverage by 0%.
The diff coverage is 100%.

@@          Coverage Diff           @@
##           master   #5169   +/-   ##
======================================
  Coverage      93%     93%           
======================================
  Files         135     135           
  Lines       10011   10015    +4     
======================================
+ Hits         9324    9328    +4     
  Misses        687     687           

@rohitgr7 rohitgr7 mentioned this pull request Jan 11, 2021
12 tasks
SeanNaren pushed a commit that referenced this pull request Jan 12, 2021
* add automatic optimization property setter to lightning module

* Update test_manual_optimization.py

Co-authored-by: chaton <thomas@grid.ai>
(cherry picked from commit 8748293)
SeanNaren pushed a commit that referenced this pull request Jan 12, 2021
* add automatic optimization property setter to lightning module

* Update test_manual_optimization.py

Co-authored-by: chaton <thomas@grid.ai>
(cherry picked from commit 8748293)
SeanNaren pushed a commit that referenced this pull request Jan 13, 2021
* add automatic optimization property setter to lightning module

* Update test_manual_optimization.py

Co-authored-by: chaton <thomas@grid.ai>
(cherry picked from commit 8748293)
SeanNaren pushed a commit that referenced this pull request Jan 13, 2021
* add automatic optimization property setter to lightning module

* Update test_manual_optimization.py

Co-authored-by: chaton <thomas@grid.ai>
(cherry picked from commit 8748293)
SeanNaren pushed a commit that referenced this pull request Jan 19, 2021
* add automatic optimization property setter to lightning module

* Update test_manual_optimization.py

Co-authored-by: chaton <thomas@grid.ai>
(cherry picked from commit 8748293)
Borda pushed a commit that referenced this pull request Jan 23, 2021
* add automatic optimization property setter to lightning module

* Update test_manual_optimization.py

Co-authored-by: chaton <thomas@grid.ai>
(cherry picked from commit 8748293)
Borda pushed a commit that referenced this pull request Jan 25, 2021
* add automatic optimization property setter to lightning module

* Update test_manual_optimization.py

Co-authored-by: chaton <thomas@grid.ai>
(cherry picked from commit 8748293)
Borda pushed a commit that referenced this pull request Jan 26, 2021
* add automatic optimization property setter to lightning module

* Update test_manual_optimization.py

Co-authored-by: chaton <thomas@grid.ai>
(cherry picked from commit 8748293)
Borda pushed a commit that referenced this pull request Jan 26, 2021
* add automatic optimization property setter to lightning module

* Update test_manual_optimization.py

Co-authored-by: chaton <thomas@grid.ai>
(cherry picked from commit 8748293)
Borda pushed a commit that referenced this pull request Jan 26, 2021
* add automatic optimization property setter to lightning module

* Update test_manual_optimization.py

Co-authored-by: chaton <thomas@grid.ai>
(cherry picked from commit 8748293)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design Includes a design discussion feature Is an improvement or enhancement ready PRs ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants