LightGBM does not save numIteration to string or native model
See original GitHub issueDescribe the bug
When the LightGBM model early stopped, LightGBMBooster.numIterations
is set and this value will be passed to lightgbmlib
while calling predictForCSR
or predictForMat
. However, saveToString
and saveNativeModel
do not save this information. Therefore, when we load the model from the saved string or native model again, the predictions would be different from the original model.
To Reproduce Steps to reproduce the behavior, code snippets encouraged
Expected behavior According to the LightGBM python library, it saves the best iteration by default. https://github.com/microsoft/LightGBM/blob/v3.3.2/python-package/lightgbm/basic.py#L3298
Info (please complete the following information):
- SynapseML Version: 0.9.5
- Spark Version: 3.2.0
- Spark Platform: local
** Stacktrace**
Please post the stacktrace here if applicable
If the bug pertains to a specific feature please tag the appropriate CODEOWNER for better visibility @imatiach-msft
Additional context Add any other context about the problem here.
AB#1764742
Issue Analytics
- State:
- Created a year ago
- Comments:5
Top GitHub Comments
nevermind, found the issue. fixing it. 😃
Hi @svotaw,
Thank you for the fix! We will test this build later.