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 module usage guide #192

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ajay-naidu-96
Copy link

[Minor] Documentation Fix for Enabling the parameter output_original_output

Description

The IntervenableModel class requires the output_original_output boolean flag to be enabled for the code to function as expected. Not passing this parameter in the Jupyter notebook while intervening on ResNet models results in an empty dictionary for original outputs. Consequently, attempting to compute the difference between the intervened output and the original output raises the following error:

AttributeError: 'NoneType' object has no attribute 'logits'

Testing Done

The code was tested by including the parameter output_original_output=True. This change allowed for the correct computation of outputs without errors and the html build was verified accordingly.

This could however be changed to making the default value set to True when defining these functions in the intervenable_base module but these might be broader design choices. The same changes could possible result in erroring out in other blocks for different model architecture if the difference is computed but I haven't tested that.

Checklist:

  • My PR title strictly follows the format: [Your Priority] Your Title
  • I have attached the testing log above
  • I provide enough comments to my code
  • I have changed documentations
  • I have added tests for my changes

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.

1 participant