From 7b7349aaa2e7c2c5ae6cdad4ca160a3e2f144037 Mon Sep 17 00:00:00 2001 From: Nan Zhu Date: Mon, 29 Apr 2019 14:40:32 -0700 Subject: [PATCH] fix the split of input --- .../ml/dmlc/xgboost4j/scala/spark/XGBoostGeneralSuite.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jvm-packages/xgboost4j-spark/src/test/scala/ml/dmlc/xgboost4j/scala/spark/XGBoostGeneralSuite.scala b/jvm-packages/xgboost4j-spark/src/test/scala/ml/dmlc/xgboost4j/scala/spark/XGBoostGeneralSuite.scala index 45ff6e060bcb..36400f99fdb1 100644 --- a/jvm-packages/xgboost4j-spark/src/test/scala/ml/dmlc/xgboost4j/scala/spark/XGBoostGeneralSuite.scala +++ b/jvm-packages/xgboost4j-spark/src/test/scala/ml/dmlc/xgboost4j/scala/spark/XGBoostGeneralSuite.scala @@ -329,7 +329,7 @@ class XGBoostGeneralSuite extends FunSuite with PerTest { test("train with multiple validation datasets (ranking)") { val training = buildDataFrameWithGroup(Ranking.train, 5) - val Array(train, eval1, eval2) = training.randomSplit(Array(0.6, 0.2, 0.2)) + val Array(train, eval1, eval2) = training.randomSplit(Array(0.6, 0.2, 0.2), 0) val paramMap1 = Map("eta" -> "1", "max_depth" -> "6", "objective" -> "rank:pairwise", "num_round" -> 5, "num_workers" -> numWorkers, "group_col" -> "group")