Win11
ML.net is the latest stable release from nuget
.net 6.0 console app
Describe the bug
Using the generated code from a simple tabular scenario with 1 label column with 3 possible values results in an exception.
This is the exact code offered by the model maker
"//Load sample data
var sampleData = new MLModel1.ModelInput()
{
Col0 = -1.833333F,
Col1 = -0.9662699F,
Col2 = -0.8599034F,
Col3 = -0.2951389F,
Col4 = 4.972222F,
Col5 = -0.422619F,
Col6 = -0.1358025F,
};
//Load model and predict output
var result = MLModel1.Predict(sampleData);
"
Even the plain sample project generated will not run and causing this exception.
Asking for a prediction will cause the exception, and it always complains that the label column is missing, which does not make sense to me. I have also replicated this in a completely new project, from scratch. The source data feed consists of the 7 data columns, and the label column.
The exception will always be
Unhandled exception. System.Exception: col7 column not found. Make sure the name searched for matches the name in the schema.
Not sure what is happening here as I have done this in the past without issue (though at least a few months back!)
Win11
ML.net is the latest stable release from nuget
.net 6.0 console app
Describe the bug
Using the generated code from a simple tabular scenario with 1 label column with 3 possible values results in an exception.
This is the exact code offered by the model maker
"//Load sample data
var sampleData = new MLModel1.ModelInput()
{
Col0 = -1.833333F,
Col1 = -0.9662699F,
Col2 = -0.8599034F,
Col3 = -0.2951389F,
Col4 = 4.972222F,
Col5 = -0.422619F,
Col6 = -0.1358025F,
};
//Load model and predict output
var result = MLModel1.Predict(sampleData);
"
Even the plain sample project generated will not run and causing this exception.
Asking for a prediction will cause the exception, and it always complains that the label column is missing, which does not make sense to me. I have also replicated this in a completely new project, from scratch. The source data feed consists of the 7 data columns, and the label column.
The exception will always be
Unhandled exception. System.Exception: col7 column not found. Make sure the name searched for matches the name in the schema.
Not sure what is happening here as I have done this in the past without issue (though at least a few months back!)