Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jan 1, 2024

Updates the requirements on captum to permit the latest version.

Release notes

Sourced from captum's releases.

Captum v0.7.0 Release

The Captum 0.7.0 release adds new functionalities for language model attribution, dataset level attribution, and a few improvements and bug fixes for existing methods.

Language Model Attribution

Captum 0.7.0 adds new APIs for language model attribution, making it substantially easier to define interpretable text features with corresponding baselines and masks. These new wrappers are compatible with most attribution methods in Captum and make it substantially easier to understand how aspects of a prompt impact an LLM’s predicted response. More details can also be found in our paper:

Using Captum to Explain Generative Language Models

Example:

from captum.attr import ShapleyValueSampling, LLMAttribution, TextTemplateFeature
shapley_values = ShapleyValueSampling(model)
llm_attr = LLMAttribution(shapley_values, tokenizer)
inp = TextTemplateInput(
# the text template
"{} lives in {}, {} and is a {}. {} personal interests include",
# the values of the features
["Dave", "Palm Coast", "FL", "lawyer", "His"],
# the reference baseline values of the features
baselines=["Sarah", "Seattle", "WA", "doctor", "Her"],
)
res = llm_attr.attribute(inp)

DataLoader Attribution

DataLoader Attribution is a new wrapper which provides an easy-to-use approach for obtaining attribution on a full dataset by providing a data loader rather than a single input (PR #1155, #1158).

Attribution Improvements

Captum 0.7.0 has added a few improvements to existing attribution methods including:

  • Multi-task attribution for Shapley Values and Shapley Value Sampling is now supported, allowing users to get attributions for multiple target outputs simultaneously (PR #1173)
  • LayerGradCam now supports returning attributions for each channel independently without summing across channels (PR #1086, thanks to @​dzenanz for this contribution)

Bug Fixes

  • Visualization utilities were updated to use the new keyword argument visible to ensure compatibility with Matplotlib 3.7 (PR #1118)
  • The default visualization mode in visualize_timeseries_attr has been fixed to appropriately utilize overlay_individual (PR #1152, thanks to @​teddykoker for this contribution)
Commits

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

📚 Documentation preview 📚: https://pytorch-tabular--361.org.readthedocs.build/en/361/

Updates the requirements on [captum](https://github.com/pytorch/captum) to permit the latest version.
- [Release notes](https://github.com/pytorch/captum/releases)
- [Commits](meta-pytorch/captum@v0.5.0...v0.7.0)

---
updated-dependencies:
- dependency-name: captum
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Jan 1, 2024
@dependabot dependabot bot requested a review from manujosephv January 1, 2024 11:04
@Borda Borda merged commit 1e850e8 into main Jan 12, 2024
@Borda Borda deleted the dependabot-pip-captum-gte-0.5.0-and-lt-0.8.0 branch January 12, 2024 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants