dotnet / dotnet/machinelearning-modelbuilder

mlnet classification error when amount of features increase

Open
#2,784 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Dockerfile
Stars
285
Forks
66
PR merge metrics
No merged PRs in 30d

Description

```
mlnet --version
16.15.1+5cfa5322dc43fb36001cafd7c46e716141dfa219

```
**Describe the bug**
mlnet classification error
```
System.Exception: Predict label not found: targetBool
at Microsoft.ML.CLI.Commands.ClassificationCommand.ToTrainingConfiguration() in /_/src/mlnet/Commands/ClassificationCommand.cs:line 45
at Microsoft.ML.CLI.Program.RunAutoMLCommandAndGetResult(AutoMLCommand command, Boolean skipGenerateConsoleApp) in /_/src/mlnet/Program.cs:line 365
at Microsoft.ML.CLI.Program.<>c.<b__4_0>d.MoveNext() in /_/src/mlnet/Program.cs:line 90
--- End of stack trace from previous location ---
at System.CommandLine.Invocation.CommandHandler.GetExitCodeAsync(Object value, InvocationContext context)
at System.CommandLine.Invocation.ModelBindingCommandHandler.InvokeAsync(InvocationContext context)
at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass23_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.ML.CLI.Program.<>c__DisplayClass4_0.<b__10>d.MoveNext() in /_/src/mlnet/Program.cs:line 325
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<b__24_0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass22_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass11_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<b__10_0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass14_0.<b__0>d.MoveNext()
```
logfile:
```
2023-11-12 08:16:36.5523 DEBUG Set log file path to C:\Users\X\AppData\Local\Temp\mlnet\log.txt (Microsoft.ML.CLI.Commands.MLCommand.set_LogFilePath)
2023-11-12 08:16:36.6061 DEBUG Set log file path to C:\Users\X\AppData\Local\Temp\mlnet\log.txt (Microsoft.ML.CLI.Commands.MLCommand.set_LogFilePath)
2023-11-12 08:16:36.6061 DEBUG Set log file path to C:\Users\X\AppData\Local\Temp\mlnet\log.txt (Microsoft.ML.CLI.Commands.MLCommand.set_LogFilePath)
2023-11-12 08:16:36.6061 DEBUG Set log file path to C:\Users\X\AppData\Local\Temp\mlnet\log.txt (Microsoft.ML.CLI.Commands.MLCommand.set_LogFilePath)
2023-11-12 08:16:36.6061 DEBUG Set log file path to C:\Users\X\AppData\Local\Temp\mlnet\log.txt (Microsoft.ML.CLI.Commands.MLCommand.set_LogFilePath)
2023-11-12 08:16:36.6181 DEBUG Set log file path to C:\Users\X\AppData\Local\Temp\mlnet\log.txt (Microsoft.ML.CLI.Commands.MLCommand.set_LogFilePath)
2023-11-12 08:16:36.6181 DEBUG Set log file path to C:\Users\X\AppData\Local\Temp\mlnet\log.txt (Microsoft.ML.CLI.Commands.MLCommand.set_LogFilePath)
2023-11-12 08:16:36.6181 DEBUG Set log file path to C:\Users\X\AppData\Local\Temp\mlnet\log.txt (Microsoft.ML.CLI.Commands.MLCommand.set_LogFilePath)
2023-11-12 08:16:36.6368 DEBUG System.FormatException: String ' available trainer: LGBM, RF, FASTTREE, LBFGS, SDCA ' was not recognized as a valid Boolean.
at System.Boolean.Parse(ReadOnlySpan`1 value)
at System.Boolean.Parse(String value)
at Microsoft.ML.CLI.FeatureFlagManager.ReadFeatureFlags(String ffPath) in /_/src/mlnet/FeatureFlagManager.cs:line 69 (Microsoft.ML.CLI.FeatureFlagManager.ReadFeatureFlags)
2023-11-12 08:16:46.7951 DEBUG Set log file path to C:\Users\X\AppData\Local\Temp\mlnet\log.txt (Microsoft.ML.CLI.Commands.MLCommand.set_LogFilePath)
2023-11-12 08:16:46.8546 DEBUG Set log file path to C:\Users\X\AppData\Local\Temp\mlnet\log.txt (Microsoft.ML.CLI.Commands.MLCommand.set_LogFilePath)
2023-11-12 08:16:46.8546 DEBUG Set log file path to C:\Users\X\AppData\Local\Temp\mlnet\log.txt (Microsoft.ML.CLI.Commands.MLCommand.set_LogFilePath)
2023-11-12 08:16:46.8546 DEBUG Set log file path to C:\Users\X\AppData\Local\Temp\mlnet\log.txt (Microsoft.ML.CLI.Commands.MLCommand.set_LogFilePath)
2023-11-12 08:16:46.8546 DEBUG Set log file path to C:\Users\X\AppData\Local\Temp\mlnet\log.txt (Microsoft.ML.CLI.Commands.MLCommand.set_LogFilePath)
2023-11-12 08:16:46.8546 DEBUG Set log file path to C:\Users\X\AppData\Local\Temp\mlnet\log.txt (Microsoft.ML.CLI.Commands.MLCommand.set_LogFilePath)
2023-11-12 08:16:46.8546 DEBUG Set log file path to C:\Users\X\AppData\Local\Temp\mlnet\log.txt (Microsoft.ML.CLI.Commands.MLCommand.set_LogFilePath)
2023-11-12 08:16:46.8546 DEBUG Set log file path to C:\Users\X\AppData\Local\Temp\mlnet\log.txt (Microsoft.ML.CLI.Commands.MLCommand.set_LogFilePath)
**2023-11-12 08:16:46.8740 DEBUG System.FormatException: String ' available trainer: LGBM, RF, FASTTREE, LBFGS, SDCA ' was not recognized as a valid Boolean.**
at System.Boolean.Parse(ReadOnlySpan`1 value)
at System.Boolean.Parse(String value)
at Microsoft.ML.CLI.FeatureFlagManager.ReadFeatureFlags(String ffPath) in /_/src/mlnet/FeatureFlagManager.cs:line 69 (Microsoft.ML.CLI.FeatureFlagManager.ReadFeatureFlags)
2023-11-12 08:16:46.9418 DEBUG Set log file path to C:\Users\X\AppData\Local\Temp\mlnet\log.txt (Microsoft.ML.CLI.Commands.MLCommand.set_LogFilePath)
2023-11-12 08:16:46.9466 DEBUG Set log level to Info (Microsoft.ML.CLI.Commands.MLCommand.set_Verbosity)
2023-11-12 08:16:47.6344 ERROR System.Exception: Predict label not found: targetBool
at Microsoft.ML.CLI.Commands.ClassificationCommand.ToTrainingConfiguration() in /_/src/mlnet/Commands/ClassificationCommand.cs:line 45
at Microsoft.ML.CLI.Program.RunAutoMLCommandAndGetResult(AutoMLCommand command, Boolean skipGenerateConsoleApp) in /_/src/mlnet/Program.cs:line 365
at Microsoft.ML.CLI.Program.<>c.<b__4_0>d.MoveNext() in /_/src/mlnet/Program.cs:line 90
--- End of stack trace from previous location ---
at System.CommandLine.Invocation.CommandHandler.GetExitCodeAsync(Object value, InvocationContext context)
at System.CommandLine.Invocation.ModelBindingCommandHandler.InvokeAsync(InvocationContext context)
at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass23_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.ML.CLI.Program.<>c__DisplayClass4_0.<b__10>d.MoveNext() in /_/src/mlnet/Program.cs:line 325
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<b__24_0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass22_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass11_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<b__10_0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass14_0.<b__0>d.MoveNext() (Microsoft.ML.CLI.Program+<>c__DisplayClass4_0.b__8)
2023-11-12 08:16:47.6344 DEBUG System.Exception: Predict label not found: targetBool
at Microsoft.ML.CLI.Commands.ClassificationCommand.ToTrainingConfiguration() in /_/src/mlnet/Commands/ClassificationCommand.cs:line 45
at Microsoft.ML.CLI.Program.RunAutoMLCommandAndGetResult(AutoMLCommand command, Boolean skipGenerateConsoleApp) in /_/src/mlnet/Program.cs:line 365
at Microsoft.ML.CLI.Program.<>c.<b__4_0>d.MoveNext() in /_/src/mlnet/Program.cs:line 90
--- End of stack trace from previous location ---
at System.CommandLine.Invocation.CommandHandler.GetExitCodeAsync(Object value, InvocationContext context)
at System.CommandLine.Invocation.ModelBindingCommandHandler.InvokeAsync(InvocationContext context)
at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass23_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.ML.CLI.Program.<>c__DisplayClass4_0.<b__10>d.MoveNext() in /_/src/mlnet/Program.cs:line 325
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<b__24_0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass22_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass11_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<b__10_0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass14_0.<b__0>d.MoveNext() (Microsoft.ML.CLI.Program+<>c__DisplayClass4_0.b__8)
2023-11-12 08:16:47.6493 INFO Check out log file for more information: C:\Users\X\AppData\Local\Temp\mlnet\log.txt (Microsoft.ML.CLI.Program+<>c__DisplayClass4_0.b__8)
2023-11-12 08:16:47.6493 INFO Exiting ... (Microsoft.ML.CLI.Program+<>c__DisplayClass4_0.b__8)
```

**To Reproduce**
download [working.csv](https://github.com/dotnet/machinelearning-modelbuilder/files/13328076/working.csv)
`mlnet classification --dataset working.csv --label-col targetBool`
yay working :)

download [error.csv](https://github.com/dotnet/machinelearning-modelbuilder/files/13328077/error.csv)
`mlnet classification --dataset error.csv --label-col targetBool`
**NOT working :(**

**Expected behavior**
error.csv should also run properly

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.