microsoft / hummingbird

Hummingbird compiles trained ML models into tensor computation for faster inference.
MIT License
3.32k stars 274 forks source link

allow for identity POST_TRANSFORM #674

Closed jppgks closed 1 year ago

jppgks commented 1 year ago

In https://github.com/ludwig-ai/ludwig, we require access to the raw logits since we already have our own "post-transform" logic. With this PR, a user can predict raw logits by using the following extra_config:

from hummingbird.ml import convert
from hummingbird.ml.operator_converters import constants

lgbm_model = ...
convert(lgbm_model, "torch", extra_config={constants.POST_TRANSFORM: None})
jppgks commented 1 year ago

@ksaur would you have bandwidth to review this small PR? Many thanks!

jppgks commented 1 year ago

@microsoft-github-policy-service agree company="Predibase, Inc."

jppgks commented 1 year ago

@ksaur Thanks for reviewing! I just added a test case and agreed to the CLA.