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

Remove unnecessary inclusion of self-loops when sampling negative edges #4880

Merged
merged 5 commits into from
Jun 30, 2022
Merged

Conversation

gengala
Copy link
Contributor

@gengala gengala commented Jun 28, 2022

Handling self-loops is only useful when negative edges are not provided.

Handling self-loops is only useful when negative edges are not provided.
@codecov
Copy link

codecov bot commented Jun 28, 2022

Codecov Report

Merging #4880 (c2c77f1) into master (b32bbdb) will increase coverage by 0.05%.
The diff coverage is n/a.

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

@@            Coverage Diff             @@
##           master    #4880      +/-   ##
==========================================
+ Coverage   82.70%   82.75%   +0.05%     
==========================================
  Files         329      329              
  Lines       17846    17707     -139     
==========================================
- Hits        14760    14654     -106     
+ Misses       3086     3053      -33     
Impacted Files Coverage Δ
torch_geometric/nn/models/autoencoder.py 100.00% <ø> (ø)
torch_geometric/data/in_memory_dataset.py 77.27% <0.00%> (-3.89%) ⬇️
torch_geometric/data/separate.py 97.77% <0.00%> (-2.23%) ⬇️
torch_geometric/loader/link_neighbor_loader.py 91.85% <0.00%> (-0.69%) ⬇️
torch_geometric/data/data.py 91.43% <0.00%> (-0.14%) ⬇️
torch_geometric/data/hetero_data.py 94.13% <0.00%> (-0.09%) ⬇️
torch_geometric/data/__init__.py 100.00% <0.00%> (ø)
torch_geometric/nn/dense/mincut_pool.py 100.00% <0.00%> (ø)
torch_geometric/loader/neighbor_loader.py 86.44% <0.00%> (+0.27%) ⬆️
torch_geometric/data/collate.py 96.69% <0.00%> (+0.29%) ⬆️
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b32bbdb...3973fef. Read the comment docs.

@rusty1s rusty1s changed the title Update autoencoder.py Not including self-loops when sampling negative edges Jun 29, 2022
Copy link
Member

@rusty1s rusty1s left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. Meanwhile, negative_sampling will not include self-loops in the computation, so we can drop the removal and addition of self-loops here completely. WDYT?

@gengala
Copy link
Contributor Author

gengala commented Jun 29, 2022

You are right :)

@rusty1s rusty1s changed the title Not including self-loops when sampling negative edges Remove unnecessary inclusion of self-loops when sampling negative edges Jun 30, 2022
@rusty1s rusty1s merged commit e8b6def into pyg-team:master Jun 30, 2022
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