Skip to content

Commit fed12b2

Browse files
committed
RunSpecific in test
1 parent f9f328d commit fed12b2

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

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

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,11 @@ public void AutoFitWithPresplittedData()
442442

443443
}
444444

445-
[LightGBMFact]
446-
public void AutoFitMaxExperimentTimeTest()
445+
[Theory, IterationData(10)]
446+
[TestCategory("RunSpecificTest")]
447+
public void AutoFitMaxExperimentTimeTest(int iteration)
447448
{
449+
Console.WriteLine(iteration);
448450
// A single binary classification experiment takes less than 5 seconds.
449451
// System.OperationCanceledException is thrown when ongoing experiment
450452
// is canceled and at least one model has been generated.
@@ -455,8 +457,12 @@ public void AutoFitMaxExperimentTimeTest()
455457
var columnInference = context.Auto().InferColumns(dataPath, DatasetUtil.UciAdultLabel);
456458
var textLoader = context.Data.CreateTextLoader(columnInference.TextLoaderOptions);
457459
var trainData = textLoader.Load(dataPath);
460+
461+
var experSettings = new BinaryExperimentSettings { MaxExperimentTimeInSeconds = 60};
462+
experSettings.Trainers.Remove(BinaryClassificationTrainer.LightGbm);
463+
458464
var experiment = context.Auto()
459-
.CreateBinaryClassificationExperiment(15)
465+
.CreateBinaryClassificationExperiment(experSettings)
460466
.Execute(trainData, new ColumnInformation() { LabelColumnName = DatasetUtil.UciAdultLabel });
461467

462468
// Ensure the (last) model that was training when maximum experiment time was reached has been stopped,

0 commit comments

Comments
 (0)