Skip to content

Commit

Permalink
Remove never executed codes (#5808)
Browse files Browse the repository at this point in the history
* Remove never executed codes

* Update MultiFileSource.cs
  • Loading branch information
feiyun0112 authored Jun 8, 2021
1 parent 1768f36 commit 6114b4f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/Microsoft.Data.Analysis/GroupBy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public GroupBy(DataFrame dataFrame, int groupByColumnIndex, IDictionary<TKey, IC
throw new ArgumentException(nameof(groupByColumnIndex));
_groupByColumnIndex = groupByColumnIndex;
_keyToRowIndicesMap = keyToRowIndices ?? throw new ArgumentException(nameof(keyToRowIndices));
_dataFrame = dataFrame ?? throw new ArgumentException(nameof(dataFrame));
_dataFrame = dataFrame;
}

private delegate void ColumnDelegate(int columnIndex, long rowIndex, ICollection<long> rows, TKey key, bool firstGroup);
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.Data.Analysis/StringDataFrameColumn.cs
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ private StringDataFrameColumn Clone(PrimitiveDataFrameColumn<long> mapIndices =
{
if (mapIndices is null)
{
StringDataFrameColumn ret = new StringDataFrameColumn(Name, mapIndices is null ? Length : mapIndices.Length);
StringDataFrameColumn ret = new StringDataFrameColumn(Name, Length);
for (long i = 0; i < Length; i++)
{
ret[i] = this[i];
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.ML.Data/Scorers/BinaryClassifierScorer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ private void GetPredictedLabelCore(float score, ref bool value)

private void GetPredictedLabelCoreAsKey(float score, ref uint value)
{
value = (uint)(score > _threshold ? 2 : score <= _threshold ? 1 : 0);
value = (uint)(score > _threshold ? 2 : 1);
}

private protected override JToken PredictedLabelPfa(string[] mapperOutputs)
Expand Down
12 changes: 1 addition & 11 deletions src/Microsoft.ML.Maml/MAML.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,18 +82,8 @@ private static int MainWithProgress(string args)

private static ConsoleEnvironment CreateEnvironment()
{
string sensitivityString = null;
MessageSensitivity sensitivity = MessageSensitivity.All;
if (!string.IsNullOrWhiteSpace(sensitivityString))
{
// Cannot use host or channels since the environment isn't even
// created yet.
if (!Enum.TryParse(sensitivityString, out sensitivity))
{
Console.Error.WriteLine("Cannot parse '{0}' as {1}", sensitivityString, nameof(MessageSensitivity));
sensitivity = MessageSensitivity.All;
}
}

return new ConsoleEnvironment(sensitivity: sensitivity);
}

Expand Down

0 comments on commit 6114b4f

Please sign in to comment.