Skip to content

Bugs of subgraph augmentation #24

Closed
@hyp1231

Description

@hyp1231

Hi,
when browsing the code, I found there might be bugs in the subgraph augmentation.

In Python 3.7+, the union operation is not an inplace operation, so that idx_neigh will not be updated properly. In this situation, only 1-hop subgraph of a random centor node will be generated.

Some examples:

idx_neigh.union(set([n for n in edge_index[1][edge_index[0]==idx_sub[-1]]]))

idx_neigh.union(set([n for n in edge_index[1][edge_index[0]==idx_sub[-1]]]))

idx_neigh.union(set([n for n in edge_index[1][edge_index[0]==idx_sub[-1]]]))

idx_neigh.union(set([n for n in edge_index[1][edge_index[0]==idx_sub[-1]]]))

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