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

None parameters not sanitized during pruning #6835

Closed
karthikprasad opened this issue Apr 5, 2021 · 0 comments · Fixed by #6836
Closed

None parameters not sanitized during pruning #6835

karthikprasad opened this issue Apr 5, 2021 · 0 comments · Fixed by #6836
Labels
bug Something isn't working help wanted Open to be worked on

Comments

@karthikprasad
Copy link
Contributor

🐛 Bug

ModelPruning callback fails when a module parameter is None. This can happen, for instance, in a Linear() when bias=False.

Please reproduce using the BoringModel

https://colab.research.google.com/drive/1UApprg-5htIQbosiSyyLLXm1B8wE8EbN?usp=sharing

Expected behavior

Unavailable parameters are already taken care of in sanitize_parameters_to_prune method in ModelPruning callback. A trivial check to ensure the attribute, when present, is not None should solve this. Happy to send a PR.

Environment

  • CUDA:
    • GPU:
      • Tesla K80
    • available: True
    • version: 10.1
  • Packages:
    • numpy: 1.19.5
    • pyTorch_debug: False
    • pyTorch_version: 1.8.1+cu101
    • pytorch-lightning: 1.2.6
    • tqdm: 4.41.1
  • System:
    • OS: Linux
    • architecture:
      • 64bit
    • processor: x86_64
    • python: 3.7.10
    • version: Proposal for help #1 SMP Thu Jul 23 08:00:38 PDT 2020
@karthikprasad karthikprasad added bug Something isn't working help wanted Open to be worked on labels Apr 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Open to be worked on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant