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

fix: randomize all layer types #252

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

fix: randomize all layer types #252

wants to merge 2 commits into from

Conversation

aski02
Copy link
Collaborator

@aski02 aski02 commented Dec 18, 2024

References #18.

However, the test for transformer-specific layers could be cleaned up once we support language models for explainers as well.

Copy link

codecov bot commented Dec 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.06%. Comparing base (055695f) to head (b887c52).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #252   +/-   ##
=======================================
  Coverage   92.06%   92.06%           
=======================================
  Files          55       55           
  Lines        2331     2331           
=======================================
  Hits         2146     2146           
  Misses        185      185           

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

Copy link
Owner

@dilyabareeva dilyabareeva left a comment

Choose a reason for hiding this comment

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

Hi @aski02. Thanks for your work. I have two major comments:

  1. The tests are only checking if parameters have been changed after randomization. Could we add tests that do inference on a batch of random data and see if the model output NaNs? That was the main reason we limited randomization to Linear layers previously.
  2. As far as I remember, the current approach didn't work for BatchNorm layers. Could we add tests for them as well?

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