dotnet / dotnet/machinelearning-modelbuilder
LoadColumn attribute
- Dominant language
- Dockerfile
- Stars
- 285
- Forks
- 66
- PR merge metrics
- No merged PRs in 30d
Description
**System Information (please complete the following information):**
- Model Builder Version (available in Manage Extensions dialog): 16.14.0.2255902
- Visual Studio Version
**Describe the bug**
- On which step of the process did you run into an issue: Model Builder
- Clear description of the problem: When using model builder to train a model, the resulting model input class does not have the loadcolumn attribute, which makes my existing code to consume the ML model (make predictions using data from a .csv file) useless. In previous posts, it was mentioned that this was fixed in versions 16.14.0, however this does not seem to be the case.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Additional context**
Here is a snippet of my code. It fails when I try use LoadFromTextFile.
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
////begin
///
//create mlContext
var mlContext = new MLContext();
//load data from csv file
IDataView testData = mlContext.Data.LoadFromTextFile(testDataPath, separatorChar: ',', hasHeader: true);
// Set-up prediction pipeline
DataViewSchema predictionPipelineSchema;
ITransformer predictionPipeline = mlContext.Model.Load("MLModel.zip", out predictionPipelineSchema);
//apply transformations and generate predictions
IDataView predictions = predictionPipeline.Transform(testData);
//inspect predicted values
var predictionColumn = predictions.GetColumn("PredictedLabel").ToArray();
//IEnumerable scoreColumn = predictions.GetColumn("Score").ToList();
//// Create an IEnumerable of ModelOutput objects from IDataView
IEnumerable predictionsEnumerable =
mlContext.Data.CreateEnumerable(predictions, reuseRowObject: true);
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.