Closed artemsolod closed 1 year ago
Hi @artemsolod thanks for the PR and adding num_threads to predict. The CI tests passed and the KeyError you observed is because locally you need to download and extract the LightGBM examples and then set the environment variable LIGHTGBM_EXAMPLES_PATH to the root of the source installation so it can use these examples for tests. It would be great to add a basic test for LGBM_BoosterPredictForMat but I'll leave it up to you. There's a small comment on the PR.
Thanks for the comments @kainkad! I've added a simple test call for LGBM_BoosterPredictForMat
, hope it's enough, as I see there are other tests on predict
that use it internally.
Thanks for the comments @kainkad! I've added a simple test call for
LGBM_BoosterPredictForMat
, hope it's enough, as I see there are other tests onpredict
that use it internally.
Sounds good!
predict
by default reusesnum_threads
from training. However LightGBM supports setting a separatenum_threads
for predict. Here is a python example https://github.com/microsoft/LightGBM/issues/4706.I am not familiar with MLJ interface so I have added a
num_threads
keyword argument only topredict
andpredict_classes
.Also some of the test are failing but it appears to be unrelated to this PR (
KeyError: key "LIGHTGBM_EXAMPLES_PATH" not found
)