Closed Symbai closed 1 year ago
Should already be fixed in latest main
I have the latest version and am running visual studio 17.6 (preview beta). The Data Classification one crashes visual studio for me. Is the VSIX code available open source? I really like the design and layout you used, I am developing another Visual Studio extension for e-commerce templates and am curiuos if you used a XAML or Windows Form.
Unfortunately it does seem a little unstable.
Hey Scott. We haven’t released the fix yet. For your information, the UI of model builder is developed by wpf and xaml . Hope this helps!
Get Outlook for iOShttps://aka.ms/o0ukef
From: Scott Weeden @.> Sent: Wednesday, June 21, 2023 6:24:21 AM To: dotnet/machinelearning-modelbuilder @.> Cc: XiaoYun Zhang @.>; Assign @.> Subject: Re: [dotnet/machinelearning-modelbuilder] Visual Studio crashes after choosing a different CSV file and trying to pick a column (Issue #2718)
I have the latest version and am running visual studio 17.6 (preview beta). The Data Classification one crashes visual studio for me. Is the VSIX code available open source? I really like the design and layout you used, I am developing another Visual Studio extension for e-commerce templates and am curiuos if you used a XAML or Windows Form.
Unfortunately it does seem a little unstable.
— Reply to this email directly, view it on GitHubhttps://github.com/dotnet/machinelearning-modelbuilder/issues/2718#issuecomment-1600830546, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEAYLOSAP7WVG462QLDK2VDXMLYYLANCNFSM6AAAAAAZI2JCUE. You are receiving this because you were assigned.Message ID: @.***>
same issue with same scenario with: ML.NET version 17.17.0.2332602 Microsoft Visual Studio 2022 Version 17.6.4
Reopen it due to not fixed
Hey @Symbai
I just can't reproduce the error. I tried text classification on cpu/gpu using wiki-detox as first dataset and tweet.txt as second dataset. And both training just work fine.
Could you provide more details on how to reproduce this issue? Thanks!
Hi,
After remove all and reinstall VS 2022.
data test.csv
Scenario
Exception:
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Microsoft.ML.Runtime.ComponentCatalog.LoadableClassInfo.CreateInstanceCore(Object[] ctorArgs)
at Microsoft.ML.Runtime.ComponentCatalog.TryCreateInstance[TRes](IHostEnvironment env, Type signatureType, TRes& result, String name, String options, Object[] extra)
at Microsoft.ML.Runtime.ComponentCatalog.TryCreateInstance[TRes,TSig](IHostEnvironment env, TRes& result, String name, String options, Object[] extra)
at Microsoft.ML.ModelLoadContext.TryLoadModelCore[TRes,TSig](IHostEnvironment env, TRes& result, Object[] extra)
at Microsoft.ML.ModelLoadContext.TryLoadModel[TRes,TSig](IHostEnvironment env, TRes& result, RepositoryReader rep, Entry ent, String dir, Object[] extra)
at Microsoft.ML.ModelLoadContext.LoadModel[TRes,TSig](IHostEnvironment env, TRes& result, RepositoryReader rep, Entry ent, String dir, Object[] extra)
at Microsoft.ML.ModelLoadContext.LoadModelOrNull[TRes,TSig](IHostEnvironment env, TRes& result, RepositoryReader rep, String dir, Object[] extra)
at Microsoft.ML.ModelLoadContext.LoadModel[TRes,TSig](IHostEnvironment env, TRes& result, RepositoryReader rep, String dir, Object[] extra)
at Microsoft.ML.ModelOperationsCatalog.Load(Stream stream, DataViewSchema& inputSchema)
at Microsoft.ML.ModelOperationsCatalog.Load(String filePath, DataViewSchema& inputSchema)
at Microsoft.ML.ModelBuilder.AutoMLService.ServiceFactory.CodeGeneratorService.SetTorchRunTimeFolderAndLoadModel(ITrainingConfiguration configuration, String modelPath, MLContext& context, ITransformer& model, DataViewSchema& inputSchema) in /_/src/Microsoft.ML.ModelBuilder.AutoMLService/ServiceFactory/CodeGeneratorService.cs:line 139
at Microsoft.ML.ModelBuilder.AutoMLService.ServiceFactory.CodeGeneratorService.GenerateConsumptionAsync(ITrainingConfiguration configuration, String trainingConfigurationFolder, String nameSpace, String className, TargetType target, String[] labels, CancellationToken ct) in /_/src/Microsoft.ML.ModelBuilder.AutoMLService/ServiceFactory/CodeGeneratorService.cs:line 155 at StreamJsonRpc.JsonRpc.<InvokeCoreAsync>d__151`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 System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Microsoft.ML.ModelBuilder.ViewModels.TrainViewModel.<GenerateCodeBehindFilesAsync>d__100.MoveNext()
Log output:
Set log file path to C:\Users\CC\AppData\Local\Temp\MLVSTools\logs\MLModel1-AXB532.txt
start text classification
restore "c:\program files\microsoft visual studio\2022\community\common7\ide\extensions\aeowiwmr.5oo\AutoMLService\RuntimeManager\torchsharp.cpu.csproj" --configfile "c:\program files\microsoft visual studio\2022\community\common7\ide\extensions\aeowiwmr.5oo\AutoMLService\RuntimeManager\NuGet.config" -r win-x64 /p:UsingToolXliff=false /p:TorchSharpVersion=0.99.5 /p:TorchSharpCudaRuntimeVersion=1.13.0.1 /p:TensorflowRuntimeVersion=2.3.1 /p:BaseIntermediateOutputPath="C:\Users\CC\AppData\Local\Temp\ModelBuilder\torchsharp-cpu-0.99.5\obj"
publish "c:\program files\microsoft visual studio\2022\community\common7\ide\extensions\aeowiwmr.5oo\AutoMLService\RuntimeManager\torchsharp.cpu.csproj" -r win-x64 -c Release --no-self-contained -o "C:\Users\CC\AppData\Local\Temp\ModelBuilder\torchsharp-cpu-0.99.5" --no-restore /p:UsingToolXliff=false /p:TorchSharpVersion=0.99.5 /p:TorchSharpCudaRuntimeVersion=1.13.0.1 /p:TensorflowRuntimeVersion=2.3.1 /p:BaseOutputPath="C:\Users\CC\AppData\Local\Temp\ModelBuilder\torchsharp-cpu-0.99.5\bin\\" /p:BaseIntermediateOutputPath="C:\Users\CC\AppData\Local\Temp\ModelBuilder\torchsharp-cpu-0.99.5\obj\\"
start installing runtime in C:\Users\CC\AppData\Local\Temp\ModelBuilder\torchsharp-cpu-0.99.5
Failed to read environment variable [DOTNET_STARTUP_HOOKS], HRESULT: 0x800700CB
Determining projects to restore...
All projects are up-to-date for restore.
Failed to read environment variable [DOTNET_STARTUP_HOOKS], HRESULT: 0x800700CB
MSBuild version 17.6.8+c70978d4d for .NET
torchsharp.cpu -> C:\Users\CC\AppData\Local\Temp\ModelBuilder\torchsharp-cpu-0.99.5\bin\Release\netstandard2.0\win-x64\torchsharp.cpu.dll
torchsharp.cpu -> C:\Users\CC\AppData\Local\Temp\ModelBuilder\torchsharp-cpu-0.99.5\
install runtime successfully
Use cross validation with fold: 5
| Trainer MacroAccuracy Duration |
|--------------------------------------------------------------------|
|0 TextClassificationMulti 0.0867 35.2520 |
|--------------------------------------------------------------------|
| Experiment Results |
|--------------------------------------------------------------------|
| Summary |
|--------------------------------------------------------------------|
|ML Task: text classification |
|Dataset: C:\Users\CC\Documents\aaa\test.csv |
|Total experiment time : 35.2520 Secs |
|Label : Category |
|Total number of models explored: 1 |
|--------------------------------------------------------------------|
| Top 1 models explored |
|--------------------------------------------------------------------|
| Trainer MacroAccuracy Duration |
|--------------------------------------------------------------------|
|0 TextClassificationMulti 0.0867 35.2520 |
|--------------------------------------------------------------------|
Generate code behind files
OK, now I'm able to reproduce this error, will get back to you once we found the solution/fix
Work-around: use train-validation split ratio instead of cross-validation
The error is because the shape of deep learning model is fixed the first time the pipeline called Fit
. Since the shape of deep learning model is determined by dataset (like # of labels), it might cause shape mismatch exception when the meta-info is different for different fold of cross-validation split.
The current work-around is to use train-validation
split when encounter this issue while ML.Net team are working on a fix .
System Information (please complete the following information):
Model Builder Version (available in Manage Extensions dialog):
Visual Studio Version 17.7.0 Preview 2.0
Describe the bug Every time I reopen the project (also happens when creating a new project) and I select a DIFFERENT a csv file (small or big one doesnt matter) and I try to pick a label column VS crashes completely. But the "Preview data" shows my new CSV content. Only occurs when a CSV was selected and model trained etc and I select a different a csv file and try to pick the first column. Selecting a csv file for the first time always works.
My mbconfig file: https://github.com/dotnet/machinelearning-modelbuilder/issues/2716#issuecomment-1594037970
To Reproduce
Data
tab, pick a new CSV fileExpected behavior No crash?
Additional context