Skip to content

Commit a980200

Browse files
Samples migration to v1.4 GA (#738)
* Fixed file path for TaxiFarePrediction.Explainability * Update to ML.NET 1.4 RC1 * BaseLine: Image Classification DNN-based sample updated to ML.NET 1.4 GA * Updates measuring Prediction times * Update with code with explicit hyper-parameters * Samples migrated to public ML.NET 1.4 Preview3 drop-build * Samples code migrated to ML.NET 1.4 * Added sample BikeSharing-TimeSeries-Forecast-And-DB to Preview Solution * Version v1.4 updated to all needed README.MD
1 parent 737bfc6 commit a980200

File tree

104 files changed

+6135
-4097
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+6135
-4097
lines changed

Diff for: samples/Directory.Build.props

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<Project>
22

33
<PropertyGroup>
4-
<MicrosoftMLVersion>1.3.1</MicrosoftMLVersion>
5-
<MicrosoftMLPreviewVersion>0.15.1</MicrosoftMLPreviewVersion>
4+
<MicrosoftMLVersion>1.4.0</MicrosoftMLVersion>
5+
<MicrosoftMLPreviewVersion>0.16.0</MicrosoftMLPreviewVersion>
66
</PropertyGroup>
77

88
</Project>

Diff for: samples/csharp/Samples-Using-Preview.sln

+55-32
Original file line numberDiff line numberDiff line change
@@ -3,56 +3,79 @@ Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio Version 16
44
VisualStudioVersion = 16.0.29009.5
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DatabaseLoader.Solution", "DatabaseLoader.Solution", "{A3FA08DD-A8B7-4B65-9BBB-FE137FFF5098}"
6+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MovieRecommendation.Solution", "MovieRecommendation.Solution", "{A7836E64-C522-4236-8B31-0A360C2CA9ED}"
77
EndProject
8-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ImageClassificationModelTraining.Solution", "ImageClassificationModelTraining.Solution", "{58888D0A-8521-4544-8CB7-A4151630EF77}"
8+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MovieRecommendation", "getting-started\MatrixFactorization_MovieRecommendation\MovieRecommendation\MovieRecommendation.csproj", "{39070118-6DFD-401F-8396-E1036F0C598C}"
99
EndProject
10-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DatabaseLoaderConsoleApp", "getting-started\DatabaseLoader\DatabaseLoaderConsoleApp\DatabaseLoaderConsoleApp.csproj", "{5A86174B-C49B-4C16-8CC6-2EA7C770A4F7}"
10+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "1. GettingStarted samples", "1. GettingStarted samples", "{50C6D192-D2F6-4275-B5DB-00DC85A1FA88}"
1111
EndProject
12-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ImageClassification.Predict", "getting-started\DeepLearning_ImageClassification_Training\ImageClassification.Predict\ImageClassification.Predict.csproj", "{73E98D88-1A4F-4328-BCF7-8191AF788586}"
12+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "2. End-to-end apps", "2. End-to-end apps", "{F1E210B3-F333-479D-A40F-8CE10DCD6E1E}"
1313
EndProject
14-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ImageClassification.Train", "getting-started\DeepLearning_ImageClassification_Training\ImageClassification.Train\ImageClassification.Train.csproj", "{5D928947-78DD-412B-8A40-2EB5A72A6144}"
14+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ProductRecommendation.Solution", "ProductRecommendation.Solution", "{FF92F77A-4D79-42DB-BCCE-2C49B6CCE6B3}"
1515
EndProject
16-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ImageClassification.Shared", "getting-started\DeepLearning_ImageClassification_Training\ImageClassification.Shared\ImageClassification.Shared.csproj", "{1472A4E8-91D5-4738-98E0-7BA2D1C8DE5D}"
16+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ProductRecommender", "getting-started\MatrixFactorization_ProductRecommendation\ProductRecommender\ProductRecommender.csproj", "{833EEC6A-F866-4052-ACE2-8D7E72E7862D}"
1717
EndProject
18-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ImageClassification.WebApp", "getting-started\DeepLearning_ImageClassification_Training\WebApp.Predict\ImageClassification.WebApp.csproj", "{677BDA3F-C9AE-4F35-A12C-C4F9257FF00E}"
18+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ImageBinaryClassificationModelTraining.Solution", "ImageBinaryClassificationModelTraining.Solution", "{4C0827DD-9212-485B-B3A7-D7969AFD9328}"
19+
EndProject
20+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DeepLearning_ImageClassification_Binary", "getting-started\DeepLearning_ImageClassification_Binary\DeepLearning_ImageClassification_Binary\DeepLearning_ImageClassification_Binary.csproj", "{147DAD69-AAB4-47FF-805F-53B3E9299D02}"
21+
EndProject
22+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "BikeSharing-TimeSeries-Forecast-And-DB", "BikeSharing-TimeSeries-Forecast-And-DB", "{1EA75CE9-074B-444F-A4F9-AA3C6607BB2B}"
23+
EndProject
24+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BikeDemandForecasting", "getting-started\Forecasting_BikeSharingDemand\BikeDemandForecasting\BikeDemandForecasting.csproj", "{68FFA3D0-A818-4767-89CC-821FB6F8EAEC}"
1925
EndProject
2026
Global
2127
GlobalSection(SolutionConfigurationPlatforms) = preSolution
2228
Debug|Any CPU = Debug|Any CPU
29+
Debug|x64 = Debug|x64
2330
Release|Any CPU = Release|Any CPU
31+
Release|x64 = Release|x64
2432
EndGlobalSection
2533
GlobalSection(ProjectConfigurationPlatforms) = postSolution
26-
{5A86174B-C49B-4C16-8CC6-2EA7C770A4F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
27-
{5A86174B-C49B-4C16-8CC6-2EA7C770A4F7}.Debug|Any CPU.Build.0 = Debug|Any CPU
28-
{5A86174B-C49B-4C16-8CC6-2EA7C770A4F7}.Release|Any CPU.ActiveCfg = Release|Any CPU
29-
{5A86174B-C49B-4C16-8CC6-2EA7C770A4F7}.Release|Any CPU.Build.0 = Release|Any CPU
30-
{73E98D88-1A4F-4328-BCF7-8191AF788586}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
31-
{73E98D88-1A4F-4328-BCF7-8191AF788586}.Debug|Any CPU.Build.0 = Debug|Any CPU
32-
{73E98D88-1A4F-4328-BCF7-8191AF788586}.Release|Any CPU.ActiveCfg = Release|Any CPU
33-
{73E98D88-1A4F-4328-BCF7-8191AF788586}.Release|Any CPU.Build.0 = Release|Any CPU
34-
{5D928947-78DD-412B-8A40-2EB5A72A6144}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
35-
{5D928947-78DD-412B-8A40-2EB5A72A6144}.Debug|Any CPU.Build.0 = Debug|Any CPU
36-
{5D928947-78DD-412B-8A40-2EB5A72A6144}.Release|Any CPU.ActiveCfg = Release|Any CPU
37-
{5D928947-78DD-412B-8A40-2EB5A72A6144}.Release|Any CPU.Build.0 = Release|Any CPU
38-
{1472A4E8-91D5-4738-98E0-7BA2D1C8DE5D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
39-
{1472A4E8-91D5-4738-98E0-7BA2D1C8DE5D}.Debug|Any CPU.Build.0 = Debug|Any CPU
40-
{1472A4E8-91D5-4738-98E0-7BA2D1C8DE5D}.Release|Any CPU.ActiveCfg = Release|Any CPU
41-
{1472A4E8-91D5-4738-98E0-7BA2D1C8DE5D}.Release|Any CPU.Build.0 = Release|Any CPU
42-
{677BDA3F-C9AE-4F35-A12C-C4F9257FF00E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
43-
{677BDA3F-C9AE-4F35-A12C-C4F9257FF00E}.Debug|Any CPU.Build.0 = Debug|Any CPU
44-
{677BDA3F-C9AE-4F35-A12C-C4F9257FF00E}.Release|Any CPU.ActiveCfg = Release|Any CPU
45-
{677BDA3F-C9AE-4F35-A12C-C4F9257FF00E}.Release|Any CPU.Build.0 = Release|Any CPU
34+
{39070118-6DFD-401F-8396-E1036F0C598C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
35+
{39070118-6DFD-401F-8396-E1036F0C598C}.Debug|Any CPU.Build.0 = Debug|Any CPU
36+
{39070118-6DFD-401F-8396-E1036F0C598C}.Debug|x64.ActiveCfg = Debug|Any CPU
37+
{39070118-6DFD-401F-8396-E1036F0C598C}.Debug|x64.Build.0 = Debug|Any CPU
38+
{39070118-6DFD-401F-8396-E1036F0C598C}.Release|Any CPU.ActiveCfg = Release|Any CPU
39+
{39070118-6DFD-401F-8396-E1036F0C598C}.Release|Any CPU.Build.0 = Release|Any CPU
40+
{39070118-6DFD-401F-8396-E1036F0C598C}.Release|x64.ActiveCfg = Release|Any CPU
41+
{39070118-6DFD-401F-8396-E1036F0C598C}.Release|x64.Build.0 = Release|Any CPU
42+
{833EEC6A-F866-4052-ACE2-8D7E72E7862D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
43+
{833EEC6A-F866-4052-ACE2-8D7E72E7862D}.Debug|Any CPU.Build.0 = Debug|Any CPU
44+
{833EEC6A-F866-4052-ACE2-8D7E72E7862D}.Debug|x64.ActiveCfg = Debug|x64
45+
{833EEC6A-F866-4052-ACE2-8D7E72E7862D}.Debug|x64.Build.0 = Debug|x64
46+
{833EEC6A-F866-4052-ACE2-8D7E72E7862D}.Release|Any CPU.ActiveCfg = Release|Any CPU
47+
{833EEC6A-F866-4052-ACE2-8D7E72E7862D}.Release|Any CPU.Build.0 = Release|Any CPU
48+
{833EEC6A-F866-4052-ACE2-8D7E72E7862D}.Release|x64.ActiveCfg = Release|x64
49+
{833EEC6A-F866-4052-ACE2-8D7E72E7862D}.Release|x64.Build.0 = Release|x64
50+
{147DAD69-AAB4-47FF-805F-53B3E9299D02}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
51+
{147DAD69-AAB4-47FF-805F-53B3E9299D02}.Debug|Any CPU.Build.0 = Debug|Any CPU
52+
{147DAD69-AAB4-47FF-805F-53B3E9299D02}.Debug|x64.ActiveCfg = Debug|Any CPU
53+
{147DAD69-AAB4-47FF-805F-53B3E9299D02}.Debug|x64.Build.0 = Debug|Any CPU
54+
{147DAD69-AAB4-47FF-805F-53B3E9299D02}.Release|Any CPU.ActiveCfg = Release|Any CPU
55+
{147DAD69-AAB4-47FF-805F-53B3E9299D02}.Release|Any CPU.Build.0 = Release|Any CPU
56+
{147DAD69-AAB4-47FF-805F-53B3E9299D02}.Release|x64.ActiveCfg = Release|Any CPU
57+
{147DAD69-AAB4-47FF-805F-53B3E9299D02}.Release|x64.Build.0 = Release|Any CPU
58+
{68FFA3D0-A818-4767-89CC-821FB6F8EAEC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
59+
{68FFA3D0-A818-4767-89CC-821FB6F8EAEC}.Debug|Any CPU.Build.0 = Debug|Any CPU
60+
{68FFA3D0-A818-4767-89CC-821FB6F8EAEC}.Debug|x64.ActiveCfg = Debug|Any CPU
61+
{68FFA3D0-A818-4767-89CC-821FB6F8EAEC}.Debug|x64.Build.0 = Debug|Any CPU
62+
{68FFA3D0-A818-4767-89CC-821FB6F8EAEC}.Release|Any CPU.ActiveCfg = Release|Any CPU
63+
{68FFA3D0-A818-4767-89CC-821FB6F8EAEC}.Release|Any CPU.Build.0 = Release|Any CPU
64+
{68FFA3D0-A818-4767-89CC-821FB6F8EAEC}.Release|x64.ActiveCfg = Release|Any CPU
65+
{68FFA3D0-A818-4767-89CC-821FB6F8EAEC}.Release|x64.Build.0 = Release|Any CPU
4666
EndGlobalSection
4767
GlobalSection(SolutionProperties) = preSolution
4868
HideSolutionNode = FALSE
4969
EndGlobalSection
5070
GlobalSection(NestedProjects) = preSolution
51-
{5A86174B-C49B-4C16-8CC6-2EA7C770A4F7} = {A3FA08DD-A8B7-4B65-9BBB-FE137FFF5098}
52-
{73E98D88-1A4F-4328-BCF7-8191AF788586} = {58888D0A-8521-4544-8CB7-A4151630EF77}
53-
{5D928947-78DD-412B-8A40-2EB5A72A6144} = {58888D0A-8521-4544-8CB7-A4151630EF77}
54-
{1472A4E8-91D5-4738-98E0-7BA2D1C8DE5D} = {58888D0A-8521-4544-8CB7-A4151630EF77}
55-
{677BDA3F-C9AE-4F35-A12C-C4F9257FF00E} = {58888D0A-8521-4544-8CB7-A4151630EF77}
71+
{A7836E64-C522-4236-8B31-0A360C2CA9ED} = {50C6D192-D2F6-4275-B5DB-00DC85A1FA88}
72+
{39070118-6DFD-401F-8396-E1036F0C598C} = {A7836E64-C522-4236-8B31-0A360C2CA9ED}
73+
{FF92F77A-4D79-42DB-BCCE-2C49B6CCE6B3} = {50C6D192-D2F6-4275-B5DB-00DC85A1FA88}
74+
{833EEC6A-F866-4052-ACE2-8D7E72E7862D} = {FF92F77A-4D79-42DB-BCCE-2C49B6CCE6B3}
75+
{4C0827DD-9212-485B-B3A7-D7969AFD9328} = {50C6D192-D2F6-4275-B5DB-00DC85A1FA88}
76+
{147DAD69-AAB4-47FF-805F-53B3E9299D02} = {4C0827DD-9212-485B-B3A7-D7969AFD9328}
77+
{1EA75CE9-074B-444F-A4F9-AA3C6607BB2B} = {50C6D192-D2F6-4275-B5DB-00DC85A1FA88}
78+
{68FFA3D0-A818-4767-89CC-821FB6F8EAEC} = {1EA75CE9-074B-444F-A4F9-AA3C6607BB2B}
5679
EndGlobalSection
5780
GlobalSection(ExtensibilityGlobals) = postSolution
5881
SolutionGuid = {98369941-33DD-450C-A410-B9A91C8CDE91}

Diff for: samples/csharp/end-to-end-apps/AnomalyDetection-Sales/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
| ML.NET version | API type | Status | App Type | Data type | Scenario | ML Task | Algorithms |
44
|----------------|-------------------|-------------------------------|-------------|-----------|---------------------|---------------------------|-----------------------------|
5-
| v1.3.1 | Dynamic API | Up-to-date | WinForms app | .csv files | Spike and Change Point Detection of Product Sales | Anomaly Detection | IID Spike Detection and IID Change point Detection |
5+
| v1.4 | Dynamic API | Up-to-date | WinForms app | .csv files | Spike and Change Point Detection of Product Sales | Anomaly Detection | IID Spike Detection and IID Change point Detection |
66

77
![Alt Text](./SpikeDetectionE2EApp/SpikeDetection.WinForms/images/productsales.gif)
88

Diff for: samples/csharp/end-to-end-apps/AnomalyDetection-Sales/SpikeDetectionE2EApp/SpikeDetection.WinForms/Form1.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public partial class Form1 : Form
1616
private string filePath = "";
1717
Tuple<string, string> tup = null;
1818
Dictionary<int, Tuple<string, string>> dict = new Dictionary<int, Tuple<string, string>>();
19-
private static string BaseModelsRelativePath = @"../../../MLModels";
19+
private static string BaseModelsRelativePath = @"../../../../MLModels";
2020
private static string ModelRelativePath1 = $"{BaseModelsRelativePath}/ProductSalesSpikeModel.zip";
2121
private static string ModelRelativePath2 = $"{BaseModelsRelativePath}/ProductSalesChangePointModel.zip";
2222

Diff for: samples/csharp/end-to-end-apps/AnomalyDetection-Sales/SpikeDetectionE2EApp/SpikeDetection.WinForms/SpikeDetection.WinForms.csproj

+9-9
Original file line numberDiff line numberDiff line change
@@ -118,31 +118,31 @@
118118
<Version>$(MicrosoftMLVersion)</Version>
119119
</PackageReference>
120120
<PackageReference Include="Newtonsoft.Json">
121-
<Version>10.0.3</Version>
121+
<Version>12.0.2</Version>
122122
</PackageReference>
123123
<PackageReference Include="System.Buffers">
124-
<Version>4.4.0</Version>
124+
<Version>4.5.0</Version>
125125
</PackageReference>
126126
<PackageReference Include="System.CodeDom">
127-
<Version>4.4.0</Version>
127+
<Version>4.6.0</Version>
128128
</PackageReference>
129129
<PackageReference Include="System.Collections.Immutable">
130-
<Version>1.5.0</Version>
130+
<Version>1.6.0</Version>
131131
</PackageReference>
132132
<PackageReference Include="System.Memory">
133-
<Version>4.5.1</Version>
133+
<Version>4.5.3</Version>
134134
</PackageReference>
135135
<PackageReference Include="System.Numerics.Vectors">
136-
<Version>4.4.0</Version>
136+
<Version>4.5.0</Version>
137137
</PackageReference>
138138
<PackageReference Include="System.Reflection.Emit.Lightweight">
139-
<Version>4.3.0</Version>
139+
<Version>4.6.0</Version>
140140
</PackageReference>
141141
<PackageReference Include="System.Runtime.CompilerServices.Unsafe">
142-
<Version>4.5.0</Version>
142+
<Version>4.6.0</Version>
143143
</PackageReference>
144144
<PackageReference Include="System.Threading.Tasks.Dataflow">
145-
<Version>4.8.0</Version>
145+
<Version>4.10.0</Version>
146146
</PackageReference>
147147
</ItemGroup>
148148
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

Diff for: samples/csharp/end-to-end-apps/DeepLearning_ImageClassification_TensorFlow/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
| ML.NET version | API type | Status | App Type | Data type | Scenario | ML Task | Algorithms |
44
|----------------|-------------------|-------------------------------|-------------|-----------|---------------------|---------------------------|-----------------------------|
5-
| v1.3.1 | Dynamic API | up-to-date | Console app | Images and text labels | Images classification | TensorFlow model | DeepLearning model |
5+
| v1.4 | Dynamic API | up-to-date | Console app | Images and text labels | Images classification | TensorFlow model | DeepLearning model |
66

77

88
## Problem

Diff for: samples/csharp/end-to-end-apps/DeepLearning_ImageClassification_TensorFlow/TensorFlowImageClassification/TensorFlowImageClassification.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
<ItemGroup>
1010
<PackageReference Include="Microsoft.AspNetCore.App" />
1111
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.2.0" PrivateAssets="All" />
12-
<PackageReference Include="Microsoft.Extensions.ML" Version="$(MicrosoftMLPreviewVersion)" />
12+
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.2.3" />
13+
<PackageReference Include="Microsoft.Extensions.ML" Version="$(MicrosoftMLVersion)" />
1314
<PackageReference Include="Microsoft.ML" Version="$(MicrosoftMLVersion)" />
1415
<PackageReference Include="Microsoft.ML.ImageAnalytics" Version="$(MicrosoftMLVersion)" />
1516
<PackageReference Include="Microsoft.ML.TensorFlow" Version="$(MicrosoftMLVersion)" />
16-
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.2.3" />
17+
<PackageReference Include="SciSharp.TensorFlow.Redist" Version="1.15.0" />
1718
</ItemGroup>
1819

19-
2020
<ItemGroup>
2121
<Folder Include="ImageHelpers\" />
2222
<Folder Include="ML\TensorFlowModel\" />

Diff for: samples/csharp/end-to-end-apps/Forecasting-Sales/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
| ML.NET version | API type | Status | App Type | Data type | Scenario | ML Task | Algorithms |
44
|----------------|-------------|------------|--------------------------------------|---------------------------|----------------|-------------------------|------------------------------------------------------|
5-
| v1.3.1 | Dynamic API | Up-to-date | ASP.NET Core web app and Console app | SQL Server and .csv files | Sales forecast | Regression, Time Series | FastTreeTweedie Regression, Single Spectrum Analysis |
5+
| v1.4 | Dynamic API | Up-to-date | ASP.NET Core web app and Console app | SQL Server and .csv files | Sales forecast | Regression, Time Series | FastTreeTweedie Regression, Single Spectrum Analysis |
66

77
eShopDashboardML is a web app with Sales Forecast predictions (per product) using [Microsoft Machine Learning .NET (ML.NET)](https://github.com/dotnet/machinelearning).
88

Diff for: samples/csharp/end-to-end-apps/Forecasting-Sales/src/eShopDashboard/Startup.cs

+7-2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
using Microsoft.Extensions.ML;
1313
using Microsoft.ML;
1414
using Serilog;
15+
using System;
1516

1617
namespace eShopDashboard
1718
{
@@ -29,11 +30,15 @@ public void ConfigureServices(IServiceCollection services)
2930
{
3031
services.AddDbContext<CatalogContext>(options =>
3132
options.UseSqlServer(
32-
Configuration.GetConnectionString("DefaultConnection")));
33+
Configuration.GetConnectionString("DefaultConnection"),
34+
opts => opts.CommandTimeout((int)TimeSpan.FromMinutes(20).TotalSeconds)
35+
));
3336

3437
services.AddDbContext<OrderingContext>(options =>
3538
options.UseSqlServer(
36-
Configuration.GetConnectionString("DefaultConnection")));
39+
Configuration.GetConnectionString("DefaultConnection"),
40+
opts => opts.CommandTimeout((int)TimeSpan.FromMinutes(20).TotalSeconds)
41+
));
3742

3843
services.AddScoped<IOrderingQueries, OrderingQueries>();
3944
services.AddScoped<ICatalogQueries, CatalogQueries>();

Diff for: samples/csharp/end-to-end-apps/Forecasting-Sales/src/eShopDashboard/appsettings.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"ConnectionStrings": {
3-
"DefaultConnection": "Server=(localdb)\\mssqllocaldb; Database=eShopDashboard; Trusted_Connection=True; MultipleActiveResultSets=true"
3+
"DefaultConnection": "Server=(localdb)\\mssqllocaldb; Database=eShopDashboard; Trusted_Connection=True; MultipleActiveResultSets=true; Connection Timeout=60"
44
},
55
"CatalogSettings": {
66
"AzurePicBasUrl": "",

Diff for: samples/csharp/end-to-end-apps/Forecasting-Sales/src/eShopDashboard/eShopDashboard.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<ItemGroup>
1212
<PackageReference Include="Dapper.StrongName" Version="1.50.5" />
1313
<PackageReference Include="Microsoft.AspNetCore.App" />
14+
<PackageReference Include="Microsoft.Extensions.ML" Version="$(MicrosoftMLVersion)" />
1415
<PackageReference Include="Microsoft.ML" Version="$(MicrosoftMLVersion)" />
1516
<PackageReference Include="Microsoft.ML.FastTree" Version="$(MicrosoftMLVersion)" />
1617
<PackageReference Include="Microsoft.ML.TimeSeries" Version="$(MicrosoftMLVersion)" />
@@ -21,7 +22,6 @@
2122
<PackageReference Include="Serilog.Sinks.Seq" Version="4.0.0" />
2223
<PackageReference Include="Swashbuckle.AspNetCore" Version="4.0.1" />
2324
<PackageReference Include="TinyCsvParser" Version="2.0.0" />
24-
<PackageReference Include="Microsoft.Extensions.ML" Version="$(MicrosoftMLPreviewVersion)" />
2525
</ItemGroup>
2626

2727
<ItemGroup>

0 commit comments

Comments
 (0)