combust / mleap

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

Added backward compatibility fix for XGBoost models #829

Closed chaitanya-basava closed 2 years ago

chaitanya-basava commented 2 years ago

Hi,

We have noticed a few issues while trying to load XGBoost models on latest mleap version, these models were trained using a mleap version built on scala 2.11. The issue is due to tree_limit variable which wasn't getting stored during model serialisation in older mleap version but is a variable that is expected to be present in bundle file in the latest version. So, in order to fix this behaviour have updated the code to either read from bundle file or fallback to default value in case of its absence instead of failure during deserialisation.