Hi,
I’m trying to go through the XGBoost4J-Spark tutorial (https://xgboost.readthedocs.io/en/latest/jvm/xgboost4j_spark_tutorial.html), but when I reach this line:
val xgbClassificationModel = xgbClassifier.fit(xgbInput)
I get this error:
20/07/17 13:39:14 ERROR NativeLibLoader: failed to load xgboost4j library from jar
20/07/17 13:39:14 ERROR DMatrix: Failed to load native library
java.io.FileNotFoundException: File /lib/libxgboost4j.dylib was not found inside JAR.
I’m using sbt with intellij on a macbook pro, and my build.sbt contains:
scalaVersion := "2.12.12"
val sparkVersion = "3.0.0"
val xgboostVersion = "1.2.0-SNAPSHOT"
resolvers += "XGBoost4J Snapshot Repo" at "https://s3-us-west-2.amazonaws.com/xgboost-maven-repo/snapshot/"
libraryDependencies ++= Seq(
"org.apache.spark" %% "spark-core" % sparkVersion,
"org.apache.spark" %% "spark-sql" % sparkVersion,
"org.apache.spark" %% "spark-mllib" % sparkVersion,
"ml.dmlc" %% "xgboost4j" % xgboostVersion,
"ml.dmlc" %% "xgboost4j-spark" % xgboostVersion
)
Interestingly, I’m finding a libxgboost4j.so
in the xgboost4j_2.12-1.2.0-20200717.090328-58.jar/lib
under the External Libraries of my intellij project. I’ve tried using multiple different release versions including 1.1.1 (with a different resolver), and snapshot versions, but I can’t seem to resolve this. Any insight would be much appreciated!
Thanks,
Edmond