Skip to content

Commit 08c9001

Browse files
committed
Minor changes
1 parent 007869c commit 08c9001

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

src/Microsoft.ML.Core/Data/RoleMappedSchema.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ namespace Microsoft.ML.Runtime.Data
1111
/// <summary>
1212
/// This contains information about a column in an <see cref="IDataView"/>. It is essentially a convenience cache
1313
/// containing the name, column index, and column type for the column. The intended usage is that users of <see cref="RoleMappedSchema"/>
14-
/// to get the column index and type associated with
14+
/// will have a convenient method of getting the index and type without having to separately query it through the <see cref="ISchema"/>,
15+
/// since practically the first thing a consumer of a <see cref="RoleMappedSchema"/> will want to do once they get a mappping is
1516
/// </summary>
1617
public sealed class ColumnInfo
1718
{

src/Microsoft.ML.Data/Commands/TrainCommand.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -468,16 +468,11 @@ private static List<IDataTransform> BacktrackPipe(IDataView dataPipe, out IDataV
468468
Contracts.AssertValue(dataPipe);
469469

470470
var transforms = new List<IDataTransform>();
471-
while (true)
471+
while (dataPipe is IDataTransform xf)
472472
{
473473
// REVIEW: a malicious user could construct a loop in the Source chain, that would
474474
// cause this method to iterate forever (and throw something when the list overflows). There's
475475
// no way to insulate from ALL malicious behavior.
476-
477-
var xf = dataPipe as IDataTransform;
478-
if (xf == null)
479-
break;
480-
481476
transforms.Add(xf);
482477
dataPipe = xf.Source;
483478
Contracts.AssertValue(dataPipe);

0 commit comments

Comments
 (0)