Closed fuyw closed 2 years ago
Yeah good question, this is not a use-case I had previously encountered, but I'd be happy to support it. It'd involve adding an (optional) parameter to the .compile()
method, maybe something like model_name
. Then we pass the parameter into the codegen and update the function name here:
https://github.com/siboehm/lleaves/blob/master/lleaves/compiler/codegen/codegen.py#L81
Ideally the default function name stays backwards compatible. Do you want to send a PR? Else I might be able to get to it next week.
Sure, I would like to try send a PR.
Closed by #21
Hi Simon, many thanks for the nice work. I have a question about using the C_API:
If I have 2 LightGBM models in my application, and I want to predict using the C_API. I might need to have following two functions:
Do I need to modify the
llvm_model.compile()
function to change the function names?