You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Data classification: The generated Console App and Web API projects are running failed. #2418
System Information (please complete the following information):
Windows OS: Windows-11-Enterprise-22H2
ML.Net Model Builder 2022: 16.14.0.2261401 (Main Build)
Microsoft Visual Studio Enterprise: 2022(17.4.1)
.Net: 6.0
Describe the bug
On which step of the process did you run into an issue:
The generated Console App is running failed.
changed the title [-]Data classification: The generated Console App project is running failed.[/-][+]Data classification: The generated Console App and Web API projects are running failed.[/+]on Dec 15, 2022
The bug is also repro for Text classification scenario: The generated Console App project is running failed; the generated Web API project is running successfully.
Verified on the latest main build 16.14.0.2262002, the bug is repro on Data classification, Value predication, Recommendation, Forecasting, Text classification scenarios.
For this
binary is not an issue , it happens for text classification types such as data-classification(binary and multi) and Text- classification but it is not consistence
@v-Hailishi FYI: to validate code in the generated project you should use the newly mbconfig file, if you use old mbconfig file you might get some errors
Change to something like this:
.Append(mlContext.Transforms.Conversion.MapValueToKey(param.OutputColumnName, param.InputColumnName, addKeyValueAnnotationsAsText: true))
Verified on the latest main build 16.14.2.2306001, the generated Console App and Web API projects are still running failed on scenarios: Data classification, Value predication, Recommendation, Forecasting, Text classification scenarios.
The following are the details:
Verified on the latest main build 16.14.2.2306101, the generated Console App and Web API projects are still running failed on scenarios: Data classification, Value predication, Recommendation, Forecasting, Image Classification-Local, Text classification scenarios.
The following are the details:
Verified on the latest main build 16.14.2.2306701, the generated Console App and Web API projects are still running failed on scenarios: Data classification, Value predication, Recommendation, Forecasting, Image Classification-Local, Object detection, Text classification scenarios.
The following are the details:
Value predication & Recommendation:
The generated Console App project is running successfully; the generated Web API project is running fail.
Web API:
File: (After removing the unnecessary using directive, can run successful)
SQL:
After removing the unnecessary using directive, still run failed.
Forecasting:
Both of the generated Console App and Web API projects are still running failed.
File:
Console App:
Web API:
SQL:
Console App:
Web API:
Image Classification-Local & Object detection:
The generated Console App project is running successfully; the generated Web API project is running failed.
Web API: (After removing the unnecessary using directive, can run successful)
Text classification:
The generated Console App project is running successfully; the generated Web API project is running fail.
Web API:
File: Failed (After removing the unnecessary using directive, can run successful)
SQL:
After removing the unnecessary using directive, still run failed.
Verified on the latest main build 16.14.2.2306903, the generated Console App and Web API projects are still running failed on scenarios: Data classification, Value predication, Recommendation, Forecasting, Text classification scenarios.
The following are the details:
Value predication & Recommendation & Text classification:
The generated Console App project is running successfully; the generated Web API project is running fail.
Web API:
File: Run successful
SQL: Failed (After choosing "Use local version '4.8.3'" can run successful.)
Forecasting:
Both of the generated Console App and Web API projects are still running failed.
File:
Console App: Failed (After choosing "using System.IO;" can run successful.)
Web API: Failed
SQL:
Console App: Failed (After choosing "using Microsoft.ML.Data;" and "using System.IO;" and "Use local version '4.8.3'" can run successful.)
Web API: Failed
Verified on the latest main build 16.14.3.2307701, the generated Console App and Web API projects are still running failed on scenarios: Data classification.
Data classification
Only failed for Microsoft SQL Server: Binary (SQL Password)
Console App: Failed
Activity
[-]Data classification: The generated Console App project is running failed.[/-][+]Data classification: The generated Console App and Web API projects are running failed.[/+]v-Hailishi commentedon Dec 15, 2022
The bug is also repro for Text classification scenario: The generated Console App project is running failed; the generated Web API project is running successfully.

zewditu commentedon Dec 16, 2022
Regressed by this PR https://github.com/dotnet/machinelearning-tools/pull/1624.
v-Hailishi commentedon Dec 19, 2022
The bug is still repro on the latest main build: 16.14.0.2261601




File:
SQL Password:
beccamc commentedon Dec 19, 2022
Thanks for finding this @v-Hailishi!
Dev team - possible root cause is that this is binary classification?
v-Hailishi commentedon Dec 22, 2022
Verified on the latest main build 16.14.0.2262002, the bug is repro on Data classification, Value predication, Recommendation, Forecasting, Text classification scenarios.
zewditu commentedon Jan 3, 2023
For this

binary is not an issue , it happens for text classification types such as data-classification(binary and multi) and Text- classification but it is not consistence
zewditu commentedon Jan 3, 2023
It is not reproduceable from the latest main

zewditu commentedon Jan 3, 2023
Code behind generation missed installation of

System.Data.SqlClientzewditu commentedon Jan 4, 2023
@v-Hailishi FYI: to validate code in the generated project you should use the newly mbconfig file, if you use old mbconfig file you might get some errors
JakeRadMSFT commentedon Jan 5, 2023
We're going to change our code to convert to strings for now in AutoML pipelines and CodeGen. We'll also look into supporting other types in ML.NET.
@michaelgsharp has something that we've briefly tested and it works.
JakeRadMSFT commentedon Jan 5, 2023
For AutoML we can try the following change:
https://github.com/dotnet/machinelearning/blob/a758217121c85cf5af9a2ea3f759feae2020d7b5/src/Microsoft.ML.AutoML/SweepableEstimator/Estimators/MapValueToKey.cs#L11
Change to something like this:
.Append(mlContext.Transforms.Conversion.MapValueToKey(param.OutputColumnName, param.InputColumnName, addKeyValueAnnotationsAsText: true))
v-Hailishi commentedon Jan 11, 2023
Verified on the latest main build 16.14.2.2306001, the generated Console App and Web API projects are still running failed on scenarios: Data classification, Value predication, Recommendation, Forecasting, Text classification scenarios.
The following are the details:
1.1 File1 (https://testpass.blob.core.windows.net/test-pass-data/wikipedia-detox-250-line-data.tsv)


Console App:
Web API:
1.2 File2 (https://testpass.blob.core.windows.net/test-pass-data/issues.tsv.txt)


Console App: Run successful
Web API:
1.3 Microsoft SQL Server: Binary (SQL Password)


Console App:
Web API:
1.4 Microsoft SQL Server Database File (https://github.com/dotnet/machinelearning-samples/raw/main/samples/modelbuilder/MulticlassClassification_RestaurantViolations/RestaurantScores.zip)


Console App: Run successful
Web API:
The generated Console App project is running successfully; the generated Web API project is running fail.
Console App: Run successful

Web API:


File:
SQL:
The generated Console App project is running successfully; the generated Web API project is running fail.
Console App: Run successful

Web API:


File:
SQL:
Both of the generated Console App and Web API projects are still running failed
File:


SQL:
Console App:

Web API:


File:
SQL:
v-Hailishi commentedon Jan 12, 2023
Verified on the latest main build 16.14.2.2306101, the generated Console App and Web API projects are still running failed on scenarios: Data classification, Value predication, Recommendation, Forecasting, Image Classification-Local, Text classification scenarios.
The following are the details:
1.1 File1 (https://testpass.blob.core.windows.net/test-pass-data/wikipedia-detox-250-line-data.tsv)


Console App: Run successful
Web API:
1.2 File2 (https://testpass.blob.core.windows.net/test-pass-data/issues.tsv.txt)


Console App:
Web API:
1.3 Microsoft SQL Server: Binary (SQL Password)


Console App:
Web API:
1.4 Microsoft SQL Server Database File (https://github.com/dotnet/machinelearning-samples/raw/main/samples/modelbuilder/MulticlassClassification_RestaurantViolations/RestaurantScores.zip)


Console App:
Web API:
The generated Console App project is running successfully; the generated Web API project is running fail.
Web API:


File:
SQL:
Both of the generated Console App and Web API projects are still running failed.
File:


SQL:
The generated Console App project is running fail; the generated Web API project is running successfully.
Console App:

The generated Console App project is running successfully; the generated Web API project is running fail.
Console App: Run successful

Web API:


File:
SQL:
v-Hailishi commentedon Jan 18, 2023
Verified on the latest main build 16.14.2.2306701, the generated Console App and Web API projects are still running failed on scenarios: Data classification, Value predication, Recommendation, Forecasting, Image Classification-Local, Object detection, Text classification scenarios.
The following are the details:
1.1 File (https://testpass.blob.core.windows.net/test-pass-data/wikipedia-detox-250-line-data.tsv)

Console App: Run successful
Web API: Failed (After removing the unnecessary using directive, can run successful)
1.2 Microsoft SQL Server: Binary (SQL Password)



Console App: Failed
Web API: Failed
After removing the unnecessary using directive, still run failed.
1.3 Microsoft SQL Server Database File (https://github.com/dotnet/machinelearning-samples/raw/main/samples/modelbuilder/MulticlassClassification_RestaurantViolations/RestaurantScores.zip)


Console App: Run successful
Web API: Failed
After removing the unnecessary using directive, still run failed.
The generated Console App project is running successfully; the generated Web API project is running fail.
Web API:



File: (After removing the unnecessary using directive, can run successful)
SQL:
After removing the unnecessary using directive, still run failed.
Both of the generated Console App and Web API projects are still running failed.
File:


Console App:
Web API:
SQL:


Console App:
Web API:
The generated Console App project is running successfully; the generated Web API project is running failed.
Web API: (After removing the unnecessary using directive, can run successful)

The generated Console App project is running successfully; the generated Web API project is running fail.
Web API:

File: Failed (After removing the unnecessary using directive, can run successful)
SQL:


After removing the unnecessary using directive, still run failed.
v-Hailishi commentedon Jan 20, 2023
Verified on the latest main build 16.14.2.2306903, the generated Console App and Web API projects are still running failed on scenarios: Data classification, Value predication, Recommendation, Forecasting, Text classification scenarios.
The following are the details:
1.1 File (https://testpass.blob.core.windows.net/test-pass-data/wikipedia-detox-250-line-data.tsv)
Console App: Run successful
Web API: Run successful
1.2 Microsoft SQL Server: Binary (SQL Password)


Console App: Failed
Web API: Failed
1.3 Microsoft SQL Server Database File (https://github.com/dotnet/machinelearning-samples/raw/main/samples/modelbuilder/MulticlassClassification_RestaurantViolations/RestaurantScores.zip)

Console App: Run successful
Web API: Failed (After choosing "Use local version '4.8.3'" can run successful.)
The generated Console App project is running successfully; the generated Web API project is running fail.
Web API:

File: Run successful
SQL: Failed (After choosing "Use local version '4.8.3'" can run successful.)
Both of the generated Console App and Web API projects are still running failed.
File:


Console App: Failed (After choosing "using System.IO;" can run successful.)
Web API: Failed
SQL:


Console App: Failed (After choosing "using Microsoft.ML.Data;" and "using System.IO;" and "Use local version '4.8.3'" can run successful.)
Web API: Failed
v-Hailishi commentedon Jan 31, 2023
Verified on the latest main build 16.14.3.2307701, the generated Console App and Web API projects are still running failed on scenarios: Data classification.
Only failed for Microsoft SQL Server: Binary (SQL Password)
Console App: Failed

Web API: Failedzewditu commentedon Jan 31, 2023
@v-Hailishi what do you mean SQL password? is that a dataset, are you able to share your dataset? thanks
v-Hailishi commentedon Feb 1, 2023
@zewditu "SQL password" just means I use the SQL Server Authentication to log on to the server.

Besides, in the database, I use the dataset "https://testpass.blob.core.windows.net/test-pass-data/wikipedia-detox-250-line-data.tsv".

beccamc commentedon Feb 2, 2023
@zewditu This isn't regarding SQL. You can repro this by using a boolean type. I used the yelp dataset and set the prediction column to type boolean
v-Hailishi commentedon Feb 7, 2023
The bug has been fixed on the latest main build 17.14.3.2310605.
