Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
07-02-2021 12:11 PM
Hi, I am trying to run GraphSage with 2 specified node properties. I am loading the data via Native projection. Prior to this I have checked that no nodes are missing any properties and no relations are missing any values.
The graph creation cypher is:
UNWIND range(0,1) as i
WITH collect('embedding_' + toString(i)) as embeddings
CALL gds.graph.create('interactionGraph',
{grid: {
label : 'grid',
properties: embeddings}},
{CONNECTED:{
orientation: 'UNDIRECTED',
properties: {
similarity: {
property: 'similarity',
defaultValue: 0.0}}
}})
YIELD graphName, nodeCount, relationshipCount
RETURN graphName, nodeCount, relationshipCount
GraphSage training also runs. The command is shown below
CALL gds.beta.graphSage.train(
'interactionGraph',
{
modelName: 'interactionGraphSageModel',
featureProperties: ['embedding_0', 'embedding_1'],
projectedFeatureDimension: 2,
relationshipWeightProperty: 'similarity',
aggregator: 'mean',
activationFunction: 'sigmoid',
sampleSizes: [25, 10],
epochs: 1
}
)
Finally to obtain embeddings,
CALL gds.beta.graphSage.stream(
'interactionGraph',
{modelName: 'interactionGraphSageModel'}
)
YIELD nodeId, embedding
RETURN gds.util.asNode(nodeId).Node AS name, embedding
The above Cypher throws the error:
Failed to invoke procedure gds.beta.graphSage.stream
: Caused by: java.lang.RuntimeException: Found a relationship without the specified property. Consider using defaultValue
when loading the graph.
I had previously thought setting default value on the relationship properties would work, but it has not solved the issue.
Would appreciate it if anyone can help resolve this issue.
07-02-2021 04:21 PM
Which version of the GDS library are you using?
And do you have the code to create your example graph?
07-02-2021 07:29 PM
I am using GDS 1.6.1. Oddly, removing relationshipweightproperty during training allows the program to work successfully.
07-03-2021 02:34 AM
The fix will be available in 1.6.2, you can build GDS locally until then. Look at -> Cannot stream from graphSage model with relationshipWeights property · Issue #118 · neo4j/graph-data...
All the sessions of the conference are now available online