Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
wbo4958 committed Oct 23, 2024
1 parent 7519a34 commit 0a1bb54
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -561,8 +561,8 @@ private[spark] trait XGBoostModel[M <: XGBoostModel[M]] extends Model[M] with ML
val featureName = getFeaturesCol
val missing = getMissing

// Here, we use rdd instead of DF to avoid different encoders for different
// spark versions.
// Here, we use RDD instead of DF to avoid different encoders for different
// spark versions for the compatibility issue.
// 3.5+, Encoders.row(schema)
// 3.5-, RowEncoder(schema)
val outRDD = dataset.asInstanceOf[Dataset[Row]].rdd.mapPartitions { rowIter =>
Expand Down
6 changes: 0 additions & 6 deletions tests/buildkite/build-jvm-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,3 @@ buildkite-agent artifact upload "jvm-packages/xgboost4j/target/*.jar"
buildkite-agent artifact upload "jvm-packages/xgboost4j-spark/target/*.jar"
buildkite-agent artifact upload "jvm-packages/xgboost4j-flink/target/*.jar"
buildkite-agent artifact upload "jvm-packages/xgboost4j-example/target/*.jar"

echo "--- Compatibility tests for older Spark versions"
tests/ci_build/ci_build.sh jvm tests/ci_build/build_jvm_packages.sh 3.1.3
tests/ci_build/ci_build.sh jvm tests/ci_build/build_jvm_packages.sh 3.2.4
tests/ci_build/ci_build.sh jvm tests/ci_build/build_jvm_packages.sh 3.3.4
tests/ci_build/ci_build.sh jvm tests/ci_build/build_jvm_packages.sh 3.4.3
11 changes: 10 additions & 1 deletion tests/ci_build/build_jvm_packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,16 @@ else
fi
popd

mvn --no-transfer-progress package -Dspark.version=${spark_version} $gpu_options
# Build and test XGBoost4j-spark against different spark versions only for CPU and scala=2.12
if [ "x$gpu_options" == "x" ] && [ "x$use_scala213" == "x" ]; then
mvn --no-transfer-progress clean package -Dspark.version=3.1.3 -pl xgboost4j-spark
mvn --no-transfer-progress clean package -Dspark.version=3.2.4 -pl xgboost4j-spark
mvn --no-transfer-progress clean package -Dspark.version=3.3.4 -pl xgboost4j-spark
mvn --no-transfer-progress clean package -Dspark.version=3.4.3 -pl xgboost4j-spark
fi

mvn --no-transfer-progress clean package -Dspark.version=${spark_version} $gpu_options


set +x
set +e

0 comments on commit 0a1bb54

Please sign in to comment.