public void SweepablePipeline_summary_should_work() { var sweepablePipeline = new SweepablePipeline() .Append(new MockTransformer()) .Append(new MockEstimatorBuilder("mockEstimator")); sweepablePipeline.ToString().Should().Be("SweepablePipeline([MockTransformer]=>[mockEstimator])"); }
public void SweepablePipeline_should_create_SingleEstimatorSweepablePipeline() { var sweepablePipeline = new SweepablePipeline() .Append(new MockEstimatorBuilder("estimator1_1")) .Append(new MockEstimatorBuilder("estimator2_1"), new MockEstimatorBuilder("estimator2_2")) .Append(new MockEstimatorBuilder("estimator3_1"), new MockEstimatorBuilder("estimator3_2"), new MockEstimatorBuilder("estimator3_3")); var res = new StringBuilder(); res.AppendLine(sweepablePipeline.ToString()); var sweeper = new GridSearchSweeper(); foreach (var param in sweeper.ProposeSweeps(sweepablePipeline, 100)) { var singleEstimatorPipeline = sweepablePipeline.BuildFromParameters(param); res.AppendLine(singleEstimatorPipeline.ToString()); } Approvals.Verify(res.ToString()); }