Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ class XGBoostClassificationModelOp extends SimpleSparkOp[XGBoostClassificationMo
withValue("missing", Value.float(obj.getOrDefault(obj.missing))).
withValue("infer_batch_size", Value.int(obj.getOrDefault(obj.inferBatchSize))).
withValue("use_external_memory", Value.boolean(obj.getOrDefault(obj.useExternalMemory))).
withValue("allow_non_zero_for_missing", Value.boolean(obj.getOrDefault(obj.allowNonZeroForMissing)))
withValue("allow_non_zero_for_missing", Value.boolean(obj.getOrDefault(obj.allowNonZeroForMissing))).
withValue("objective", Value.string(obj.getOrDefault(obj.objective)))
}

override def load(model: Model)
Expand All @@ -57,6 +58,7 @@ class XGBoostClassificationModelOp extends SimpleSparkOp[XGBoostClassificationMo
model.getValue("allow_non_zero_for_missing").map(o => xgb.setAllowNonZeroForMissing(o.getBoolean))
model.getValue("infer_batch_size").map(o => xgb.setInferBatchSize(o.getInt))
model.getValue("use_external_memory").map(o => xgb.set(xgb.useExternalMemory, o.getBoolean))
model.getValue("objective").map(o => xgb.set(xgb.objective, o.getString))
xgb
}
}
Expand All @@ -71,6 +73,7 @@ class XGBoostClassificationModelOp extends SimpleSparkOp[XGBoostClassificationMo
if(model.isSet(model.inferBatchSize)) xgb.setInferBatchSize(model.getOrDefault(model.inferBatchSize))
if(model.isSet(model.treeLimit)) xgb.setTreeLimit(model.getOrDefault(model.treeLimit))
if(model.isSet(model.useExternalMemory)) xgb.set(xgb.useExternalMemory, model.getOrDefault(model.useExternalMemory))
if(model.isSet(model.objective)) xgb.set(xgb.objective, model.getOrDefault(model.objective))
xgb
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class XGBoostClassificationModelParitySpec extends SparkParityBase {
)

// These params are not needed for making predictions, so we don't serialize them
override val unserializedParams = Set("labelCol", "evalMetric", "objective")
override val unserializedParams = Set("labelCol", "evalMetric")

override val excludedColsForComparison = Array[String]("prediction")

Expand Down
2 changes: 1 addition & 1 deletion project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ object Dependencies {
lazy val slf4jVersion = "1.7.36"
lazy val awsSdkVersion = "1.11.1033"
val tensorflowJavaVersion = "0.4.0" // Match Tensorflow 2.7.0 https://github.com/tensorflow/java/#tensorflow-version-support
val xgboostVersion = "1.6.1"
val xgboostVersion = "1.7.3"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's see what happens with the latest version

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

val breezeVersion = "1.2"
val hadoopVersion = "2.7.4" // matches spark version
val platforms = "windows-x86_64,linux-x86_64,macosx-x86_64"
Expand Down