Skip to content

Commit

Permalink
RunSpecific in test
Browse files Browse the repository at this point in the history
  • Loading branch information
antoniovs1029 committed Dec 17, 2020
1 parent f9f328d commit fed12b2
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions test/Microsoft.ML.AutoML.Tests/AutoFitTests.cs
Expand Up @@ -442,9 +442,11 @@ public void AutoFitWithPresplittedData()

}

[LightGBMFact]
public void AutoFitMaxExperimentTimeTest()
[Theory, IterationData(10)]
[TestCategory("RunSpecificTest")]
public void AutoFitMaxExperimentTimeTest(int iteration)
{
Console.WriteLine(iteration);
// A single binary classification experiment takes less than 5 seconds.
// System.OperationCanceledException is thrown when ongoing experiment
// is canceled and at least one model has been generated.
Expand All @@ -455,8 +457,12 @@ public void AutoFitMaxExperimentTimeTest()
var columnInference = context.Auto().InferColumns(dataPath, DatasetUtil.UciAdultLabel);
var textLoader = context.Data.CreateTextLoader(columnInference.TextLoaderOptions);
var trainData = textLoader.Load(dataPath);

var experSettings = new BinaryExperimentSettings { MaxExperimentTimeInSeconds = 60};
experSettings.Trainers.Remove(BinaryClassificationTrainer.LightGbm);

var experiment = context.Auto()
.CreateBinaryClassificationExperiment(15)
.CreateBinaryClassificationExperiment(experSettings)
.Execute(trainData, new ColumnInformation() { LabelColumnName = DatasetUtil.UciAdultLabel });

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

0 comments on commit fed12b2

Please sign in to comment.