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

Closed
wants to merge 1 commit into 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
@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 17, 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 831dea5 to ab212c8 Compare July 17, 2025 20:38
fy-meng added a commit to fy-meng/captum that referenced this pull request Jul 21, 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 ab212c8 to 6c08dd6 Compare July 21, 2025 17:36
@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 21, 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 6c08dd6 to 8868411 Compare July 21, 2025 17:40
fy-meng added a commit to fy-meng/captum that referenced this pull request Jul 21, 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 8868411 to 37f3e77 Compare July 21, 2025 17:47
@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 37f3e77 to bf0641d Compare July 21, 2025 17:52
fy-meng added a commit to fy-meng/captum that referenced this pull request Jul 21, 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 added a commit to fy-meng/captum that referenced this pull request Jul 21, 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 bf0641d to 8ecf34d Compare July 21, 2025 18:55
fy-meng added a commit to fy-meng/captum that referenced this pull request Jul 21, 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 8ecf34d to d9bbe77 Compare July 21, 2025 19:00
@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 21, 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 d9bbe77 to c258193 Compare July 21, 2025 19:06
@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 21, 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 c258193 to 249822e Compare July 21, 2025 19:11
fy-meng added a commit to fy-meng/captum that referenced this pull request Jul 21, 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 249822e to 17042b1 Compare July 21, 2025 20:31
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

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 3ec6da4.

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