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

Bug Fix: Order of transforms in label_prop example #3639

Merged
merged 1 commit into from Dec 6, 2021

Conversation

Riyer01
Copy link
Contributor

@Riyer01 Riyer01 commented Dec 6, 2021

This example doesn't work properly as currently written. The correct way is to reverse the order of transformations, such that we first convert the graph to undirected, then get the sparse representation.

Empirically, try running this file with the transformations listed both ways for 50 iterations, and it becomes clear from the results that the original implementation is incorrect.

Submitted for extra credit in CS224W

If we convert to sparse first, the performance is far worse. The correct way is to reverse the order of transformations.

Empirically, try running the file with both orders and 50 iterations, and it's clear.
@codecov-commenter
Copy link

codecov-commenter commented Dec 6, 2021

Codecov Report

Merging #3639 (2ac3644) into master (e8915ad) will decrease coverage by 0.18%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3639      +/-   ##
==========================================
- Coverage   81.66%   81.47%   -0.19%     
==========================================
  Files         294      294              
  Lines       14655    14745      +90     
==========================================
+ Hits        11968    12014      +46     
- Misses       2687     2731      +44     
Impacted Files Coverage Δ
torch_geometric/loader/dataloader.py 80.55% <0.00%> (-2.78%) ⬇️
torch_geometric/loader/utils.py 86.76% <0.00%> (-2.13%) ⬇️
torch_geometric/typing.py 100.00% <0.00%> (ø)
torch_geometric/data/__init__.py 100.00% <0.00%> (ø)
torch_geometric/nn/models/basic_gnn.py 89.36% <0.00%> (ø)
torch_geometric/data/lightning_data_module.py
torch_geometric/data/lightning_datamodule.py 25.66% <0.00%> (ø)
torch_geometric/transforms/gdc.py 78.97% <0.00%> (+0.10%) ⬆️
torch_geometric/transforms/to_undirected.py 97.43% <0.00%> (+0.13%) ⬆️
torch_geometric/loader/hgt_loader.py 92.50% <0.00%> (+2.02%) ⬆️
... and 1 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 e8915ad...2ac3644. Read the comment docs.

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.

You are right. Thanks for spotting!

@rusty1s rusty1s merged commit 2bb4ac5 into pyg-team:master Dec 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants