Skip to content

Conversation

@david-cortes-intel
Copy link
Contributor

Description

This PR updates the model builders from xgboost objects to be able to process multi-class classification models with the new structure introduced in version 3.1.0, which has vector-valued intercepts.


Checklist:

Completeness and readability

  • I have commented my code, particularly in hard-to-understand areas.
  • Git commit message contains an appropriate signed-off-by string (see CONTRIBUTING.md for details).
  • I have resolved any merge conflicts that might occur with the base branch.

Testing

  • I have run it locally and tested the changes extensively.
  • All CI jobs are green or I have provided justification why they aren't.

@david-cortes-intel
Copy link
Contributor Author

/intelci: run

@codecov
Copy link

codecov bot commented Oct 21, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

Flag Coverage Δ
azure 80.47% <ø> (ø)
github 82.07% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

xgb_model = treelite.frontend.from_xgboost(xgb_model)
try:
xgb_model = treelite.frontend.from_xgboost(xgb_model)
except Exception:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any way you can catch a more specific exception here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can fail in multiple ways which throw different errors, and it looks like the first error encountered here will be different in the next treelite release. It could be done, but this is just a temporary workaround that should be removed soon.

@ethanglaser
Copy link
Contributor

/intelci: run

@david-cortes-intel
Copy link
Contributor Author

/intelci: run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants