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.