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

Explainability Dataset Task: ERGraph #6073

Merged
merged 43 commits into from
Dec 12, 2022

Conversation

shenoynikhil
Copy link
Contributor

@shenoynikhil shenoynikhil commented Nov 26, 2022

Adds ERGraph based on @rfdavid's PR #6072. Fixes task #5817.

from torch_geometric.datasets.generators import ERGraph

motif = Motif(structure='house')
generator = ERGraph(motif=motif, num_nodes=300, edge_prob=0.2, num_motifs=80)
dataset = ExplainerDataset(generator=generator)

TODO

  • Tests
  • ChangeLog

@rusty1s rusty1s changed the title Explainability Dataset Task: ERGraph Explainability Dataset Task: ERGraph Nov 26, 2022
@shenoynikhil
Copy link
Contributor Author

shenoynikhil commented Dec 10, 2022

I'm a bit new to Graph ML, so I might need help reviewing this. I have taken inspiration from these 2 PRs #6072 and #6104. @rfdavid @RexYing Any suggestions would be welcome.

@codecov
Copy link

codecov bot commented Dec 10, 2022

Codecov Report

Merging #6073 (c7b8e7c) into master (a2db032) will increase coverage by 0.00%.
The diff coverage is n/a.

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

@@           Coverage Diff           @@
##           master    #6073   +/-   ##
=======================================
  Coverage   84.55%   84.56%           
=======================================
  Files         372      371    -1     
  Lines       20848    20840    -8     
=======================================
- Hits        17629    17624    -5     
+ Misses       3219     3216    -3     
Impacted Files Coverage Δ
torch_geometric/nn/resolver.py 86.36% <0.00%> (-2.35%) ⬇️
torch_geometric/resolver.py
torch_geometric/nn/dense/linear.py 87.12% <0.00%> (+1.71%) ⬆️

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

@shenoynikhil shenoynikhil marked this pull request as ready for review December 10, 2022 22:41
rusty1s added a commit that referenced this pull request Dec 12, 2022
This PR implements benchmark dataset overall framework and API for
generating benchmark datasets (#5817). Any feedback is appreciated,
especially regarding the proposed architecture.

### Implementing a new graph generator

- Create a class inside generators inheriting from GraphGenerator
- Implement `generate_base_graph` using the provided methods
(`generate_feature` and `attach_motif`)
- See #6072 and #6073 to check how it was implemented
- The current Motif generator used here will be replaced by #6179 

### Example for the final user

```
motif = Motif('house')
generator = BAGraph(num_nodes=300, num_motifs=80, motif=motif)
dataset = ExplainerDataset(generator)
```

TODO:

- [x] Finish graph generator (provide all necessary methods: feature
generator, label generator)
- [x] Add tests
- [x] Add to Change log
- [x] Documentation

Co-authored-by: rusty1s <matthias.fey@tu-dortmund.de>
@rusty1s rusty1s enabled auto-merge (squash) December 12, 2022 10:35
@rusty1s rusty1s merged commit 37f3857 into pyg-team:master Dec 12, 2022
@shenoynikhil shenoynikhil deleted the shenoynikhil/explain-er-dataset branch December 12, 2022 16:59
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

3 participants