cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Issue in training GraphSAGE: java.lang.UnsupportedOperationException: Cannot safely convert LongArray

Hi All

I am working on GraphEmbedding using GraphSAGE
I just try the examples available at the
GraphSAGE

I couldn't obtain the result when I execute the following query

CALL gds.beta.graphSage.train(
  'persons_with_instruments',
  {
    modelName: 'multiLabelModel',
    featureProperties: ['age', 'heightAndWeight', 'cost'],
    projectedFeatureDimension: 4
  }
)

It throws an error for the heightAndWeight featureProperty as follows
Failed to invoke procedure gds.beta.graphSage.train: Caused by: java.lang.UnsupportedOperationException: Cannot safely convert LongArray[185, 75] into a Double

For the query

CALL gds.beta.graphSage.train(
  'persons',
  {
    modelName: 'weightedTrainedModel',
    featureProperties: ['age', 'heightAndWeight'],
    relationshipWeightProperty: 'relWeight',
    nodeLabels: ['Person'],
    relationshipTypes: ['KNOWS']
  }
)

I obtained the following error

Failed to invoke procedure gds.beta.graphSage.train: Caused by: java.lang.UnsupportedOperationException: Tried to retrieve a value of type DOUBLE value from properties of type LONG_ARRAY

My Neo4j version is: 4.2.1
Neo4j Desktop version is 1.4.5

Please guide me in this regard asap
Thank you

1 REPLY 1

Hey samantha,
Could you try upgrading to the newest Neo4j version?
I assume you are using GDS version 1.4.1. We recently released version 1.6.1, including fixes to GraphSage.