Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: XGboost binary format is being deprecated #3321

Closed
3 of 4 tasks
thatlittleboy opened this issue Oct 8, 2023 · 4 comments · Fixed by #3345
Closed
3 of 4 tasks

BUG: XGboost binary format is being deprecated #3321

thatlittleboy opened this issue Oct 8, 2023 · 4 comments · Fixed by #3345
Assignees
Labels
bug Indicates an unexpected problem or unintended behaviour help wanted Indicates that a maintainer wants help on an issue or pull request
Milestone

Comments

@thatlittleboy
Copy link
Collaborator

Issue Description

Based on the roadmap here dmlc/xgboost#7547,
the binary format for storing xgboost models is going to be deprecated in xgboost v2.2, when saving to raw format is no longer supported.

We currently rely on this in our XGBTreeModelLoader to load in xgboost models to our TreeExplainer.

Warnings are already starting to show up in our test logs,

image

so I think we need to prioritize this over the next couple of months. It's not clear when v2.2 will be released (xgb is on v2.0 as of time of writing the issue), if it does release before this issue is resolved, then we'll need to set an upper bound on the xgboost version we support.

(If anyone is interested in tackling this, feel free to holler, so we can assign the issue appropriately.)
The change required doesn't look trivial, though.

Minimal Reproducible Example

N.A.

Traceback

N.A.

Expected Behavior

N.A.

Bug report checklist

  • I have checked that this issue has not already been reported.
  • I have confirmed this bug exists on the latest release of shap.
  • I have confirmed this bug exists on the master branch of shap.
  • I'd be interested in making a PR to fix this bug

Installed Versions

master

@thatlittleboy thatlittleboy added the bug Indicates an unexpected problem or unintended behaviour label Oct 8, 2023
@connortann connortann added the help wanted Indicates that a maintainer wants help on an issue or pull request label Oct 9, 2023
@CloseChoice
Copy link
Collaborator

I looked into this a bit and would suggest the following procedure:

  1. write tests for the XGBTreeModelLoader
  2. implement loading with json format and make sure all tests pass

Note that taking on this issue means rewriting major chunks of the XGBTreeModelLoader

@CloseChoice
Copy link
Collaborator

I would like to tackle this. My plan would be to move to json, check if everything works correctly and file a draft PR and then we can discuss if we move to ubj if the performance decreased too much.

@thatlittleboy
Copy link
Collaborator Author

Thanks, much appreciated @CloseChoice

@CloseChoice
Copy link
Collaborator

CloseChoice commented Oct 11, 2023

I've got a branch with conversion to json that passes all tests but as one of the comments and my investigation show, json is somehow less precise and using ubj would probably be better. I will check that and file a PR once I consider it ready

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behaviour help wanted Indicates that a maintainer wants help on an issue or pull request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants