dotnet / dotnet/machinelearning-modelbuilder
LoadColumn attribute
- Lingua principale
- Dockerfile
- Stelle
- 285
- Fork
- 66
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
**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);
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Iniziare esaminando la classe MLModel1.ModelInput generata da Model Builder e la chiamata a LoadFromTextFile mostrata nel report. Riprodurre lo scenario di caricamento CSV in Model Builder e confrontare la classe di input generata con gli attributi necessari per caricare colonne denominate. Il lavoro è completato quando l'input del modello generato supporta il workflow CSV riportato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- csharp
- Ambito
- machine-learning
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 35/100