question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

torch_geometric.loader clusterData Issue with Partitioning

See original GitHub issue

I’m looping through and trying to cluster large graphs into smaller partitions. When I use the clusterData function like so:

graph = pytorch_geometric.Data.data object 
graph2 = pytorch_geometric.Data.data object 


clusters1 = ClusterData(graph, 200)
clusters2 = ClusterData(graph2,200)

etc. (I’m doing much more than 2 graphs but it’s the same code repeated in a loop)

The code works for some of the graphs and I get the expected output:

Computing METIS partitioning... 
Done!


but then half way through I get this error:

Process finished with exit code -1073741819 (0xC0000005) I’ve gotten a similar partitioning error across both a Mac and a windows 10 laptop. If someone could help me out with this or at least point me to some resources where I might go about solving this issue it would be so helpful.

Environment: python=3.7.11 torch==1.9.0 torch_cluster== 1.5.9 torch_geometric== 2.0.1 torch_scatter== 2.0.8 torch_sparse== 0.6.12 torch_spline_conv== 1.2.1 torchmetrics== 0.5.1

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:18 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
rusty1scommented, Sep 24, 2021

I see. You can copy the ClusterData class and apply some modifications to it (adding self-loops, adding reverse edges), e.g.:

edge_index, _ = add_self_loops(data.edge_index)
edge_index, _ = to_undirected(data.edge_index)
adj = SparseTensor(
    row=edge_index[0], col=edge_index[1],
    value=torch.arange(edge_index.size(1), device=data.edge_index.device),    
    sparse_sizes=(N, N))
0reactions
licyclecommented, May 13, 2022

which jupyter kernerl version are you using?

Read more comments on GitHub >

github_iconTop Results From Across the Web

torch_geometric.loader.cluster - PyTorch Geometric
Source code for torch_geometric.loader.cluster ... Dataset): r"""Clusters/partitions a graph data object into multiple subgraphs, as motivated by the ...
Read more >
Issue using Cluster Loader #1490 - GitHub
I am attempting to use ClusterData and ClusterLoader to partition my ... from torch_geometric.data import ClusterData, ClusterLoader G ...
Read more >
Micro-partitions & Data Clustering - Snowflake Documentation
Traditional data warehouses rely on static partitioning of large tables to achieve acceptable performance and enable better ... Sections in this topic:.
Read more >
torch_geometric.loader DataLoader doesn't create batches
So the partition['train'] array contains 10 files in this case and the Dataloader is creating only one batch with all the files hence...
Read more >
Partitioning Sessions with External Loaders
You also choose an external loader connection for each partition. The Integration Service creates an output file for each partition, and the external...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found