-
Notifications
You must be signed in to change notification settings - Fork 1.9k
"Input string was not in a correct format." exception when executing experiment with ML.AutoML #5428
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
@patricia-ikosoft Sorry for late response, could you please share a complete repro project, I download you code piece and there are some missing definition: MLPoc.Data, DynamicTypeProperty, DataModel and LoadDataHelper. |
You can test it by running the app, selecting the .csv file, selecting "HistorySalesPrice" in the dropdown, and click on the button "Click me" to run the experiment |
@patricia-ikosoft I tried run you sample and get below error message with call stack: call stack: |
Looks like previous error I got is not stable, sometimes I can run experiment without issue sometime I get previous error. |
I always reproduce the error, even if I tried to use LoadFromTextFile or LoadFromEnumerable (using a predefined data model, not dynamic, and parsing myself the values from file). It is systematic on my machine (Windows7). What I noticed on the other hand it is that, if I lower the time of the experiment (60 seconds for example), I no longer have the error. If that helps, I could modify the code to use the LoadFromTextFile method with e predefined model, but on my machine I always got the same error, no matter what loading method I was using. |
@patricia-ikosoft Thanks, please do create repro code sample using LoadFromTextFile, I will try to create a azure vm with window7 to see if I can repro your issue. |
complete_code2.zip |
@patricia-ikosoft Thanks, I did created an Azure vm with windows7 (Windows 7 Enterprise, this is the only available image on Azure for windows7) and still no repro on your issue. I found one issue read through your code is DataModel class, when LoadColumn you should always starts from index 0 instead of 1, could you please fix that and see if the error you are seeing still exists? |
I modified the index, but I still have the error. Could it be a problem of culture ? I've seen this other issue, that seems to be identical: |
Yeah, looks like it is same issue, could you try on en-US? @patricia-ikosoft The error message and call stack of the issue I mentioned before: All instances skipped due to missing features. call stack: |
How could I change the culture that is used internally by ML.Net ? |
@patricia-ikosoft just change the system culture to en-US |
Changing the culture to en-US does not seem to solve the error. |
@patricia-ikosoft what is your original culture? did you restart machine after change culture? |
Yes, it was French initially. Yes, I restarted the machine |
Hello, I encountered same error and resolved it by changing system's decimal separator from ',' to '.' (my culture is cs-CZ). After restart everything worked ok. |
Thanks all for the comments and feedback. We've updated the implementation of AutoML, so previous API patterns are no longer applicable. Closing this issue for now. Please feel free to open a new issue if it continues to be a problem. |
System information
Issue
no matter what label I'm choosing, or if I'm loading the data directly from the file or I'm reading and parsing it myself.
at System.Number.ThrowOverflowOrFormatException(ParsingStatus status, TypeCode type)
at Microsoft.ML.AutoML.SweeperProbabilityUtils.ParameterSetAsFloatArray(IValueGenerator[] sweepParams, ParameterSet ps, Boolean expandCategoricals)
at Microsoft.ML.AutoML.SmacSweeper.FitModel(IEnumerable
1 previousRuns) at Microsoft.ML.AutoML.SmacSweeper.ProposeSweeps(Int32 maxSweeps, IEnumerable
1 previousRuns)at Microsoft.ML.AutoML.PipelineSuggester.SampleHyperparameters(MLContext context, SuggestedTrainer trainer, IEnumerable
1 history, Boolean isMaximizingMetric) at Microsoft.ML.AutoML.PipelineSuggester.GetNextInferredPipeline(MLContext context, IEnumerable
1 history, DatasetColumnInfo[] columns, TaskKind task, Boolean isMaximizingMetric, CacheBeforeTrainer cacheBeforeTrainer, IEnumerable1 trainerAllowList) at Microsoft.ML.AutoML.Experiment
2.Execute()at Microsoft.ML.AutoML.ExperimentBase
2.Execute(ColumnInformation columnInfo, DatasetColumnInfo[] columns, IEstimator
1 preFeaturizer, IProgress1 progressHandler, IRunner
1 runner)at Microsoft.ML.AutoML.ExperimentBase
2.ExecuteCrossValSummary(IDataView[] trainDatasets, ColumnInformation columnInfo, IDataView[] validationDatasets, IEstimator
1 preFeaturizer, IProgress1 progressHandler) at Microsoft.ML.AutoML.ExperimentBase
2.Execute(IDataView trainData, ColumnInformation columnInformation, IEstimator1 preFeaturizer, IProgress
1 progressHandler)at Microsoft.ML.AutoML.ExperimentBase
2.Execute(IDataView trainData, String labelColumnName, String samplingKeyColumn, IEstimator
1 preFeaturizer, IProgress1 progressHandler) at MLPoc.Services.LoadDataService.TrainDataAndCreateModel(List
1 properties, DynamicTypeProperty labelProperty, List`1 lineValues) in C:\DevITPAzurePatricia\Ikosoft\MLPoc\Services\LoadDataService.cs:line 81Source code / logs
code.zip
The text was updated successfully, but these errors were encountered: