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: Removes model hooks when the context manager exits #198

Merged
merged 6 commits into from
Dec 21, 2022
Merged

Conversation

frgfm
Copy link
Owner

@frgfm frgfm commented Dec 21, 2022

This PR removes hooks & hook data before exiting the context manager.

Closes #197

@frgfm frgfm added this to the 0.4.0 milestone Dec 21, 2022
@frgfm frgfm self-assigned this Dec 21, 2022
@github-actions github-actions bot added ext: tests Related to test module: methods Related to torchcam.methods labels Dec 21, 2022
@frgfm frgfm changed the title feat: Removes model hooks when the extractor gets deleted feat: Removes model hooks when the context manager exits Dec 21, 2022
@github-actions github-actions bot added ext: scripts topic: docs Improvements or additions to documentation labels Dec 21, 2022
@codecov
Copy link

codecov bot commented Dec 21, 2022

Codecov Report

Merging #198 (d34e20c) into main (95539fd) will increase coverage by 0.03%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #198      +/-   ##
==========================================
+ Coverage   96.73%   96.77%   +0.03%     
==========================================
  Files           8        8              
  Lines         429      434       +5     
==========================================
+ Hits          415      420       +5     
  Misses         14       14              
Impacted Files Coverage Δ
torchcam/methods/core.py 95.93% <100.00%> (+0.17%) ⬆️

@frgfm frgfm merged commit e7d4644 into main Dec 21, 2022
@frgfm frgfm deleted the destructor branch December 21, 2022 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ext: scripts ext: tests Related to test module: methods Related to torchcam.methods topic: docs Improvements or additions to documentation type: feat
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove hooks once we're done with CAM extractors
1 participant