Skip to content

index X is out of bounds for axis 0 with size Y when pooling #36

@TMorville

Description

@TMorville

First off, thanks for developing and sharing this interesting package. I've forked the repo and all test cases work fine. This is probably related to #14, but I've made a new issue because I have data.

I have an adjacency matrix from a large directed graph. The dimensions of the adjacency matrix are (7919711, 7116242) and the structure is extremely sparse, number of non-zero elements are 2732656.

When I try to run the pooling on a subset (10000x10000) of my own data that you can find here (5.07 KB file) I can produce errors with the flavour (ran on sparse_adj_subset)

---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
<ipython-input-91-7776269d0a82> in <module>()
----> 1 graphs, perm = coarsening.coarsen(ajd_sparse_ss, levels=3, self_connections=False)

~/projects/erst/graph-embedding/lib/coarsening.py in coarsen(A, levels, self_connections)
      8     levels.
      9     """
---> 10     graphs, parents = metis(A, levels)
     11     perms = compute_perm(parents)
     12 

~/projects/erst/graph-embedding/lib/coarsening.py in metis(W, levels, rid)
     80         cc = idx_col[perm]
     81         vv = val[perm]
---> 82         cluster_id = metis_one_level(rr,cc,vv,rid,weights)  # rr is ordered
     83         parents.append(cluster_id)
     84 

~/projects/erst/graph-embedding/lib/coarsening.py in metis_one_level(rr, cc, vv, rid, weights)
    140     for ii in range(N):
    141         tid = rid[ii]
--> 142         if not marked[tid]:
    143             wmax = 0.0
    144             rs = rowstart[tid]

IndexError: index 9977 is out of bounds for axis 0 with size 9974

And if I rerun, I get

index 9994 is out of bounds for axis 0 with size 9974

showing that the index changes.

I am running with graphs, perm = coarsening.coarsen(ajd_sparse_ss, levels=3, self_connections=False) but setting self_connections=True gives similar problems.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions