Skip to content

Conversation

harupy
Copy link
Contributor

@harupy harupy commented Feb 23, 2023

Preserve objective when serializing XGBoostClassificationModel. objective is used in transform:

https://github.com/dmlc/xgboost/blob/a65ad0bd9c26ff0ce4cb842d3312064cd1e9eadc/jvm-packages/xgboost4j-spark/src/main/scala/ml/dmlc/xgboost4j/scala/spark/XGBoostClassifier.scala#L396

    if (getObjective.equals("multi:softmax")) {

@WeichenXu123
Copy link
Contributor

  • serializes/deserializes the Spark model properly *** FAILED ***
    [info] "[binary:logistic]" did not equal "[reg:squarederror]" xgbc_169002594330__objective is not equivalent (SparkParityBase.scala:210)

The objective param is not saved / loaded correctly.

@harupy
Copy link
Contributor Author

harupy commented Feb 23, 2023

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!

@WeichenXu123
Copy link
Contributor

CC @jsleight

@harupy harupy force-pushed the serialize-objective branch from 53bfbc7 to 8c69ae0 Compare February 23, 2023 11:23
@harupy harupy force-pushed the serialize-objective branch from d9f6df6 to 2213073 Compare February 23, 2023 11:58
@jsleight jsleight merged commit 62d6b3f into combust:master Feb 24, 2023
@jsleight jsleight changed the title Serialize objective for XGBoostClassificationModel Upgrade to XGBoost 1.7.3 and serialize objective for XGBoostClassificationModel Feb 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants