linkedin / isolation-forest

A distributed Spark/Scala implementation of the isolation forest algorithm for unsupervised outlier detection, featuring support for scalable training and ONNX export for seamless cross-platform inference.
Other
229 stars 47 forks source link

Load Model Error: java.lang.UnsupportedOperationException: empty collection #6

Closed juzheng-zhang-1989 closed 4 years ago

juzheng-zhang-1989 commented 4 years ago

Hi Team,

I compiled the project for spark 2.4 following the instructions at homepage. It has been built successfully and passed all tests. But I still got the error below when I try to load trained model (model save can work). Any one can help?

Regards, James

java.lang.UnsupportedOperationException: empty collection at org.apache.spark.rdd.RDD$$anonfun$first$1.apply(RDD.scala:1380) at org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:151) at org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:112) at org.apache.spark.rdd.RDD.withScope(RDD.scala:363) at org.apache.spark.rdd.RDD.first(RDD.scala:1377) at com.linkedin.relevance.isolationforest.IsolationForestModelReadWrite$IsolationForestModelReader.loadMetadata(IsolationForestModelReadWrite.scala:192) at com.linkedin.relevance.isolationforest.IsolationForestModelReadWrite$IsolationForestModelReader.loadImpl(IsolationForestModelReadWrite.scala:81) at com.linkedin.relevance.isolationforest.IsolationForestModelReadWrite$IsolationForestModelReader.load(IsolationForestModelReadWrite.scala:50) at com.linkedin.relevance.isolationforest.IsolationForestModelReadWrite$IsolationForestModelReader.load(IsolationForestModelReadWrite.scala:38) at org.apache.spark.ml.util.MLReadable$class.load(ReadWrite.scala:380) at com.linkedin.relevance.isolationforest.IsolationForestModel$.load(IsolationForestModel.scala:140) ... 40 elided

juzheng-zhang-1989 commented 4 years ago

It works now. Problem with my system settings. Thanks

jverbus commented 4 years ago

Thanks, @juzheng-zhang-1989. Glad to hear it is working!