Skip to content

Commit a9f07a9

Browse files
committed
Added AutoMLExperimentExtension to enable AutoML methods on gridsearch
1 parent 426385f commit a9f07a9

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
// See the LICENSE file in the project root for more information.
4+
5+
using System;
6+
using System.Collections.Generic;
7+
using System.Text;
8+
using Microsoft.Extensions.DependencyInjection;
9+
using Microsoft.ML.AutoML;
10+
using Microsoft.ML.Fairlearn.reductions;
11+
12+
namespace Microsoft.ML.Fairlearn.AutoML
13+
{
14+
public static class AutoMLExperimentExtension
15+
{
16+
public static AutoMLExperiment SetBinaryClassificationMoment(this AutoMLExperiment experiment, ClassificationMoment moment)
17+
{
18+
experiment.ServiceCollection.AddSingleton(moment);
19+
experiment.SetTunerFactory<CostFrugalWithLambdaTunerFactory>();
20+
21+
return experiment;
22+
}
23+
}
24+
}

0 commit comments

Comments
 (0)