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
OS version/distro:
Windows 10
Windows 2012
Windows 2019
.NET Version (eg., dotnet --info):
Core 3.0 Version 3.0.100-preview5-011568
Microsoft.ML.LightGbm Version 1.0.0.0, Culture=neutral
Microsoft.ML Version 1.0.0.0
Issue
What did you do?
Load csv file as and train model loading by all floats in single vector
see code bellow
What happened?
Get error The given key 'metric' was not present in the dictionary during the training
What did you expect?
Not sure why I get the error, also I do not mention a key metric.
Source code / logs
The error:
[Source=LightGBMMulticlass; Training with LightGBM, Kind=Trace] Channel disposed. Elapsed 00:00:04.0970203
.57.erLeaf = 5059.0337420.
Error stack at System.Collections.Generic.Dictionary`2.get_Item(TKey key)r_6_MinTicks_In_15Sec_B_ND.tsv
at Microsoft.ML.Trainers.LightGbm.WrappedLightGbmTraining.Train(IChannel ch, IProgressChannel pch, Dictionary`2 param
eters, Dataset dtrain, Dataset dvalid, Int32 numIteration, Boolean verboseEval, Int32 earlyStoppingRound)
at Microsoft.ML.Trainers.LightGbm.LightGbmTrainerBase`4.TrainCore(IChannel ch, IProgressChannel pch, Dataset dtrain,
CategoricalMetaData catMetaData, Dataset dvalid)
at Microsoft.ML.Trainers.LightGbm.LightGbmTrainerBase`4.TrainModelCore(TrainContext context)
at Microsoft.ML.Trainers.TrainerEstimatorBase`2.TrainTransformer(IDataView trainSet, IDataView validationSet, IPredic
tor initPredictor)
at Microsoft.ML.Data.EstimatorChain`1.Fit(IDataView input)
at Cats.DeepBookTrainer.Infrastructure.Trainer.ExecuteLightGbm(ITransformer& transformer, Nullable`1 maxIterations, N
ullable`1 maxThreads)
Data Loading:
public static IDataView GetDataViewAsVector(MLContext mlContext, FileInfo trainingFile, int labelIndex=1, char[] separators = null, long? maxRows = null, bool makeBin=false)
{
if (separators is null)
separators = new[] { '|' };
var loader = mlContext.Data.CreateTextLoader(options: new TextLoader.Options()
{
Columns = new[] {
new TextLoader.Column(name:"Label", dataKind: DataKind.String, index: labelIndex),
new TextLoader.Column(name:"RawFeatures",dataKind:DataKind.Single,minIndex:2,maxIndex:40732)
},
HasHeader = false,
Separators = separators,
UseThreads = false,
MaxRows=maxRows
});
var dv = loader.Load(trainingFile.FullName);
return dv;
}
System information
Windows 10
Windows 2012
Windows 2019
Core 3.0 Version 3.0.100-preview5-011568
Microsoft.ML.LightGbm Version 1.0.0.0, Culture=neutral
Microsoft.ML Version 1.0.0.0
Issue
What did you do?
Load csv file as and train model loading by all floats in single vector
see code bellow
What happened?
Get error The given key 'metric' was not present in the dictionary during the training
What did you expect?
Not sure why I get the error, also I do not mention a key metric.
Source code / logs
The error:
Data Loading:
Pipeline:
Line throwing the error
var model = pipeline.Fit(horizonDataset.TrainSet);
The text was updated successfully, but these errors were encountered: