Closed apappascs closed 2 years ago
@alexpappasc thank you for reporting this, is there any way you can share the underlying Neo4j database and/or any graph dimensions, i.e. node count, relationship count?
Thank you for @vnickolov I am providing some data prof here:
Total | 112.37 MiB Database | 13.35 MiB
Node ID | 4744 Property ID | 164965 Relationship ID | 163371 Relationship Type ID | 3
Hits | 23036 Page Faults | 1879 Hit Ratio | 100.00% Usage Ratio | 0.69%
Last Tx Id | 1392 Current Read | 1 Current Write | 0 Peak Transactions | 6 Committed Read | 129 Committed Write | 1
Index Name | Type | Uniqueness | EntityType | LabelsOrTypes | Properties | State |
---|---|---|---|---|---|---|
graphxrIndex | FULLTEXT | NONUNIQUE | NODE | [ "COUNTRY" ] | [ "name" ] | ONLINE |
index_343aff4e | LOOKUP | NONUNIQUE | NODE | [] | [] | ONLINE |
index_f7700477 | LOOKUP | NONUNIQUE | RELATIONSHIP | [] | [] | ONLINE |
╒════════════════════════════════════════════════════════╤═══════════════╕
│"nodes" │"relationships"│
╞════════════════════════════════════════════════════════╪═══════════════╡
│[{"name":"COUNTRY","indexes":["name"],"constraints":[]}]│[{},{}] │
└────────────────────────────────────────────────────────┴───────────────┘
CALL gds.graph.create(
'countries',
'COUNTRY',
{
SENDING: {
orientation: 'NATURAL',
properties: ['total']
}
}
)
╒═══════════════════════════════════════════════╤══════════════════════════════════════════════════════════════════════╤═══════════╤═══════════╤═══════════════════╤══════════════╕
│"nodeProjection" │"relationshipProjection" │"graphName"│"nodeCount"│"relationshipCount"│"createMillis"│
╞═══════════════════════════════════════════════╪══════════════════════════════════════════════════════════════════════╪═══════════╪═══════════╪═══════════════════╪══════════════╡
│{"COUNTRY":{"label":"COUNTRY","properties":{}}}│{"SENDING":{"orientation":"NATURAL","aggregation":"DEFAULT","type":"SE│"countries"│120 │2371 │157 │
│ │NDING","properties":{"total":{"defaultValue":null,"property":"total","│ │ │ │ │
│ │aggregation":"DEFAULT"}}}} │ │ │ │ │
└───────────────────────────────────────────────┴──────────────────────────────────────────────────────────────────────┴───────────┴───────────┴───────────────────┴──────────────┘
CALL gds.eigenvector.write('countries', {maxIterations: 20, writeProperty: 'centrality'})
Neo.ClientError.Procedure.ProcedureCallFailed
Failed to invoke procedure `gds.eigenvector.write`: Caused by: java.lang.ArrayIndexOutOfBoundsException: The value 0.15111707420831302 is out of bounds for histogram, current covered range [8.433758354584419E-81, 1.448908652612274E-70) cannot be extended any further.
Caused by: java.lang.ArrayIndexOutOfBoundsException: Cannot resize histogram covered range beyond (1L << 63) / (1L << 17) - 1.
Caused by: java.lang.ArrayIndexOutOfBoundsException: Operation would underflow and lose precision of already recorded value counts
CALL gds.betweenness.write('countries', {writeProperty: 'centrality'})
╒═══════════════════════╤═════════════╤══════════════════════════════════════════════════════════════════════╤══════════════╤════════════════╤═════════════════╤══════════════════════╤══════════════╤═══════════════╤══════════════════════════════════════════════════════════════════════╕
│"nodePropertiesWritten"│"writeMillis"│"centralityDistribution" │"minimumScore"│"maximumScore" │"scoreSum" │"postProcessingMillis"│"createMillis"│"computeMillis"│"configuration" │
╞═══════════════════════╪═════════════╪══════════════════════════════════════════════════════════════════════╪══════════════╪════════════════╪═════════════════╪══════════════════════╪══════════════╪═══════════════╪══════════════════════════════════════════════════════════════════════╡
│120 │36 │{"p99":67.74804306030273,"min":0.0,"max":5630.093746185303,"mean":60.1│0.0 │5630.09027182152│7212.999999999999│123 │0 │39 │{"writeConcurrency":4,"writeProperty":"centrality","nodeLabels":["*"],│
│ │ │08238252003986,"p90":51.820552825927734,"p50":0.0,"p999":5630.09374618│ │ │ │ │ │ │"sudo":false,"relationshipTypes":["*"],"username":null,"concurrency":4│
│ │ │5303,"p95":67.74804306030273,"p75":18.148433685302734} │ │ │ │ │ │ │} │
└───────────────────────┴─────────────┴──────────────────────────────────────────────────────────────────────┴──────────────┴────────────────┴─────────────────┴──────────────────────┴──────────────┴───────────────┴──────────────────────────────────────────────────────────────────────┘
Lets fetch stat results with cypher
CALL gds.eigenvector.stream('countries')
Yield nodeId, score
Return min(score) as min, max(score) as max,
percentileDisc(score,0.50) as p50, percentileDisc(score,0.75) as p75,
percentileDisc(score,0.90) as p90, percentileDisc(score,0.95) as p95,
percentileDisc(score,0.99) as p99, percentileDisc(score,0.999) as p999,
avg(score) as avg, stDev(score) as stDev
╒══════════════════════╤═══════════════════╤═════════════════════╤══════════════════╤═══════════════════╤═══════════════════╤═══════════════════╤═══════════════════╤═══════════════════╤═══════════════════╕
│"min" │"max" │"p50" │"p75" │"p90" │"p95" │"p99" │"p999" │"avg" │"stDev" │
╞══════════════════════╪═══════════════════╪═════════════════════╪══════════════════╪═══════════════════╪═══════════════════╪═══════════════════╪═══════════════════╪═══════════════════╪═══════════════════╡
│1.5998814952422848e-80│0.16057834684707384│0.0035554138994582643│0.1310891025405734│0.15962357714750902│0.16057834684707384│0.16057834684707384│0.16057834684707384│0.05965645441326826│0.06938704584621574│
└──────────────────────┴───────────────────┴─────────────────────┴──────────────────┴───────────────────┴───────────────────┴───────────────────┴───────────────────┴───────────────────┴───────────────────┘
It works! The problem is if and only if you include on YIELD fields the centralityDistribution
I have same problem I create a graph with all nodes and relationships, and this error happen
Failed to invoke procedure gds.eigenvector.stats
: Caused by: java.lang.ArrayIndexOutOfBoundsException: The value 4.6794376646547155E-55 is out of bounds for histogram, current covered range [4.930380657631324E-32, 8.470329472543003E-22) cannot be extended any further.
Caused by: java.lang.ArrayIndexOutOfBoundsException: Cannot resize histogram covered range beyond (1L << 63) / (1L << 17) - 1.
Caused by: java.lang.ArrayIndexOutOfBoundsException: Operation would overflow, would discard recorded value counts
The problem is in the library we use to compute the distribution. We have introduced a workaround that will prevent the algorithm failing hard. Instead, we will capture the error and show it as part of the result. We have raised the issue upstream, but no response yet. https://github.com/HdrHistogram/HdrHistogram#190
Feel free to provide feedback on our workaround. We have no further work planned on this issue, I will leave the issue open for a little bit to see if there is further feedback.
Describe the bug
Having a named graph 'countries'
All centralities run without any issue for write but eigenvector fails if YIELD centralityDistribution.
To Reproduce
GDS version: 1.8.1 Neo4j version: 4.3.3 Operating system: (macOs)
Steps to reproduce the behavior:
[ ]
CALL gds.graph.create( 'countries', 'COUNTRY', { SENDING: { orientation: 'NATURAL', properties: ['total'] } } )
[ ] Cypher query:
CALL gds.eigenvector.write('countries', {maxIterations: 20, writeProperty: 'centrality'})
Additional context