Skip to content

Allow more variable input to LLMAttributionResult #1627

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

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

Conversation

fy-meng
Copy link
Contributor

@fy-meng fy-meng commented Jul 15, 2025

Summary:

  1. Allow LLMAttributionResult to be initialized with generic array data (lists, np.ndarray) and perform sanity checks on their shapes;
  2. During visualization, the text tokens are now repr'd to make sure that non-word charactures (e.g. newline) are visualized correctly.

Differential Revision: D78197863

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D78197863

fy-meng added a commit to fy-meng/captum that referenced this pull request Jul 15, 2025
Summary:

1. Allow `LLMAttributionResult` to be initialized with generic array data (lists, np.ndarray) and perform sanity checks on their shapes;
2. During visualization, the text tokens are now `repr`'d to make sure that non-word charactures (e.g. newline) are visualized correctly.

Differential Revision: D78197863
@fy-meng fy-meng force-pushed the export-D78197863 branch from ef9f4ea to 4f406f4 Compare July 15, 2025 03:28
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D78197863

fy-meng added a commit to fy-meng/captum that referenced this pull request Jul 15, 2025
Summary:
Pull Request resolved: pytorch#1627

1. Allow `LLMAttributionResult` to be initialized with generic array data (lists, np.ndarray) and perform sanity checks on their shapes;
2. During visualization, the text tokens are now `repr`'d to make sure that non-word charactures (e.g. newline) are visualized correctly.

Differential Revision: D78197863
@fy-meng fy-meng force-pushed the export-D78197863 branch from 4f406f4 to 6fbe744 Compare July 15, 2025 03:32
fy-meng added a commit to fy-meng/captum that referenced this pull request Jul 16, 2025
Summary:

1. Allow `LLMAttributionResult` to be initialized with generic array data (lists, np.ndarray) and perform sanity checks on their shapes;
2. During visualization, the text tokens are now `repr`'d to make sure that non-word charactures (e.g. newline) are visualized correctly.

Reviewed By: craymichael

Differential Revision: D78197863
@fy-meng fy-meng force-pushed the export-D78197863 branch from 6fbe744 to 5039018 Compare July 16, 2025 07:53
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D78197863

fy-meng added a commit to fy-meng/captum that referenced this pull request Jul 16, 2025
Summary:
Pull Request resolved: pytorch#1627

1. Allow `LLMAttributionResult` to be initialized with generic array data (lists, np.ndarray) and perform sanity checks on their shapes;
2. During visualization, the text tokens are now `repr`'d to make sure that non-word charactures (e.g. newline) are visualized correctly.

Reviewed By: craymichael

Differential Revision: D78197863
@fy-meng fy-meng force-pushed the export-D78197863 branch from 5039018 to 052133f Compare July 16, 2025 07:57
fy-meng added a commit to fy-meng/captum that referenced this pull request Jul 17, 2025
Summary:

1. Allow `LLMAttributionResult` to be initialized with generic array data (lists, np.ndarray) and perform sanity checks on their shapes;
2. During visualization, the text tokens are now `repr`'d to make sure that non-word charactures (e.g. newline) are visualized correctly.

Reviewed By: craymichael

Differential Revision: D78197863
@fy-meng fy-meng force-pushed the export-D78197863 branch from 052133f to 831dea5 Compare July 17, 2025 20:33
Summary:
Pull Request resolved: pytorch#1627

1. Allow `LLMAttributionResult` to be initialized with generic array data (lists, np.ndarray) and perform sanity checks on their shapes;
2. During visualization, the text tokens are now `repr`'d to make sure that non-word charactures (e.g. newline) are visualized correctly.

Reviewed By: craymichael

Differential Revision: D78197863
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D78197863

@fy-meng fy-meng force-pushed the export-D78197863 branch from 831dea5 to ab212c8 Compare July 17, 2025 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants