You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
com.google.common.util.concurrent.ExecutionError: java.lang.OutOfMemoryError: Java heap space
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2205)
at com.google.common.cache.LocalCache.get(LocalCache.java:3953)
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3957)
at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4875)
at org.jpmml.evaluator.CacheUtil.getValue(CacheUtil.java:51)
at org.jpmml.evaluator.ModelEvaluator.getValue(ModelEvaluator.java:1028)
at org.jpmml.evaluator.support_vector_machine.SupportVectorMachineModelEvaluator.getVectorMap(SupportVectorMachineModelEvaluator.java:439)
at org.jpmml.evaluator.support_vector_machine.SupportVectorMachineModelEvaluator.evaluateSupportVectorMachine(SupportVectorMachineModelEvaluator.java:299)
at org.jpmml.evaluator.support_vector_machine.SupportVectorMachineModelEvaluator.evaluateClassification(SupportVectorMachineModelEvaluator.java:193)
at org.jpmml.evaluator.ModelEvaluator.evaluateInternal(ModelEvaluator.java:681)
at org.jpmml.evaluator.ModelEvaluator.evaluate(ModelEvaluator.java:580)
at com.mimecast.scala.ml.contentclassifier.ContentClassifier$.getVoteDistribution(ContentClassifier.scala:143)
at com.mimecast.scala.ml.contentclassifier.ContentClassifier$$anonfun$eval$1.apply(ContentClassifier.scala:53)
at com.mimecast.scala.ml.contentclassifier.ContentClassifier$$anonfun$eval$1.apply(ContentClassifier.scala:51)
at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:186)
at com.mimecast.scala.ml.contentclassifier.ContentClassifier$.eval(ContentClassifier.scala:51)
at com.mimecast.scala.ml.contentclassifier.ContentClassifier.eval(ContentClassifier.scala)
at com.mimecast.implementation.contentclassifier.ContentClassifierModel.predict(ContentClassifierModel.java:39)
at com.mimecast.implementation.contentclassifier.ContentClassifierModel.predict(ContentClassifierModel.java:17)
at com.mimecast.ml.models.versioning.LocalModelReferenceManager.initializeModel(LocalModelReferenceManager.java:73)
at com.mimecast.ml.models.versioning.ModelReferenceManager.initializeReference(ModelReferenceManager.java:31)
at com.mimecast.ml.models.versioning.LocalModelReferenceManager.<init>(LocalModelReferenceManager.java:35)
at com.mimecast.implementation.contentclassifier.ContentClassifierModelReferenceManager.<init>(ContentClassifierModelReferenceManager.java:15)
at com.mimecast.implementation.contentclassifier.ContentClassifierModelManager.initialize(ContentClassifierModelManager.java:51)
at com.mimecast.implementation.contentclassifier.ContentClassifierMemoryLeakTest.testLeak(ContentClassifierMemoryLeakTest.java:12)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
Caused by: java.lang.OutOfMemoryError: Java heap space
at com.google.common.primitives.Doubles.toArray(Doubles.java:427)
at org.jpmml.evaluator.support_vector_machine.SupportVectorMachineModelEvaluator.toArray(SupportVectorMachineModelEvaluator.java:499)
at org.jpmml.evaluator.support_vector_machine.SupportVectorMachineModelEvaluator.parseVectorDictionary(SupportVectorMachineModelEvaluator.java:483)
at org.jpmml.evaluator.support_vector_machine.SupportVectorMachineModelEvaluator.access$000(SupportVectorMachineModelEvaluator.java:91)
at org.jpmml.evaluator.support_vector_machine.SupportVectorMachineModelEvaluator$2.load(SupportVectorMachineModelEvaluator.java:509)
at org.jpmml.evaluator.support_vector_machine.SupportVectorMachineModelEvaluator$2.load(SupportVectorMachineModelEvaluator.java:505)
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3542)
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2323)
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2286)
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2201)
at com.google.common.cache.LocalCache.get(LocalCache.java:3953)
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3957)
at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4875)
at org.jpmml.evaluator.CacheUtil.getValue(CacheUtil.java:51)
at org.jpmml.evaluator.ModelEvaluator.getValue(ModelEvaluator.java:1028)
at org.jpmml.evaluator.support_vector_machine.SupportVectorMachineModelEvaluator.getVectorMap(SupportVectorMachineModelEvaluator.java:439)
at org.jpmml.evaluator.support_vector_machine.SupportVectorMachineModelEvaluator.evaluateSupportVectorMachine(SupportVectorMachineModelEvaluator.java:299)
at org.jpmml.evaluator.support_vector_machine.SupportVectorMachineModelEvaluator.evaluateClassification(SupportVectorMachineModelEvaluator.java:193)
at org.jpmml.evaluator.ModelEvaluator.evaluateInternal(ModelEvaluator.java:681)
at org.jpmml.evaluator.ModelEvaluator.evaluate(ModelEvaluator.java:580)
at com.mimecast.scala.ml.contentclassifier.ContentClassifier$.getVoteDistribution(ContentClassifier.scala:143)
at com.mimecast.scala.ml.contentclassifier.ContentClassifier$$anonfun$eval$1.apply(ContentClassifier.scala:53)
at com.mimecast.scala.ml.contentclassifier.ContentClassifier$$anonfun$eval$1.apply(ContentClassifier.scala:51)
at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:186)
at com.mimecast.scala.ml.contentclassifier.ContentClassifier$.eval(ContentClassifier.scala:51)
at com.mimecast.scala.ml.contentclassifier.ContentClassifier.eval(ContentClassifier.scala)
at com.mimecast.implementation.contentclassifier.ContentClassifierModel.predict(ContentClassifierModel.java:39)
at com.mimecast.implementation.contentclassifier.ContentClassifierModel.predict(ContentClassifierModel.java:17)
at com.mimecast.ml.models.versioning.LocalModelReferenceManager.initializeModel(LocalModelReferenceManager.java:73)
at com.mimecast.ml.models.versioning.ModelReferenceManager.initializeReference(ModelReferenceManager.java:31)
at com.mimecast.ml.models.versioning.LocalModelReferenceManager.(LocalModelReferenceManager.java:35)
The support vector machine was trained with sparse vectors and that is reflected in the pmml.
After doing some inspection it looks like SparseArrayUtil.asNumberList takes the support vectors which should be sparse and expands them into the full array. This is what is causing a memory leak for me.
The text was updated successfully, but these errors were encountered:
Hi, I am getting the following error
com.google.common.util.concurrent.ExecutionError: java.lang.OutOfMemoryError: Java heap space
Caused by: java.lang.OutOfMemoryError: Java heap space
at com.google.common.primitives.Doubles.toArray(Doubles.java:427)
at org.jpmml.evaluator.support_vector_machine.SupportVectorMachineModelEvaluator.toArray(SupportVectorMachineModelEvaluator.java:499)
at org.jpmml.evaluator.support_vector_machine.SupportVectorMachineModelEvaluator.parseVectorDictionary(SupportVectorMachineModelEvaluator.java:483)
at org.jpmml.evaluator.support_vector_machine.SupportVectorMachineModelEvaluator.access$000(SupportVectorMachineModelEvaluator.java:91)
at org.jpmml.evaluator.support_vector_machine.SupportVectorMachineModelEvaluator$2.load(SupportVectorMachineModelEvaluator.java:509)
at org.jpmml.evaluator.support_vector_machine.SupportVectorMachineModelEvaluator$2.load(SupportVectorMachineModelEvaluator.java:505)
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3542)
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2323)
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2286)
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2201)
at com.google.common.cache.LocalCache.get(LocalCache.java:3953)
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3957)
at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4875)
at org.jpmml.evaluator.CacheUtil.getValue(CacheUtil.java:51)
at org.jpmml.evaluator.ModelEvaluator.getValue(ModelEvaluator.java:1028)
at org.jpmml.evaluator.support_vector_machine.SupportVectorMachineModelEvaluator.getVectorMap(SupportVectorMachineModelEvaluator.java:439)
at org.jpmml.evaluator.support_vector_machine.SupportVectorMachineModelEvaluator.evaluateSupportVectorMachine(SupportVectorMachineModelEvaluator.java:299)
at org.jpmml.evaluator.support_vector_machine.SupportVectorMachineModelEvaluator.evaluateClassification(SupportVectorMachineModelEvaluator.java:193)
at org.jpmml.evaluator.ModelEvaluator.evaluateInternal(ModelEvaluator.java:681)
at org.jpmml.evaluator.ModelEvaluator.evaluate(ModelEvaluator.java:580)
at com.mimecast.scala.ml.contentclassifier.ContentClassifier$.getVoteDistribution(ContentClassifier.scala:143)
at com.mimecast.scala.ml.contentclassifier.ContentClassifier$$anonfun$eval$1.apply(ContentClassifier.scala:53)
at com.mimecast.scala.ml.contentclassifier.ContentClassifier$$anonfun$eval$1.apply(ContentClassifier.scala:51)
at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:186)
at com.mimecast.scala.ml.contentclassifier.ContentClassifier$.eval(ContentClassifier.scala:51)
at com.mimecast.scala.ml.contentclassifier.ContentClassifier.eval(ContentClassifier.scala)
at com.mimecast.implementation.contentclassifier.ContentClassifierModel.predict(ContentClassifierModel.java:39)
at com.mimecast.implementation.contentclassifier.ContentClassifierModel.predict(ContentClassifierModel.java:17)
at com.mimecast.ml.models.versioning.LocalModelReferenceManager.initializeModel(LocalModelReferenceManager.java:73)
at com.mimecast.ml.models.versioning.ModelReferenceManager.initializeReference(ModelReferenceManager.java:31)
at com.mimecast.ml.models.versioning.LocalModelReferenceManager.(LocalModelReferenceManager.java:35)
The support vector machine was trained with sparse vectors and that is reflected in the pmml.
After doing some inspection it looks like SparseArrayUtil.asNumberList takes the support vectors which should be sparse and expands them into the full array. This is what is causing a memory leak for me.
The text was updated successfully, but these errors were encountered: