dotnet / dotnet/machinelearning-modelbuilder
Model builder crashing because of ParseDouble & other exceptions
- 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 or CLI Version: The one that comes with ML.net 2.0.1 or AutoML 0.20.1
- Visual Studio Version (if applicable): Microsoft Visual Studio Professional 2022 (64-bit) - Current Version 17.3.2
**Describe the bug**
I am trying to make a regression model for the linked data file and predict the column serviceDuration, when I am running the train option of the model builder I am getting various exceptions that prevent the builder to work.
Sometimes a parsing in double exception even if all my data comes from floats that I put in a csv using C# and even when I am putting the features or labels to be strings. Sometimes a KeynotfoundException that I do not understand. And when I am trying to make it work with an other data file, then I get an error at the end telling me to update the ModelBuilder even if I have the latest version
**To Reproduce**
Steps to reproduce the behavior:
1. create a regression model builder
2. input a data file of mine (data.csv is the only one working fine for reference), they are all created using the same code
3. train using serviceDuration as a label (serviceId and operatorId are categorical)
4. 2 to 3 models are trained and then the model builder crashes with one of the errors I mentioned
**Expected behavior**
The model builder to train 100 seconds like I said and no exceptions
**Additional context**
the 3 exceptions I am getting are:
the zip contains the data, the code I used to creathe the csv, and the model builder I am using
[FirstMLProject.zip](https://github.com/dotnet/machinelearning-modelbuilder/files/11789346/FirstMLProject.zip)
2023-06-19 15:48:04.2516 DEBUG Input string was not in a correct format.
at System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt)
at Microsoft.ML.ModelBuilder.AutoMLService.Proposer.HyperParameterProposer.Propose(TrialParameter trialParameter) in /_/src/Microsoft.ML.ModelBuilder.AutoMLService/Proposer/HyperParameterProposer.cs:line 66
at Microsoft.ML.ModelBuilder.AutoMLService.Proposer.Controller.Propose() in /_/src/Microsoft.
ML.ModelBuilder.AutoMLService/Proposer/Controller.cs:line 61
at Microsoft.ML.ModelBuilder.AutoMLService.Experiments.LocalAutoMLExperiment.d__15.MoveNext() in /_/src/Microsoft.ML.ModelBuilder.AutoMLService/Experiments/LocalAutoMLExperiment.cs:line 136
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.ML.ModelBuilder.AutoMLEngine.d__21.MoveNext() in /_/src/Microsoft.ML.ModelBuilder.AutoMLService/AutoMLEngineService/AutoMLEngine.cs:line 167 at StreamJsonRpc.JsonRpc.d__143`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.ML.ModelBuilder.ViewModels.TrainViewModel.<b__109_0>d.MoveNext() (Microsoft.ML.ModelBuilder.Utils.Logger.Debug)
Copying generated code to project... (Microsoft.ML.ModelBuilder.Utils.Logger.Info)
2023-06-19 15:46:57.0761 INFO Copying usefulData.consumption.cs to folder: C:\Users\clara.gard\source\repos\FirstMLProject\FirstMLProject (Microsoft.ML.ModelBuilder.Utils.Logger.Info)
2023-06-19 15:46:57.0761 INFO Copying usefulData.training.cs to folder: C:\Users\clara.gard\source\repos\FirstMLProject\FirstMLProject (Microsoft.ML.ModelBuilder.Utils.Logger.Info)
2023-06-19 15:46:57.0761 INFO COMPLETED (Microsoft.ML.ModelBuilder.Utils.Logger.Info)
2023-06-19 15:46:57.0894 INFO
Updating nuget dependencies... (Microsoft.ML.ModelBuilder.Utils.Logger.Info)
2023-06-19 15:46:57.0894 INFO Installing nuget package, package ID: Microsoft.ML, package Version: 1.6.0 (Microsoft.ML.ModelBuilder.Utils.Logger.Info)
2023-06-19 15:47:00.0753 DEBUG Package restore failed. Rolling back package changes for 'FirstMLProject'.
at NuGet.PackageManagement.NuGetPackageManager.d__89.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.PackageManagement.NuGetPackageManager.d__86.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.PackageManagement.NuGetPackageManager.d__53.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.PackageManagement.NuGetPackageManager.d__52.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.VisualStudio.Implementation.Extensibility.VsPackageInstaller.d__28.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at NuGet.VisualStudio.Implementation.Extensibility.VsPackageInstaller.d__27.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at NuGet.VisualStudio.Implementation.Extensibility.VsPackageInstaller.d__27.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Threading.JoinableTask.CompleteOnCurrentThread()
at NuGet.VisualStudio.Implementation.Extensibility.VsPackageInstaller.InstallPackage(String source, Project project, String packageId, String version, Boolean ignoreDependencies)
at Microsoft.ML.ModelBuilder.Utils.Utilities.d__17.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.ML.ModelBuilder.ViewModels.TrainViewModel.d__119.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at Microsoft.ML.ModelBuilder.ViewModels.TrainViewModel.d__118.MoveNext() (Microsoft.ML.ModelBuilder.Utils.Logger.Debug)
2023-06-19 15:43:08.0385 DEBUG at System.ThrowHelper.ThrowKeyNotFoundException()
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at Microsoft.ML.ModelBuilder.AutoMLService.Tuner.CFO.get_BestConfig() in /_/src/Microsoft.ML.ModelBuilder.AutoMLService/Tuner/CFO.cs:line 80
at Microsoft.ML.ModelBuilder.AutoMLService.Proposer.HyperParameterProposer.Update(TrialParameter parameter, TrialResult result) in /_/src/Microsoft.ML.ModelBuilder.AutoMLService/Proposer/HyperParameterProposer.cs:line 119
at Microsoft.ML.ModelBuilder.AutoMLService.Proposer.Controller.Update(TrialParameter parameter, TrialResult result) in /_/src/Microsoft.ML.ModelBuilder.AutoMLService/Proposer/Controller.cs:line 67
at Microsoft.ML.ModelBuilder.AutoMLService.Experiments.LocalAutoMLExperiment.<>c__DisplayClass15_0.b__3(Object sender, ValueTuple`2 e) in /_/src/Microsoft.ML.ModelBuilder.AutoMLService/Experiments/LocalAutoMLExperiment.cs:line 117
at Microsoft.ML.ModelBuilder.AutoMLService.LocalDispatcher.Run() in /_/src/Microsoft.ML.ModelBuilder.AutoMLService/Dispatcher/LocalDispatcher.cs:line 149
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.ML.ModelBuilder.AutoMLService.LocalDispatcher.d__19.MoveNext() in /_/src/Microsoft.ML.ModelBuilder.AutoMLService/Dispatcher/LocalDispatcher.cs:line 153
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.ML.ModelBuilder.AutoMLService.LocalDispatcher.d__16.MoveNext() in /_/src/Microsoft.ML.ModelBuilder.AutoMLService/Dispatcher/LocalDispatcher.cs:line 51 (Microsoft.ML.ModelBuilder.Utils.Logger.Debug)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.