Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
08-17-2021 12:39 PM
I have searched for a similar topic and did not find one, so here goes:
System: MacBookPro, OS 11.5.1, Intel Chipset
Neo4J: Enterprise v4.3.2
GDS: v1.6
I have meticulously (copied) the GDS 1.6 Examples (Section 3) for:
totalCost
property was mutated correctly:Can someone from Neo4J verify the .write() issue associated with these algorithms. BTW: I stopped with these, assuming the bug was ubiquitous.
Thanks...
08-19-2021 02:28 PM
Anyone at Neo4J have a chance to look at this yet? Thanks.
08-20-2021 01:01 AM
Hello @skerr ,
thank you for reporting the error!
I could verify the error and it seems to occur when running Yens multiple times with different modes.
Running f.i. only write mode works.
I hope this can be a workaround for now and we will investigate further in the meantime.
Update: Using mutate + writeRelationship worked for me.
08-20-2021 01:37 AM
The problem lies in the chained execution of the examples.
On mutate, you create a new relationship type in the in-memory graph. The created PATH
relationships only have the property totalCost
but not cost
.
When you execute the write example afterwards, GDS checks if all relationships have a cost
property defined. This is not the case for the newly created PATH
relationships.
To exclude the newly created PATH relationships, specify relationshipTypes: ['ROAD']
.
08-22-2021 03:24 PM
Florentin: Thank you for verifying the issue. My follow-up question:
I thought the entire point of the chained execution is the ability to write the optimized relationship PATH
and the relevant properties between the sourceNode and targetNode back in the Neo4J database. In your comment you note to exclude the PATH
relationship. Why?
08-22-2021 03:34 PM
Florentin: Skipping the mutate
execution mode and proceeding directly to the write
execution mode works fine.
08-23-2021 12:27 AM
We have three main modes for our algorithms: stream, mutate, write.
Stream - Directly returns the results, easy to inspect but inefficient to persist.
Mutate - Writes the result into the GDS in-memory graph (not persisted on the neo4j db). The results can be used in following GDS algorithm/procedure calls.
Write - Writes the result into the neo4j db. Not usable in GDS without projecting a new graph.
However, after mutate you dont need to recompute the result to write it back to the neo4j db.
To simply write the computed result back to Neo4j you can use (Graph Catalog - Neo4j Graph Data Science)
All the sessions of the conference are now available online