dotnet / machinelearning-modelbuilder

Simple UI tool to build custom machine learning models.
Creative Commons Attribution 4.0 International
264 stars 56 forks source link

Model builder crashing because of ParseDouble & other exceptions #2723

Open ClaraGard opened 1 year ago

ClaraGard commented 1 year ago

System Information (please complete the following information):

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

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.d15.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.d143`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.d89.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.d86.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.d53.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.d52.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.d28.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at NuGet.VisualStudio.Implementation.Extensibility.VsPackageInstaller.d27.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at NuGet.VisualStudio.Implementation.Extensibility.VsPackageInstaller.d27.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.d17.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Microsoft.ML.ModelBuilder.ViewModels.TrainViewModel.d119.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.d118.MoveNext() (Microsoft.ML.ModelBuilder.Utils.Logger.Debug)

2023-06-19 15:43:08.0385 DEBUG at System.ThrowHelper.ThrowKeyNotFoundException() at System.Collections.Generic.Dictionary2.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.<ExecuteAsync>b__3(Object sender, ValueTuple2 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)

ClaraGard commented 1 year ago

I can add the full log file if needed usefulData-V5Y7ZN.txt

LittleLittleCloud commented 1 year ago

@ClaraGard from the log it seems that you are using a quite old model builder. Maybe try upgrade your model builder to v17.16.* and give it another chance to try?

LittleLittleCloud commented 1 year ago

@ClaraGard I can't reproduce this issue on latest model builder, so maybe you just need an upgrade