Skip to content

Commit 95b7280

Browse files
committed
Debug runSpecific
1 parent 4f6b119 commit 95b7280

File tree

2 files changed

+18
-9
lines changed

2 files changed

+18
-9
lines changed

.vsts-dotnet-ci.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
_config_short: RI
2828
_includeBenchmarkData: true
2929
_targetFramework: netcoreapp3.1
30-
innerLoop: true
30+
runSpecific: true
3131
pool:
3232
name: Hosted Ubuntu 1604
3333

@@ -36,15 +36,15 @@ jobs:
3636
name: Ubuntu_x64_NetCoreApp21
3737
buildScript: ./build.sh
3838
container: UbuntuContainer
39-
innerLoop: true
39+
runSpecific: true
4040
pool:
4141
name: Hosted Ubuntu 1604
4242

4343
- template: /build/ci/job-template.yml
4444
parameters:
4545
name: MacOS_x64_NetCoreApp21
4646
buildScript: ./build.sh
47-
innerLoop: true
47+
runSpecific: true
4848
pool:
4949
name: Hosted macOS
5050

@@ -63,7 +63,7 @@ jobs:
6363
_config_short: RI
6464
_includeBenchmarkData: true
6565
_targetFramework: netcoreapp3.1
66-
innerLoop: true
66+
runSpecific: true
6767
vsTestConfiguration: "/Framework:.NETCoreApp,Version=v3.0"
6868
pool:
6969
name: Hosted VS2017
@@ -72,7 +72,7 @@ jobs:
7272
parameters:
7373
name: Windows_x64_NetCoreApp21
7474
buildScript: build.cmd
75-
innerLoop: true
75+
runSpecific: true
7676
vsTestConfiguration: "/Framework:.NETCoreApp,Version=v2.1"
7777
pool:
7878
name: Hosted VS2017
@@ -92,7 +92,7 @@ jobs:
9292
_config_short: RFX
9393
_includeBenchmarkData: false
9494
_targetFramework: win-x64
95-
innerLoop: true
95+
runSpecific: true
9696
vsTestConfiguration: "/Framework:.NETCoreApp,Version=v4.0"
9797
pool:
9898
name: Hosted VS2017
@@ -102,7 +102,7 @@ jobs:
102102
name: Windows_x86_NetCoreApp21
103103
architecture: x86
104104
buildScript: build.cmd
105-
innerLoop: true
105+
runSpecific: true
106106
vsTestConfiguration: "/Framework:.NETCoreApp,Version=v2.1"
107107
pool:
108108
name: Hosted VS2017

test/Microsoft.ML.AutoML.Tests/AutoFitTests.cs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5+
using System;
56
using System.Globalization;
67
using System.Linq;
78
using System.Threading;
@@ -105,6 +106,7 @@ private void Context_Log(object sender, LoggingEventArgs e)
105106
}
106107

107108
[Theory]
109+
[Trait("Category", "RunSpecificTest")]
108110
[InlineData("en-US")]
109111
[InlineData("ar-SA")]
110112
[InlineData("pl-PL")]
@@ -113,7 +115,7 @@ public void AutoFitRegressionTest(string culture)
113115
var originalCulture = Thread.CurrentThread.CurrentCulture;
114116
Thread.CurrentThread.CurrentCulture = new CultureInfo(culture);
115117

116-
uint experimentTime = 0;
118+
uint experimentTime = 30;
117119

118120
if (culture == "ar-SA")
119121
{
@@ -132,6 +134,7 @@ public void AutoFitRegressionTest(string culture)
132134
}
133135

134136
var context = new MLContext(1);
137+
context.Log += (sender, e) => Console.WriteLine(e); //MYTODO: added for debugging purposes
135138
var dataPath = DatasetUtil.GetMlNetGeneratedRegressionDataset();
136139
var columnInference = context.Auto().InferColumns(dataPath, DatasetUtil.MlNetGeneratedRegressionLabel);
137140
var textLoader = context.Data.CreateTextLoader(columnInference.TextLoaderOptions);
@@ -143,8 +146,14 @@ public void AutoFitRegressionTest(string culture)
143146
.Execute(trainData, validationData,
144147
new ColumnInformation() { LabelColumnName = DatasetUtil.MlNetGeneratedRegressionLabel });
145148

149+
//var trainers = Enum.GetValues(typeof(RegressionTrainer)).OfType<RegressionTrainer>().ToList();
150+
146151
//MYTODO: Only adding this for debugging purposes on the CI:
147-
System.Console.WriteLine($"culture:{culture} - Count: {result.RunDetails.Count()} - Null ValidationMetrics Count:{result.RunDetails.Where(rd => rd.ValidationMetrics == null).Count()}");
152+
var nullValidationMetrics = result.RunDetails.Where(rd => rd.ValidationMetrics == null).ToArray();
153+
System.Console.WriteLine($"culture:{culture} - Count: {result.RunDetails.Count()} - Null ValidationMetrics Count:{nullValidationMetrics.Count()}");
154+
if (nullValidationMetrics.Count() > 0)
155+
for (var i = 0; i < nullValidationMetrics.Count(); i++)
156+
Console.WriteLine($"nullValidationMetrics[{i}].TrainerName={nullValidationMetrics[i].TrainerName}");
148157

149158
Assert.True(result.RunDetails.Max(i => i.ValidationMetrics.RSquared > 0.9));
150159

0 commit comments

Comments
 (0)