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

Node2Vec in a large graph #28

Closed
timilsinamohan opened this issue Dec 22, 2020 · 2 comments
Closed

Node2Vec in a large graph #28

timilsinamohan opened this issue Dec 22, 2020 · 2 comments

Comments

@timilsinamohan
Copy link

Hi,
Thanks for the clarification to solve the Issue number 27. Now that works fine after I upgrade the csrgraph to version 0.1.27. Now the next issue is that I got Segmentation fault while running node2vec. Is there any suggestion to fix this?

G = csr_matrix(G)
n2v_model = nodevectors.Node2Vec()
n2v_model.fit(G)

Segmentation fault

Do I need to update the nodevectors package as well after I update the csrgraph ? If so which version is needed?

Thanks in advance !

@VHRanger
Copy link
Owner

VHRanger commented Dec 22, 2020

If you absolutely insist on running Node2Vec, I'd recommend modifying the settings in the Node2Vec class like this

 nodevectors.Node2Vec(
        walklen=20, 
        epochs=5,
        return_weight=1.,
        neighbor_weight=1.,
        threads=1, 
        verbose=True
)

Segfaults are generally related to threading (so using threads != 1 ) with using return_weight or neighbor_weight different than 1. If you keep threads to 1 and walk weights to default settings it shouldn't segfault.

You can always try some of the other embedding algorithms (GGVec, GraRep, ProNE) -- Node2Vec is the only one that has this segfault issue and it's been hard to replicate and find the cause as of yet. Node2Vec is also not particularly better than the other ones, it's just more well known.

To help with the segfault, can you send me your setup? Your computer, python, numpy, numba version the Node2Vec settings used and either a link to your graph data or some statistics on it (directed or undirected, number of nodes and edges, etc.)

Thanks

@VHRanger
Copy link
Owner

VHRanger commented Jan 7, 2021

Since this isn't being expanded upon, and I can't replicate it, I'll close the issue.

Please message me or reopen an issue if you run into anything, or this persists

@VHRanger VHRanger closed this as completed Jan 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants