-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Error in ML.net training #4464
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Ran it again after selecting a different table column as my "column to predict". Failed again with different output | Trainer MicroAccuracy MacroAccuracy Duration #Iteration | |
@dmoise2: Can you post a sample of your dataset? How are you calling AutoML (Model Builder, CLI, or API)?
You can look at line |
The data does have a number of characters in it. I can create a version without those. This does come from text people enter. Is it the longer term expectation that we would have to eliminate those types of characters in our data? |
Hi @dmoise2 , where you able to run it after cleaning the Dataset as @justinormont suggested? If so, please feel free to close this issue. |
@dmoise2 I'm pretty sure that the first error that you are getting is because you are selecting a multiclass classification scenario, but the column you try to predict has only one value, hence you get type For the second issue, yes, you will have to either clean the data or disallow certain characters. You can also try adding Please let us know if this is still an issue. If not, I will close this in a few days. |
@dmoise2: You would have to clean the dataset itself. ML․NET's See more detail: #4460 It's a bit more code heavy, but if you're using the AutoML API, you can also use a custom CSV reader which emits an I expect that CsvHelper, or TinyCsvParser in RFC4180 mode, will work to create the |
@dmoise2 please feel free to reopen if you have other questions. |
Update: @dmoise2, thanks to hard work by @antoniovs1029, ML․NET's To quote the recent 1.5.0 release notes: |
Please ensure the file isn't open in another application. This can sometimes cause the error. |
System information
Issue
Source code / logs
| Trainer MicroAccuracy MacroAccuracy Duration #Iteration |
Schema mismatch for score column 'Score': expected vector of two or more items of type Single, got Vector<Single, 1>
Parameter name: schema
Must be at least 2.
Parameter name: numClasses
Schema mismatch for score column 'Score': expected vector of two or more items of type Single, got Vector<Single, 1>
Parameter name: schema
Training failed with the exception: System.ArgumentOutOfRangeException: Schema mismatch for score column 'Score': expected vector of two or more items of type Single, got Vector<Single, 1>
Parameter name: schema
at Microsoft.ML.Data.MulticlassClassificationEvaluator.CheckScoreAndLabelTypes(RoleMappedSchema schema)
at Microsoft.ML.Data.EvaluatorBase
1.CheckColumnTypes(RoleMappedSchema schema) at Microsoft.ML.Data.EvaluatorBase
1.Microsoft.ML.Data.IEvaluator.Evaluate(RoleMappedData data)at Microsoft.ML.Data.MulticlassClassificationEvaluator.Evaluate(IDataView data, String label, String score, String predictedLabel)
at Microsoft.ML.AutoML.MultiMetricsAgent.EvaluateMetrics(IDataView data, String labelColumn)
at Microsoft.ML.AutoML.RunnerUtil.TrainAndScorePipeline[TMetrics](MLContext context, SuggestedPipeline pipeline, IDataView trainData, IDataView validData, String labelColumn, IMetricsAgent`1 metricsAgent, ITransformer preprocessorTransform, FileInfo modelFileInfo, DataViewSchema modelInputSchema, AutoMLLogger logger)
The text was updated successfully, but these errors were encountered: