Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[jvm-package] Clean up the legacy gpu support tests #7523

Merged
merged 3 commits into from
Dec 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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() }
])
}
Expand Down
42 changes: 0 additions & 42 deletions jvm-packages/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,17 +68,6 @@
<module>xgboost4j-spark</module>
<module>xgboost4j-flink</module>
</modules>
<build>
<plugins>
<plugin>
<groupId>org.scalatest</groupId>
<artifactId>scalatest-maven-plugin</artifactId>
<configuration>
<tagsToExclude>ml.dmlc.xgboost4j.java.GpuTestSuite</tagsToExclude>
</configuration>
</plugin>
</plugins>
</build>
</profile>

<!-- gpu profile with both cpu and gpu test suites -->
Expand All @@ -94,37 +83,6 @@
<module>xgboost4j-gpu</module>
<module>xgboost4j-spark-gpu</module>
</modules>
<build>
<plugins>
<plugin>
<groupId>org.scalatest</groupId>
<artifactId>scalatest-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>

<!-- gpu-with-gpu-tests profile with only gpu test suites -->
<profile>
<id>gpu-with-gpu-tests</id>
<properties>
<use.cuda>ON</use.cuda>
</properties>
<modules>
<module>xgboost4j-gpu</module>
<module>xgboost4j-spark-gpu</module>
</modules>
<build>
<plugins>
<plugin>
<groupId>org.scalatest</groupId>
<artifactId>scalatest-maven-plugin</artifactId>
<configuration>
<tagsToInclude>ml.dmlc.xgboost4j.java.GpuTestSuite</tagsToInclude>
</configuration>
</plugin>
</plugins>
</build>
</profile>

<profile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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)
Expand All @@ -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",
Expand Down Expand Up @@ -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
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,14 @@

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._
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") {
Expand Down Expand Up @@ -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
}

This file was deleted.

3 changes: 1 addition & 2 deletions tests/ci_build/build_jvm_packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down