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

Adding another way of calculating gradients in downsamplers #540

Merged
merged 18 commits into from
Jun 25, 2024

Conversation

XianzheMa
Copy link
Collaborator

@XianzheMa XianzheMa commented Jun 22, 2024

This PR addresses #505.
A flag is introduced, to switch between using purely the last layer gradients, or the concatenation of last layer gradients and penultimate layer gradients, in selection algorithms.

Copy link

Line Coverage: -% ( % to main)
Branch Coverage: -% ( % to main)

@XianzheMa XianzheMa changed the title Fix wrong gradient matrix Fix the wrong way of calculating gradients in downsamplers Jun 24, 2024
Copy link

codecov bot commented Jun 24, 2024

Codecov Report

Attention: Patch coverage is 91.54930% with 6 lines in your changes missing coverage. Please review.

Project coverage is 82.83%. Comparing base (70ce04c) to head (84c20ff).

Files Patch % Lines
...sampling_strategies/craig_downsampling_strategy.py 0.00% 2 Missing ⚠️
...ling_strategies/gradmatch_downsampling_strategy.py 0.00% 2 Missing ⚠️
...ing_strategies/submodular_downsampling_strategy.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #540      +/-   ##
==========================================
- Coverage   82.84%   82.83%   -0.01%     
==========================================
  Files         220      220              
  Lines       10202    10232      +30     
==========================================
+ Hits         8452     8476      +24     
- Misses       1750     1756       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@XianzheMa XianzheMa changed the title Fix the wrong way of calculating gradients in downsamplers Adding another way of calculating gradients in downsamplers Jun 24, 2024
@XianzheMa XianzheMa marked this pull request as ready for review June 24, 2024 13:46
@XianzheMa XianzheMa requested a review from MaxiBoether June 24, 2024 13:53
Copy link
Contributor

@MaxiBoether MaxiBoether left a comment

Choose a reason for hiding this comment

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

Thanks, my only concern is (and I think codecov complains as well) that we should at least test whether the new code path does not crash or something. But the changes itself look good and I tried to validate that the old logic stay the same :)

@MaxiBoether
Copy link
Contributor

Thanks, the new tests look good. Feel free to merge!

@XianzheMa XianzheMa merged commit 72ffdca into main Jun 25, 2024
26 checks passed
@XianzheMa XianzheMa deleted the XianzheMa/bug/fix-505 branch June 25, 2024 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants