Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
05-04-2022 12:43 PM
I am running the random walk algorithm on my graph with just 4 nodes and 8 edges as a test. When I don't specify the sourceNodes
parameter, everything is fine and I get walks from all the nodes. Here is my code:
CALL gds.beta.randomWalk.stream(
'example',
{
walkLength: 2,
walksPerNode: 1,
randomSeed: 42,
concurrency: 1
}
)
YIELD nodeIds, path
RETURN nodeIds, [node IN nodes(path) | node.name ] AS event_name
So far so good. But when I specify a source node at a particular node present in the projected graph, the query runs forever and doesn't terminate. Here is the query:
MATCH (n:IDHcodel:Molecular)
WHERE n.name IN ['9q34o3']
WITH COLLECT(n) as sourceNodes
CALL gds.beta.randomWalk.stream(
'example',
{
sourceNodes: sourceNodes,
walkLength: 2,
walksPerNode: 1,
randomSeed: 42,
concurrency: 1
}
)
YIELD nodeIds, path
RETURN nodeIds, [node IN nodes(path) | node.name ] AS event_name
I certainly made sure that the node is in the projected graph. Any help would be appreciated. Thanks.
05-05-2022 10:27 AM
What version of GDS are you running? We've just released patches - 1.8.7 and 2.0.3 - that include a bug fix for random walk with specified start nodes.
05-05-2022 12:54 PM
The GDS version is 1.8.2
05-06-2022 08:40 AM
Thanks, Alicia. I have requested my admin to upgrade to the latest version.
Best
K
All the sessions of the conference are now available online