You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
LightGBM Error, code is -1, error message is 'bad allocation' #3340
If you can scramble small repro we can pass it to LightGBM folks
Also not sure why you using: .Append(mlContext.Transforms.Conversion.MapValueToKey(nameof(PredictedResult.PredictedLabelIndex), nameof(PredictedResult.PredictedLabel)))
Shouldn't it be KeyToValue instead?
That sample is definitely confusing. Good thing we rewriting it.
So you have following pipeline:
You have original data where labels are strings and features are vector of floats.
You apply first MapValueToKey on top of Label column which would produce LabelIndex column with respectful keys. (I dunno who come up with Index part of name)
That part is great and actually necessary since we multiclass works only on Key columns.
So my comment wasn't about first MapValueToKey transform.
By running trainer we will pop up two more columns PredictedLabel which is type Key and Score column which is vector of floats.
Applying MapValueToKey on top of key type column is doable, but looks weird I don't understand what's the point of doing it.
If you want to get original values back (from Key type for PredictedLabel) you either can use annotations
Activity
Ivanidzo4ka commentedon Apr 15, 2019
This is something coming from LightGBM side.
Somewhat related:
lightgbm-org/LightGBM#1598
If you can scramble small repro we can pass it to LightGBM folks
Also not sure why you using:
.Append(mlContext.Transforms.Conversion.MapValueToKey(nameof(PredictedResult.PredictedLabelIndex), nameof(PredictedResult.PredictedLabel)))Shouldn't it be
KeyToValueinstead?PeterPann23 commentedon Apr 15, 2019
Hi,
The code comes from
Samples.Dynamic.Trainers.MulticlassClassification class LightGbm
I added only normalisation and used NameOf instead of strings, see sample code on #3290
PeterPann23 commentedon Apr 16, 2019
Hi,
text label to MapValueToKey results in to error:
Ivanidzo4ka commentedon Apr 16, 2019
That sample is definitely confusing. Good thing we rewriting it.
So you have following pipeline:
You have original data where labels are strings and features are vector of floats.
You apply first
MapValueToKeyon top ofLabelcolumn which would produceLabelIndexcolumn with respectful keys. (I dunno who come up withIndexpart of name)That part is great and actually necessary since we multiclass works only on Key columns.
So my comment wasn't about first
MapValueToKeytransform.By running trainer we will pop up two more columns
PredictedLabelwhich is type Key andScorecolumn which is vector of floats.Applying
MapValueToKeyon top of key type column is doable, but looks weird I don't understand what's the point of doing it.If you want to get original values back (from Key type for
PredictedLabel) you either can use annotationsmachinelearning/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/PredictAndMetadata.cs
Line 60 in 66ff419
or use
MapKeyToValue.Append(mlContext.Transforms.Conversion.MapKeyToValue("PredictedLabelInOriginalType", "PredictedLabel"))PeterPann23 commentedon Apr 16, 2019
cool, thanks for the update