[jvm-packages][xgboost4j-spark][Minor] Move sparkContext dependency from the XGBoostModel (#1335)

* Move sparkContext dependency from the XGBoostModel

* Update Spark example to declare SparkContext as implict
This commit is contained in:
Rahul
2016-07-08 16:13:33 +05:30
committed by Nan Zhu
parent 3f32b3f0eb
commit f14c160f4f
2 changed files with 3 additions and 3 deletions

View File

@@ -31,7 +31,7 @@ object DistTrainWithSpark {
val sparkConf = new SparkConf().setAppName("XGBoost-spark-example")
.set("spark.serializer", "org.apache.spark.serializer.KryoSerializer")
sparkConf.registerKryoClasses(Array(classOf[Booster]))
val sc = new SparkContext(sparkConf)
implicit val sc = new SparkContext(sparkConf)
val inputTrainPath = args(2)
val inputTestPath = args(3)
val outputModelPath = args(4)