Skip to content

Commit fdb4d7c

Browse files
committed
Eric comments
1 parent 4aabd31 commit fdb4d7c

File tree

20 files changed

+46
-88
lines changed

20 files changed

+46
-88
lines changed

src/Microsoft.ML.Api/TypedCursor.cs

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -528,8 +528,6 @@ public ICursor GetRootCursor()
528528
/// </summary>
529529
public static class CursoringUtils
530530
{
531-
private const string NeedEnvObsoleteMessage = "This method is obsolete. Please use the overload that takes an additional 'env' argument. An environment can be created via new LocalEnvironment().";
532-
533531
/// <summary>
534532
/// Generate a strongly-typed cursorable wrapper of the <see cref="IDataView"/>.
535533
/// </summary>
@@ -550,24 +548,6 @@ public static ICursorable<TRow> AsCursorable<TRow>(this IDataView data, IHostEnv
550548
return TypedCursorable<TRow>.Create(env, data, ignoreMissingColumns, schemaDefinition);
551549
}
552550

553-
/// <summary>
554-
/// Generate a strongly-typed cursorable wrapper of the <see cref="IDataView"/>.
555-
/// </summary>
556-
/// <typeparam name="TRow">The user-defined row type.</typeparam>
557-
/// <param name="data">The underlying data view.</param>
558-
/// <param name="ignoreMissingColumns">Whether to ignore the case when a requested column is not present in the data view.</param>
559-
/// <param name="schemaDefinition">Optional user-provided schema definition. If it is not present, the schema is inferred from the definition of T.</param>
560-
/// <returns>The cursorable wrapper of <paramref name="data"/>.</returns>
561-
[Obsolete(NeedEnvObsoleteMessage)]
562-
public static ICursorable<TRow> AsCursorable<TRow>(this IDataView data, bool ignoreMissingColumns = false,
563-
SchemaDefinition schemaDefinition = null)
564-
where TRow : class, new()
565-
{
566-
// REVIEW: Take this as a parameter, or else make it a method on the context itself.
567-
var ml = new MLContext();
568-
return data.AsCursorable<TRow>(ml, ignoreMissingColumns, schemaDefinition);
569-
}
570-
571551
/// <summary>
572552
/// Convert an <see cref="IDataView"/> into a strongly-typed <see cref="IEnumerable{TRow}"/>.
573553
/// </summary>
@@ -589,24 +569,5 @@ public static IEnumerable<TRow> AsEnumerable<TRow>(this IDataView data, IHostEnv
589569
var engine = new PipeEngine<TRow>(env, data, ignoreMissingColumns, schemaDefinition);
590570
return engine.RunPipe(reuseRowObject);
591571
}
592-
593-
/// <summary>
594-
/// Convert an <see cref="IDataView"/> into a strongly-typed <see cref="IEnumerable{TRow}"/>.
595-
/// </summary>
596-
/// <typeparam name="TRow">The user-defined row type.</typeparam>
597-
/// <param name="data">The underlying data view.</param>
598-
/// <param name="reuseRowObject">Whether to return the same object on every row, or allocate a new one per row.</param>
599-
/// <param name="ignoreMissingColumns">Whether to ignore the case when a requested column is not present in the data view.</param>
600-
/// <param name="schemaDefinition">Optional user-provided schema definition. If it is not present, the schema is inferred from the definition of T.</param>
601-
/// <returns>The <see cref="IEnumerable{TRow}"/> that holds the data in <paramref name="data"/>. It can be enumerated multiple times.</returns>
602-
[Obsolete(NeedEnvObsoleteMessage)]
603-
public static IEnumerable<TRow> AsEnumerable<TRow>(this IDataView data, bool reuseRowObject,
604-
bool ignoreMissingColumns = false, SchemaDefinition schemaDefinition = null)
605-
where TRow : class, new()
606-
{
607-
// REVIEW: Take this as a parameter, or else make it a method on the context itself.
608-
var ml = new MLContext();
609-
return data.AsEnumerable<TRow>(ml, reuseRowObject, ignoreMissingColumns, schemaDefinition);
610-
}
611572
}
612573
}

src/Microsoft.ML.Core/ComponentModel/AssemblyLoadingUtils.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
namespace Microsoft.ML.Runtime
1212
{
13+
[Obsolete("The usage for this is intended for the internal command line utilities and is not intended for anything related to the API. " +
14+
"Please consider another way of doing whatever it is you're attempting to accomplish.")]
1315
[BestFriend]
1416
internal static class AssemblyLoadingUtils
1517
{

src/Microsoft.ML.Core/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.InferenceTesting" + PublicKey.TestValue)]
1313
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.StaticPipelineTesting" + PublicKey.TestValue)]
1414
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.OnnxTransformTest" + PublicKey.TestValue)]
15-
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.BenchMarks" + PublicKey.TestValue)]
1615

1716
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Legacy" + PublicKey.Value)]
1817
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Maml" + PublicKey.Value)]

src/Microsoft.ML.Data/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Tests" + PublicKey.TestValue)]
1010
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.InferenceTesting" + PublicKey.TestValue)]
1111
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.OnnxTransformTest" + PublicKey.TestValue)]
12-
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.BenchMarks" + PublicKey.TestValue)]
1312

1413
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Legacy" + PublicKey.Value)]
1514
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Maml" + PublicKey.Value)]

src/Microsoft.ML.Ensemble/OutputCombiners/BaseScalarStacking.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
namespace Microsoft.ML.Runtime.Ensemble.OutputCombiners
1111
{
12-
public abstract class BaseScalarStacking : BaseStacking<Single>
12+
internal abstract class BaseScalarStacking : BaseStacking<Single>
1313
{
1414
internal BaseScalarStacking(IHostEnvironment env, string name, ArgumentsBase args)
1515
: base(env, name, args)

src/Microsoft.ML.Ensemble/OutputCombiners/BaseStacking.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
namespace Microsoft.ML.Runtime.Ensemble.OutputCombiners
1717
{
1818
using ColumnRole = RoleMappedSchema.ColumnRole;
19-
public abstract class BaseStacking<TOutput> : IStackingTrainer<TOutput>
19+
internal abstract class BaseStacking<TOutput> : IStackingTrainer<TOutput>
2020
{
2121
public abstract class ArgumentsBase
2222
{

src/Microsoft.ML.Ensemble/OutputCombiners/MultiStacking.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ private static VersionInfo GetVersionInfo()
4141
[TlcModule.Component(Name = LoadName, FriendlyName = Stacking.UserName)]
4242
public sealed class Arguments : ArgumentsBase, ISupportMulticlassOutputCombinerFactory
4343
{
44-
// TODO: If we make this public again it should be an *estimator* of this type of predictor, rather than the (deprecated) ITrainer.
44+
// REVIEW: If we make this public again it should be an *estimator* of this type of predictor, rather than the (deprecated) ITrainer.
4545
[Argument(ArgumentType.Multiple, HelpText = "Base predictor for meta learning", ShortName = "bp", SortOrder = 50,
4646
Visibility = ArgumentAttribute.VisibilityType.CmdLineOnly, SignatureType = typeof(SignatureMultiClassClassifierTrainer))]
4747
[TGUI(Label = "Base predictor")]

src/Microsoft.ML.Ensemble/OutputCombiners/RegressionStacking.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ private static VersionInfo GetVersionInfo()
3939
[TlcModule.Component(Name = LoadName, FriendlyName = Stacking.UserName)]
4040
public sealed class Arguments : ArgumentsBase, ISupportRegressionOutputCombinerFactory
4141
{
42-
// TODO: If we make this public again it should be an *estimator* of this type of predictor, rather than the (deprecated) ITrainer.
42+
// REVIEW: If we make this public again it should be an *estimator* of this type of predictor, rather than the (deprecated) ITrainer.
4343
[Argument(ArgumentType.Multiple, HelpText = "Base predictor for meta learning", ShortName = "bp", SortOrder = 50,
4444
Visibility = ArgumentAttribute.VisibilityType.CmdLineOnly, SignatureType = typeof(SignatureRegressorTrainer))]
4545
[TGUI(Label = "Base predictor")]

src/Microsoft.ML.Ensemble/OutputCombiners/Stacking.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ private static VersionInfo GetVersionInfo()
3737
[TlcModule.Component(Name = LoadName, FriendlyName = UserName)]
3838
public sealed class Arguments : ArgumentsBase, ISupportBinaryOutputCombinerFactory
3939
{
40-
// TODO: If we make this public again it should be an *estimator* of this type of predictor, rather than the (deprecated) ITrainer.
40+
// REVIEW: If we make this public again it should be an *estimator* of this type of predictor, rather than the (deprecated) ITrainer.
4141
[Argument(ArgumentType.Multiple, HelpText = "Base predictor for meta learning", ShortName = "bp", SortOrder = 50,
4242
Visibility = ArgumentAttribute.VisibilityType.CmdLineOnly, SignatureType = typeof(SignatureBinaryClassifierTrainer))]
4343
[TGUI(Label = "Base predictor")]

src/Microsoft.ML.Ensemble/Trainer/Binary/EnsembleTrainer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public sealed class Arguments : ArgumentsBase
4848
[TGUI(Label = "Output combiner", Description = "Output combiner type")]
4949
public ISupportBinaryOutputCombinerFactory OutputCombiner = new MedianFactory();
5050

51-
// TODO: If we make this public again it should be an *estimator* of this type of predictor, rather than the (deprecated) ITrainer.
51+
// REVIEW: If we make this public again it should be an *estimator* of this type of predictor, rather than the (deprecated) ITrainer.
5252
[Argument(ArgumentType.Multiple, HelpText = "Base predictor type", ShortName = "bp,basePredictorTypes", SortOrder = 1, Visibility = ArgumentAttribute.VisibilityType.CmdLineOnly, SignatureType = typeof(SignatureBinaryClassifierTrainer))]
5353
public IComponentFactory<ITrainer<TScalarPredictor>>[] BasePredictors;
5454

0 commit comments

Comments
 (0)