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

Subgraph sampling output #116

Open
MortezaRamezani opened this issue Feb 27, 2021 · 2 comments
Open

Subgraph sampling output #116

MortezaRamezani opened this issue Feb 27, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@MortezaRamezani
Copy link

MortezaRamezani commented Feb 27, 2021

Similar to #94, the output of saint_subgraph has the same problem.

import torch
from torch_sparse import SparseTensor
import scipy.sparse as sp

dim = 2000
a = sp.rand(dim, dim, density=0.01, format='csr')
a = SparseTensor.from_scipy(a).type_as(torch.FloatTensor())

node_idx = torch.randint(0, dim, (100,))
sampled_adj, _ = a.saint_subgraph(node_idx)
sampled_adj.fill_diag(1) #Error

However when the node_idx is sorted, it's working fine.

node_idx, _ = torch.sort(node_idx)
sampled_adj, _ = a.saint_subgraph(node_idx)
sampled_adj.fill_diag(1)
@rusty1s
Copy link
Owner

rusty1s commented Feb 28, 2021

Thanks for reporting. I will look into it.

@github-actions
Copy link

This issue had no activity for 6 months. It will be closed in 2 weeks unless there is some new activity. Is this issue already resolved?

@github-actions github-actions bot added the stale label Sep 16, 2021
@rusty1s rusty1s added bug Something isn't working and removed stale labels Sep 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants