diff --git a/src/Microsoft.ML.Sweeper/AsyncSweeper.cs b/src/Microsoft.ML.Sweeper/AsyncSweeper.cs index f13ad02531..9edf1393e2 100644 --- a/src/Microsoft.ML.Sweeper/AsyncSweeper.cs +++ b/src/Microsoft.ML.Sweeper/AsyncSweeper.cs @@ -63,7 +63,7 @@ public interface IAsyncSweeper /// Expose existing s as with no synchronization over the past runs. /// Nelder-Mead requires synchronization so is not compatible with SimpleAsyncSweeperBase. /// - public class SimpleAsyncSweeper : IAsyncSweeper, IDisposable + public partial class SimpleAsyncSweeper : IAsyncSweeper, IDisposable { private readonly List _results; private readonly object _lock; @@ -85,6 +85,16 @@ private SimpleAsyncSweeper(ISweeper baseSweeper) _results = new List(); } + public SimpleAsyncSweeper(IHostEnvironment env, UniformRandomSweeper.ArgumentsBase args) + : this(new UniformRandomSweeper(env, args)) + { + } + + public SimpleAsyncSweeper(IHostEnvironment env, RandomGridSweeper.Arguments args) + : this(new UniformRandomSweeper(env, args)) + { + } + public void Update(int id, IRunResult result) { Contracts.CheckParam(0 <= id && id < _numGenerated, nameof(id), "Invalid run id");