siboehm / lleaves

Compiler for LightGBM gradient-boosted trees, based on LLVM. Speeds up prediction by ≥10x.
https://lleaves.readthedocs.io/en/latest/
MIT License
333 stars 28 forks source link

Compiling model with custom objective #73

Open Thomzoy opened 5 months ago

Thomzoy commented 5 months ago

I've saved a LightGBM model trained using a custom objective. Is it possible to compile it through lleaves ?

Currently, I'm getting a RuntimeError: Missing non-nullable keys {'objective'} when running:

llvm_model = lleaves.Model(model_file="../scripts/my_model.json")
llvm_model.compile()

Thanks !