Stop LightGbm Warning for Default Metric Input [Issue #3965 Fix] #4007
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue #3965 reported that a warning, "LightGBM] [Warning] Unknown parameter metric=" is produced when the default metric is used. This warning came after this commit which aimed to provide a consistent user experience from an ML.NET implementation of LightGbm with standalone LightGbm. If a user were to set
EvaluationMetric = EvaluateMetricType.Default
, they might expect that this would set the EvaluationMetric to "" and assigned the metric based on the objective as shown in the LightGbm docs. When the correction was made, this warning began to appear when the metric parameter was set to "". which was also being produced in LightGbm alone. The only way to prevent this error would be to not assign a parameter to the metric at all.This warning has not appeared in previous versions of ML.NET and can be prevent by assigning the correct metric based on the objective as was previously done.
To prevent this warning, the changes from this commit were reverted.