Comments (8)
Thanks a lot, I'm able to make it working with latest versions of spark.
from isolation-forest.
Below function threw error:
private def getMetadataToSave(
instance: Params,
spark: SparkSession,
extraMetadata: Option[JObject] = None): String = {
val uid = instance.uid
val cls = instance.getClass.getName
val params = instance.extractParamMap.toSeq
val jsonParams = render(params.map { case ParamPair(p, v) =>
p.name -> parse(p.jsonEncode(v))
}.toList)
val basicMetadata = ("class" -> cls) ~
("timestamp" -> System.currentTimeMillis()) ~
("sparkVersion" -> spark.sparkContext.version) ~
("uid" -> uid) ~
("paramMap" -> jsonParams)
val metadata = extraMetadata match {
case Some(jObject) => basicMetadata ~ jObject
case None => basicMetadata
}
val metadataJson = compact(render(metadata))
metadataJson
}
}
And problem is happening while saving model.
from isolation-forest.
What version of Spark and Scala are you using?
The recommended versions for the project are:
Scala 2.11.8
Spark 2.3.0
These are the versions used to produce the jars on Bintray.
from isolation-forest.
I'm using databrick platform, and below is the scala and spark version:
spark-version : 2.4.3
scala-version : 2.11.12
In order to make current iForest working on latest spark version, what are the essential steps which I can follow. There should not be much difference between spark 2.3 and 2.4, apart from json4s.
from isolation-forest.
It is currently recommended to use Scala 2.11 and Spark 2.3.
You will need to build the isolation-forest library yourself using Spark 2.4 if you want to use it in a Spark 2.4 environment. You will need to change some dependencies in the module-level build.gradle file.
Please try the instructions in this ticket: #1
from isolation-forest.
Thanks a lot. I'll give it a try.
from isolation-forest.
@sandeep1288: Cool. Please let me know if it works. Thanks!
from isolation-forest.
from isolation-forest.
Related Issues (16)
- The library gives error while writing model using Spark 2.4 HOT 6
- Unable to save and load model HOT 5
- Publish for Scala 2.12 HOT 8
- Publish artifact for spark 3.0.0 HOT 3
- PySpark support HOT 2
- Issue saving the model HOT 2
- Wrong count of anomalies without respecting contamination HOT 11
- Multiple Rows as One Data Point HOT 2
- Unable to save model HOT 2
- Publish for Scala 2.13 HOT 2
- question about the withReplacement param in BaggedPoint.scala HOT 2
- Installation in spark HOT 3
- Spark 3.4.0 support HOT 2
- InvalidClassExcepiton HOT 12
- Load Model Error: java.lang.UnsupportedOperationException: empty collection HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from isolation-forest.