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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat] Adding PruningCallback #5618

Merged
merged 34 commits into from
Jan 27, 2021
Merged

[Feat] Adding PruningCallback #5618

merged 34 commits into from
Jan 27, 2021

Conversation

tchaton
Copy link
Contributor

@tchaton tchaton commented Jan 22, 2021

What does this PR do?

This PR adds a pruning Callback.

Fixes # (issue) <- this links related issue to this PR

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
  • Check that target branch and milestone match!

Did you have fun?

Make sure you had fun coding 🙃

@tchaton tchaton added this to the 1.2 milestone Jan 22, 2021
@tchaton tchaton self-assigned this Jan 22, 2021
@pep8speaks
Copy link

pep8speaks commented Jan 22, 2021

Hello @tchaton! Thanks for updating this PR.

Line 138:81: E203 whitespace before ','

Comment last updated at 2021-01-27 01:05:25 UTC

@codecov
Copy link

codecov bot commented Jan 22, 2021

Codecov Report

Merging #5618 (9caef2e) into release/1.2-dev (7e2e874) will increase coverage by 0%.
The diff coverage is 90%.

@@               Coverage Diff                @@
##           release/1.2-dev   #5618    +/-   ##
================================================
  Coverage               89%     89%            
================================================
  Files                  163     164     +1     
  Lines                12070   12218   +148     
================================================
+ Hits                 10795   10928   +133     
- Misses                1275    1290    +15     

@tchaton tchaton marked this pull request as ready for review January 25, 2021 10:36
Copy link
Member

@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.

Just a high-level review...
Additional comments:

  • there is an empty file pytorch_lightning/callbacks/pruning_utils/__init__.py that probably can be deleted
  • insert link in the Built-in Callbacks section in the callbacks.rst doc file

pytorch_lightning/callbacks/pruning.py Outdated Show resolved Hide resolved
pytorch_lightning/callbacks/pruning.py Outdated Show resolved Hide resolved
pytorch_lightning/callbacks/pruning.py Show resolved Hide resolved
pytorch_lightning/callbacks/pruning.py Outdated Show resolved Hide resolved
pytorch_lightning/callbacks/pruning.py Outdated Show resolved Hide resolved
pytorch_lightning/callbacks/pruning.py Show resolved Hide resolved
pytorch_lightning/callbacks/pruning.py Outdated Show resolved Hide resolved
pytorch_lightning/callbacks/pruning.py Show resolved Hide resolved
@SeanNaren
Copy link
Contributor

Excited to use this :)

@mergify mergify bot removed the has conflicts label Jan 26, 2021
@Borda Borda added feature Is an improvement or enhancement design Includes a design discussion labels Jan 26, 2021
pytorch_lightning/callbacks/pruning.py Outdated Show resolved Hide resolved
pytorch_lightning/callbacks/pruning.py Outdated Show resolved Hide resolved
pytorch_lightning/callbacks/pruning.py Outdated Show resolved Hide resolved
pytorch_lightning/callbacks/pruning.py Show resolved Hide resolved
pytorch_lightning/callbacks/pruning.py Outdated Show resolved Hide resolved
pytorch_lightning/callbacks/pruning.py Outdated Show resolved Hide resolved
pytorch_lightning/callbacks/pruning.py Show resolved Hide resolved
pytorch_lightning/callbacks/pruning.py Outdated Show resolved Hide resolved
pytorch_lightning/callbacks/pruning.py Outdated Show resolved Hide resolved
@mergify mergify bot removed the has conflicts label Jan 26, 2021
Copy link

@z-a-f z-a-f left a comment

Choose a reason for hiding this comment

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

LGTM, less some nits. Will leave it to other to approve

pytorch_lightning/callbacks/pruning.py Show resolved Hide resolved
pytorch_lightning/callbacks/pruning.py Outdated Show resolved Hide resolved
tests/callbacks/test_pruning.py Show resolved Hide resolved
@mergify mergify bot removed the has conflicts label Jan 26, 2021
@tchaton tchaton enabled auto-merge (squash) January 27, 2021 05:29
@tchaton tchaton merged commit d0aaf98 into release/1.2-dev Jan 27, 2021
@tchaton tchaton deleted the feat/pruning branch January 27, 2021 06:00
@Borda
Copy link
Member

Borda commented Jan 29, 2021

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants