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

Add PyTorch SparseTensor support for GINConv, SAGEConv, and GraphConv #6532

Merged
merged 7 commits into from
Jan 28, 2023

Conversation

EdisonLeeeee
Copy link
Contributor

@EdisonLeeeee EdisonLeeeee commented Jan 27, 2023

This PR aims to add PyTorch SparseTensor support for GINConv, SAGEConv, and GraphConv, and also update type hints in message_and_aggregate correspondingly.

@EdisonLeeeee
Copy link
Contributor Author

Testing failed because I changed the type hints from

def message_and_aggregate(self, adj_t: SparseTensor, x: Tensor) -> Tensor:

to

def message_and_aggregate(self, adj_t: Adj, x: Tensor) -> Tensor:

@rusty1s Any solution?

@rusty1s
Copy link
Member

rusty1s commented Jan 27, 2023

I think we should keep them for now since we don't support JIT for torch.sparse.Tensor anyway yet.

@codecov
Copy link

codecov bot commented Jan 27, 2023

Codecov Report

Merging #6532 (216fa11) into master (6d6162d) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #6532   +/-   ##
=======================================
  Coverage   85.75%   85.75%           
=======================================
  Files         406      406           
  Lines       22725    22730    +5     
=======================================
+ Hits        19487    19492    +5     
  Misses       3238     3238           
Impacted Files Coverage Δ
torch_geometric/nn/conv/gin_conv.py 97.40% <100.00%> (+0.06%) ⬆️
torch_geometric/nn/conv/graph_conv.py 100.00% <100.00%> (ø)
torch_geometric/nn/conv/sage_conv.py 96.87% <100.00%> (+0.10%) ⬆️

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

@rusty1s rusty1s merged commit 2fc66c5 into master Jan 28, 2023
@rusty1s rusty1s deleted the sparse_tensor branch January 28, 2023 07:57
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

2 participants