Skip to content

Commit 370e9b7

Browse files
committed
Adressed reviews
1 parent 1985cce commit 370e9b7

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

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

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,23 @@ private void RelayCurrentContextLogsToLogger(object sender, LoggingEventArgs e)
8989
{
9090
// Relay logs that are generated by the current MLContext to the Experiment class's
9191
// _logger.
92-
_logger.Info(e.Message);
92+
switch (e.Kind)
93+
{
94+
case ChannelMessageKind.Trace:
95+
_logger.Trace(e.Message);
96+
break;
97+
case ChannelMessageKind.Info:
98+
_logger.Info(e.Message);
99+
break;
100+
case ChannelMessageKind.Warning:
101+
_logger.Warning(e.Message);
102+
break;
103+
case ChannelMessageKind.Error:
104+
_logger.Error(e.Message);
105+
break;
106+
default:
107+
throw new NotImplementedException($"{nameof(ChannelMessageKind)}.{e.Kind} is not yet implemented.");
108+
}
93109
}
94110

95111
public IList<TRunDetail> Execute()

test/Microsoft.ML.AutoML.Tests/AutoFitTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ private void MlContextLog(object sender, LoggingEventArgs e)
3838

3939
[TensorFlowFact]
4040
public void AutoFitContextLogTest()
41-
{
41+
{
4242
// This test confirms that logs produced from contexts made during AutoML experiment
4343
// runs are correctly relayed to the main Experiment MLContext.
4444
_markerAutoFitContextLogTest = false;
@@ -115,7 +115,7 @@ public void AutoFitMultiTest(bool useNumberOfCVFolds)
115115
Assert.Equal(NumberDataViewType.Single, scoredData.Schema[DefaultColumnNames.PredictedLabel].Type);
116116
}
117117
}
118-
118+
119119
[TensorFlowFact]
120120
//Skipping test temporarily. This test will be re-enabled once the cause of failures has been determined
121121
[Trait("Category", "SkipInCI")]

0 commit comments

Comments
 (0)