Skip to content

Commit 0435f6b

Browse files
MaherJendoubiantoniovs1029
authored andcommitted
Contributing: Fix typos (#4633)
* Contributing: Fix typos
1 parent e38647c commit 0435f6b

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

src/Microsoft.ML.AutoML/API/Pipeline.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,15 @@ internal class PipelineScore
9696
/// This setting is true if the pipeline run succeeded and ran to completion.
9797
/// Else, it is false if some exception was thrown before the run could complete.
9898
/// </summary>
99-
public readonly bool RunSucceded;
99+
public readonly bool RunSucceeded;
100100

101101
internal readonly Pipeline Pipeline;
102102

103103
internal PipelineScore(Pipeline pipeline, double score, bool runSucceeded)
104104
{
105105
Pipeline = pipeline;
106106
Score = score;
107-
RunSucceded = runSucceeded;
107+
RunSucceeded = runSucceeded;
108108
}
109109
}
110110
}

src/Microsoft.ML.AutoML/Experiment/Experiment.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@ public IList<TRunDetail> Execute()
6161
var iterationStopwatch = Stopwatch.StartNew();
6262

6363
// get next pipeline
64-
var getPiplelineStopwatch = Stopwatch.StartNew();
64+
var getPipelineStopwatch = Stopwatch.StartNew();
6565
var pipeline = PipelineSuggester.GetNextInferredPipeline(_context, _history, _datasetColumnInfo, _task,
6666
_optimizingMetricInfo.IsMaximizing, _experimentSettings.CacheBeforeTrainer, _trainerWhitelist);
6767

68-
var pipelineInferenceTimeInSeconds = getPiplelineStopwatch.Elapsed.TotalSeconds;
68+
var pipelineInferenceTimeInSeconds = getPipelineStopwatch.Elapsed.TotalSeconds;
6969

7070
// break if no candidates returned, means no valid pipeline available
7171
if (pipeline == null)
@@ -82,7 +82,7 @@ public IList<TRunDetail> Execute()
8282
WriteIterationLog(pipeline, suggestedPipelineRunDetail, iterationStopwatch);
8383

8484
runDetail.RuntimeInSeconds = iterationStopwatch.Elapsed.TotalSeconds;
85-
runDetail.PipelineInferenceTimeInSeconds = getPiplelineStopwatch.Elapsed.TotalSeconds;
85+
runDetail.PipelineInferenceTimeInSeconds = getPipelineStopwatch.Elapsed.TotalSeconds;
8686

8787
ReportProgress(runDetail);
8888
iterationResults.Add(runDetail);
@@ -94,7 +94,7 @@ public IList<TRunDetail> Execute()
9494
}
9595

9696
// If after third run, all runs have failed so far, throw exception
97-
if (_history.Count() == 3 && _history.All(r => !r.RunSucceded))
97+
if (_history.Count() == 3 && _history.All(r => !r.RunSucceeded))
9898
{
9999
throw new InvalidOperationException($"Training failed with the exception: {_history.Last().Exception}");
100100
}

src/Microsoft.ML.AutoML/Experiment/SuggestedPipelineRunDetails/SuggestedPipelineRunDetail.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace Microsoft.ML.AutoML
99
internal class SuggestedPipelineRunDetail
1010
{
1111
public readonly SuggestedPipeline Pipeline;
12-
public readonly bool RunSucceded;
12+
public readonly bool RunSucceeded;
1313
public readonly double Score;
1414

1515
public Exception Exception { get; set; }
@@ -18,12 +18,12 @@ public SuggestedPipelineRunDetail(SuggestedPipeline pipeline, double score, bool
1818
{
1919
Pipeline = pipeline;
2020
Score = score;
21-
RunSucceded = runSucceeded;
21+
RunSucceeded = runSucceeded;
2222
}
2323

2424
public static SuggestedPipelineRunDetail FromPipelineRunResult(MLContext context, PipelineScore pipelineRunResult)
2525
{
26-
return new SuggestedPipelineRunDetail(SuggestedPipeline.FromPipeline(context, pipelineRunResult.Pipeline), pipelineRunResult.Score, pipelineRunResult.RunSucceded);
26+
return new SuggestedPipelineRunDetail(SuggestedPipeline.FromPipeline(context, pipelineRunResult.Pipeline), pipelineRunResult.Score, pipelineRunResult.RunSucceeded);
2727
}
2828

2929
public IRunResult ToRunResult(bool isMetricMaximizing)

src/Microsoft.ML.AutoML/PipelineSuggesters/PipelineSuggester.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,11 @@ private static IEnumerable<SuggestedTrainer> GetTopTrainers(IEnumerable<Suggeste
9292
bool isMaximizingMetric)
9393
{
9494
// narrow history to first stage runs that succeeded
95-
history = history.Take(availableTrainers.Count()).Where(x => x.RunSucceded);
95+
history = history.Take(availableTrainers.Count()).Where(x => x.RunSucceeded);
9696

9797
history = history.GroupBy(r => r.Pipeline.Trainer.TrainerName).Select(g => g.First());
9898
IEnumerable<SuggestedPipelineRunDetail> sortedHistory = history.OrderBy(r => r.Score);
99-
if(isMaximizingMetric)
99+
if (isMaximizingMetric)
100100
{
101101
sortedHistory = sortedHistory.Reverse();
102102
}
@@ -198,11 +198,11 @@ private static bool SampleHyperparameters(MLContext context, SuggestedTrainer tr
198198
});
199199

200200
IEnumerable<SuggestedPipelineRunDetail> historyToUse = history
201-
.Where(r => r.RunSucceded && r.Pipeline.Trainer.TrainerName == trainer.TrainerName && r.Pipeline.Trainer.HyperParamSet != null && r.Pipeline.Trainer.HyperParamSet.Any());
201+
.Where(r => r.RunSucceeded && r.Pipeline.Trainer.TrainerName == trainer.TrainerName && r.Pipeline.Trainer.HyperParamSet != null && r.Pipeline.Trainer.HyperParamSet.Any());
202202

203203
// get new set of hyperparameter values
204204
var proposedParamSet = sweeper.ProposeSweeps(1, historyToUse.Select(h => h.ToRunResult(isMaximizingMetric))).First();
205-
if(!proposedParamSet.Any())
205+
if (!proposedParamSet.Any())
206206
{
207207
return false;
208208
}

0 commit comments

Comments
 (0)