diff --git a/Jenkinsfile b/Jenkinsfile
index a91bd430b..6953f6622 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -62,8 +62,8 @@ pipeline {
// using CentOS 7 image
'build-gpu-cuda11.0': { BuildCUDA(cuda_version: '11.0', build_rmm: true) },
'build-gpu-rpkg': { BuildRPackageWithCUDA(cuda_version: '11.0') },
- 'build-jvm-packages-gpu-cuda11.0': { BuildJVMPackagesWithCUDA(spark_version: '3.0.0', cuda_version: '11.0') },
- 'build-jvm-packages': { BuildJVMPackages(spark_version: '3.0.0') },
+ 'build-jvm-packages-gpu-cuda11.0': { BuildJVMPackagesWithCUDA(spark_version: '3.0.1', cuda_version: '11.0') },
+ 'build-jvm-packages': { BuildJVMPackages(spark_version: '3.0.1') },
'build-jvm-doc': { BuildJVMDoc() }
])
}
diff --git a/jvm-packages/pom.xml b/jvm-packages/pom.xml
index dbe457390..cd5fedf7d 100644
--- a/jvm-packages/pom.xml
+++ b/jvm-packages/pom.xml
@@ -68,17 +68,6 @@
xgboost4j-spark
xgboost4j-flink
-
-
-
- org.scalatest
- scalatest-maven-plugin
-
- ml.dmlc.xgboost4j.java.GpuTestSuite
-
-
-
-
@@ -94,37 +83,6 @@
xgboost4j-gpu
xgboost4j-spark-gpu
-
-
-
- org.scalatest
- scalatest-maven-plugin
-
-
-
-
-
-
-
- gpu-with-gpu-tests
-
- ON
-
-
- xgboost4j-gpu
- xgboost4j-spark-gpu
-
-
-
-
- org.scalatest
- scalatest-maven-plugin
-
- ml.dmlc.xgboost4j.java.GpuTestSuite
-
-
-
-
diff --git a/jvm-packages/xgboost4j-spark/src/test/scala/ml/dmlc/xgboost4j/scala/spark/XGBoostClassifierSuite.scala b/jvm-packages/xgboost4j-spark/src/test/scala/ml/dmlc/xgboost4j/scala/spark/XGBoostClassifierSuite.scala
index 4f7dfe6c9..c0c2988f6 100644
--- a/jvm-packages/xgboost4j-spark/src/test/scala/ml/dmlc/xgboost4j/scala/spark/XGBoostClassifierSuite.scala
+++ b/jvm-packages/xgboost4j-spark/src/test/scala/ml/dmlc/xgboost4j/scala/spark/XGBoostClassifierSuite.scala
@@ -16,14 +16,13 @@
package ml.dmlc.xgboost4j.scala.spark
-import ml.dmlc.xgboost4j.java.GpuTestSuite
import ml.dmlc.xgboost4j.scala.{DMatrix, XGBoost => ScalaXGBoost}
import org.apache.spark.ml.linalg._
import org.apache.spark.sql._
import org.scalatest.FunSuite
import org.apache.spark.Partitioner
-abstract class XGBoostClassifierSuiteBase extends FunSuite with PerTest {
+class XGBoostClassifierSuite extends FunSuite with PerTest {
protected val treeMethod: String = "auto"
@@ -200,9 +199,6 @@ abstract class XGBoostClassifierSuiteBase extends FunSuite with PerTest {
assert(resultDF.columns.contains("predictContrib"))
}
-}
-
-class XGBoostCpuClassifierSuite extends XGBoostClassifierSuiteBase {
test("XGBoost-Spark XGBoostClassifier output should match XGBoost4j") {
val trainingDM = new DMatrix(Classification.train.iterator)
val testDM = new DMatrix(Classification.test.iterator)
@@ -220,11 +216,11 @@ class XGBoostCpuClassifierSuite extends XGBoostClassifierSuiteBase {
}
private def checkResultsWithXGBoost4j(
- trainingDM: DMatrix,
- testDM: DMatrix,
- trainingDF: DataFrame,
- testDF: DataFrame,
- round: Int = 5): Unit = {
+ trainingDM: DMatrix,
+ testDM: DMatrix,
+ trainingDF: DataFrame,
+ testDF: DataFrame,
+ round: Int = 5): Unit = {
val paramMap = Map(
"eta" -> "1",
"max_depth" -> "6",
@@ -315,10 +311,5 @@ class XGBoostCpuClassifierSuite extends XGBoostClassifierSuiteBase {
val xgb = new XGBoostClassifier(paramMap)
xgb.fit(repartitioned)
}
-}
-@GpuTestSuite
-class XGBoostGpuClassifierSuite extends XGBoostClassifierSuiteBase {
- override protected val treeMethod: String = "gpu_hist"
- override protected val numWorkers: Int = 1
}
diff --git a/jvm-packages/xgboost4j-spark/src/test/scala/ml/dmlc/xgboost4j/scala/spark/XGBoostRegressorSuite.scala b/jvm-packages/xgboost4j-spark/src/test/scala/ml/dmlc/xgboost4j/scala/spark/XGBoostRegressorSuite.scala
index 7a8bf6fa4..1522cfbb3 100644
--- a/jvm-packages/xgboost4j-spark/src/test/scala/ml/dmlc/xgboost4j/scala/spark/XGBoostRegressorSuite.scala
+++ b/jvm-packages/xgboost4j-spark/src/test/scala/ml/dmlc/xgboost4j/scala/spark/XGBoostRegressorSuite.scala
@@ -16,7 +16,6 @@
package ml.dmlc.xgboost4j.scala.spark
-import ml.dmlc.xgboost4j.java.GpuTestSuite
import ml.dmlc.xgboost4j.scala.{DMatrix, XGBoost => ScalaXGBoost}
import org.apache.spark.ml.linalg.Vector
import org.apache.spark.sql.functions._
@@ -24,7 +23,7 @@ import org.apache.spark.sql.{DataFrame, Row}
import org.apache.spark.sql.types._
import org.scalatest.FunSuite
-abstract class XGBoostRegressorSuiteBase extends FunSuite with PerTest {
+class XGBoostRegressorSuite extends FunSuite with PerTest {
protected val treeMethod: String = "auto"
test("XGBoost-Spark XGBoostRegressor output should match XGBoost4j") {
@@ -218,13 +217,3 @@ abstract class XGBoostRegressorSuiteBase extends FunSuite with PerTest {
assert(resultDF.columns.contains("predictContrib"))
}
}
-
-class XGBoostCpuRegressorSuite extends XGBoostRegressorSuiteBase {
-
-}
-
-@GpuTestSuite
-class XGBoostGpuRegressorSuite extends XGBoostRegressorSuiteBase {
- override protected val treeMethod: String = "gpu_hist"
- override protected val numWorkers: Int = 1
-}
diff --git a/jvm-packages/xgboost4j/src/main/java/ml/dmlc/xgboost4j/java/GpuTestSuite.java b/jvm-packages/xgboost4j/src/main/java/ml/dmlc/xgboost4j/java/GpuTestSuite.java
deleted file mode 100644
index 60d25dab8..000000000
--- a/jvm-packages/xgboost4j/src/main/java/ml/dmlc/xgboost4j/java/GpuTestSuite.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- Copyright (c) 2020 by Contributors
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-package ml.dmlc.xgboost4j.java;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import org.scalatest.TagAnnotation;
-
-@TagAnnotation
-@Retention(RetentionPolicy.RUNTIME)
-@Target({ElementType.METHOD, ElementType.TYPE})
-public @interface GpuTestSuite {}
diff --git a/tests/ci_build/build_jvm_packages.sh b/tests/ci_build/build_jvm_packages.sh
index 7d36c1c59..241fc445f 100755
--- a/tests/ci_build/build_jvm_packages.sh
+++ b/tests/ci_build/build_jvm_packages.sh
@@ -9,8 +9,7 @@ gpu_arch=$3
gpu_options=""
if [ "x$use_cuda" == "x-Duse.cuda=ON" ]; then
- # Since building jvm for CPU will do unit tests, choose gpu-with-gpu-tests profile to build
- gpu_options="$use_cuda -Pgpu-with-gpu-tests "
+ gpu_options="$use_cuda -Pgpu"
fi
# Initialize local Maven repository