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

Ensure compatability with hummingbird #316

Open
adam2392 opened this issue Aug 20, 2024 · 1 comment
Open

Ensure compatability with hummingbird #316

adam2392 opened this issue Aug 20, 2024 · 1 comment

Comments

@adam2392
Copy link
Collaborator

Can we have an example of converting decision tree models to hummingbird for faster inference?

https://github.com/microsoft/hummingbird

In addition, an integration test would be great.

  1. Add hummingbird as a test dependency
  2. Fit every forest we have.
  3. Convert to hummingbird
  4. Verify inference on test set is numerically the same.

Perhaps Ryan or Vlad can take this?

@ryanhausen
Copy link
Contributor

ryanhausen commented Oct 15, 2024

@adam2392

Vlad and I looked into this and have found a couple things:

  1. Supporting our models would be somewhat involved. We need to do two things:
  1. That being said, humming bird does seem to offer some benefits the treeple package might be interested in. In particular, inference and on-disk storage.

I ran the following script to evaluate the inference speed and storage size on disk: bench_hb.py.txt

Some of the combinations error out, but seems to be known issue: (microsoft/hummingbird#666)

Below are some parallel coordinates plots that show performance as a function: # estimators, # features, # samples. The last axis is the thing being measured and is what is used for the colormap as well. The metrics are the log10 of the ratio of sklearn to hummingbird. Blue is good for hummingbird, indicating that sklearn needs more time/storage. Red the opposite.

cpu_time

gpu_time

storage

In summary, it seems helpful if we want to store and reuse a model but might take a non-trivial amount of effort to implement and maintain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants