combust / mleap

MLeap: Deploy ML Pipelines to Production
https://combust.github.io/mleap-docs/
Apache License 2.0
1.5k stars 313 forks source link

Upgrade to XGBoost 1.7.3 and serialize objective for XGBoostClassificationModel #847

Closed harupy closed 1 year ago

harupy commented 1 year ago

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 commented 1 year ago
  • 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 commented 1 year ago

I think that's because of:

https://github.com/dmlc/xgboost/pull/7781/files#diff-d5d17d50ceefbbb4461619ee53227ddf6290b349bbbb3e99fbc42327292616cbL108

WeichenXu123 commented 1 year ago

CC @jsleight