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

Add MemoryFormat callback (channels last) #17680

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

Pedrexus
Copy link

@Pedrexus Pedrexus commented May 23, 2023

What does this PR do?

This PR fixes issue #15175 by adding a new feature to the ChannelsLast callback. This callback changes the module memory format on setup. This is useful when the user wants to use a different memory format and can lead to a considerable speedup in some cases.

Fixes #15175

This PR does not introduce any breaking changes.

  • Was this discussed/agreed 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 list all the breaking changes introduced by this pull request?
  • Did you update the CHANGELOG? (not for typos, docs, test updates, or minor internal changes/refactors)

PR review

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

Reviewer checklist
  • 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

@github-actions github-actions bot added the pl Generic label for PyTorch Lightning package label May 23, 2023
@Pedrexus
Copy link
Author

Pedrexus commented May 23, 2023

Hello, all. I'm having trouble running make docs. I'd be glad if someone could help.

Error:
ModuleNotFoundError: No module named 'pt_lightning_sphinx_theme'

@awaelchli
Copy link
Contributor

@Pedrexus This should get you started:

pip install -r requirements/pytorch/docs.txt
cd docs/source-pytorch
make html 
open ../build/html/index.html

Also, I left a comment here: #15175 (comment)

@awaelchli awaelchli added feature Is an improvement or enhancement callback community This PR is from the community labels May 29, 2023
@stale stale bot added the won't fix This will not be worked on label Jun 18, 2023
@Lightning-AI Lightning-AI deleted a comment from stale bot Jun 18, 2023
@stale stale bot removed the won't fix This will not be worked on label Jun 18, 2023
@Borda Borda self-requested a review as a code owner August 8, 2023 14:43
@mergify mergify bot removed the has conflicts label Aug 8, 2023
@mergify mergify bot added the has conflicts label Sep 5, 2023
@awaelchli awaelchli added this to the 2.1 milestone Sep 20, 2023
@awaelchli awaelchli changed the title channels last callback Add MemoryFormat callback (channels last) Sep 20, 2023
@awaelchli awaelchli modified the milestones: 2.1, 2.2 Oct 5, 2023
@mergify mergify bot removed the has conflicts label Oct 12, 2023
@mergify mergify bot removed the has conflicts label Dec 13, 2023
Copy link

codecov bot commented Dec 13, 2023

Codecov Report

Attention: Patch coverage is 89.65517% with 3 lines in your changes missing coverage. Please review.

Project coverage is 49%. Comparing base (e040ef2) to head (10bd4f5).
Report is 467 commits behind head on master.

❗ There is a different number of reports uploaded between BASE (e040ef2) and HEAD (10bd4f5). Click for more details.

HEAD has 505 uploads less than BASE
Flag BASE (e040ef2) HEAD (10bd4f5)
lightning 88 16
cpu 148 24
pytest 104 2
python3.10 41 9
app 9 0
examples 9 0
python3.9 14 3
lightning_fabric 26 0
python3.8 28 6
python3.11 35 6
gpu 4 2
pytest-full 48 24
pytorch1.13 12 6
pytorch1.12 12 6
pytorch_lightning 19 10
pytorch2.0 12 6
pytorch2.1 12 6
lightning_app 10 0
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #17680      +/-   ##
==========================================
- Coverage      83%      49%     -34%     
==========================================
  Files         445      438       -7     
  Lines       37305    37181     -124     
==========================================
- Hits        31005    18270   -12735     
- Misses       6300    18911   +12611     

Copy link

gitguardian bot commented Jan 16, 2024

⚠️ GitGuardian has uncovered 2 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id Secret Commit Filename
- Generic High Entropy Secret 78fa3af tests/tests_app/utilities/test_login.py View secret
- Base64 Basic Authentication 78fa3af tests/tests_app/utilities/test_login.py View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Our GitHub checks need improvements? Share your feedbacks!

@mergify mergify bot added the has conflicts label Feb 1, 2024
@awaelchli awaelchli modified the milestones: 2.2, 2.3 Feb 3, 2024
@awaelchli awaelchli modified the milestones: 2.3, future Jun 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
callback community This PR is from the community feature Is an improvement or enhancement has conflicts pl Generic label for PyTorch Lightning package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support channels_last with training
3 participants