Enabling xgboost-predictor for XGBoost version 1.0 and above #25
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As noted in the XGBoost Documentation for saving and loading of data Since XGBoost 1.0.0, XGBoost team has introduced ...
support of using JSON for saving/loading XGBoost models and related hyper-parameters for training, aiming to replace the old binary internal format with an open format that can be easily reused.
The 0.3.x version of xgboost-predictor-java is based on old binary format. The JSON format introduces a breaking change for xgboost-predictor-java-0.3.8. The proposed version 1.0.0 has been modified to read XGBoost model in JSON format. Till the 0.3.x, reading of the model in binary format was closely integrated with implementation therefore major refactoring of code was required. The current version is proposed to be 1.0.0 to reflect the refactoring and sync it with XGBoost 1.0.0 when the JSON format was introduced.
Library jsonschema2pojo is used to generate Java POJO objects and the POJO's are also checked in to provide consistent behavior with model versions. The JSON model can be read in Java POJO's using jackson databind. Despite major refactoring for reading model in JSON format, much of the original design is preserved for all calculation purposes.