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

CaptumExplainer forward method #6387

Merged
merged 13 commits into from
Jan 11, 2023
Merged

CaptumExplainer forward method #6387

merged 13 commits into from
Jan 11, 2023

Conversation

RBendias
Copy link
Contributor

Defines Explainer.call for homogeneous/heterogeneous graphs (#6375)

@codecov
Copy link

codecov bot commented Jan 10, 2023

Codecov Report

Merging #6387 (1d3c1da) into master (ca4583e) will decrease coverage by 0.03%.
The diff coverage is 71.11%.

❗ Current head 1d3c1da differs from pull request most recent head b33107f. Consider uploading reports for the commit b33107f to get more accurate results

@@            Coverage Diff             @@
##           master    #6387      +/-   ##
==========================================
- Coverage   84.73%   84.70%   -0.04%     
==========================================
  Files         395      395              
  Lines       21624    21666      +42     
==========================================
+ Hits        18324    18353      +29     
- Misses       3300     3313      +13     
Impacted Files Coverage Δ
...ch_geometric/explain/algorithm/captum_explainer.py 75.00% <67.64%> (-15.48%) ⬇️
torch_geometric/explain/algorithm/captum.py 97.87% <81.81%> (-1.36%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

node_mask_type = self.explainer_config.node_mask_type
edge_mask_type = self.explainer_config.edge_mask_type
if node_mask_type is not None and edge_mask_type is not None:
mask_type = 'node_and_edge'
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we introduce these three mask types as an Enum? Also in captum.py, possibly as a follow-up PR.

Copy link
Member

@wsad1 wsad1 left a comment

Choose a reason for hiding this comment

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

Looks good.
Lets add an issue to update https://pytorch-geometric.readthedocs.io/en/latest/notes/explain.html, to show HeteroExplanation.

torch_geometric/explain/algorithm/captum_explainer.py Outdated Show resolved Hide resolved
torch_geometric/explain/algorithm/captum_explainer.py Outdated Show resolved Hide resolved
torch_geometric/explain/algorithm/captum_explainer.py Outdated Show resolved Hide resolved
torch_geometric/explain/algorithm/captum_explainer.py Outdated Show resolved Hide resolved
test/explain/algorithm/test_captum_explainer.py Outdated Show resolved Hide resolved
torch_geometric/explain/algorithm/captum_explainer.py Outdated Show resolved Hide resolved
torch_geometric/explain/algorithm/captum_explainer.py Outdated Show resolved Hide resolved
@rusty1s rusty1s changed the title CaptumExplainer forward method CaptumExplainer forward method Jan 11, 2023
@rusty1s rusty1s enabled auto-merge (squash) January 11, 2023 11:23
@rusty1s rusty1s merged commit f710570 into master Jan 11, 2023
@rusty1s rusty1s deleted the captum_explainer_forward branch January 11, 2023 11:26
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.

None yet

4 participants