Skip to content

Commit 4eb9e45

Browse files
authored
Microsoft.ML.Internal.Internallearn should be hidden/moved/renamed (#2740)
* Microsoft.ML.Internal.Internallearn should be hidden/moved/renamed * PR feedback. * Add EarlyStoppingCriteria.cs. * merge conflicts.
1 parent 2a1f2bb commit 4eb9e45

File tree

23 files changed

+26
-20
lines changed

23 files changed

+26
-20
lines changed

src/Microsoft.ML.Data/Dirty/ModelParametersBase.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@
33
// See the LICENSE file in the project root for more information.
44

55
using System;
6-
using Microsoft.ML.Model;
76

8-
namespace Microsoft.ML.Internal.Internallearn
7+
namespace Microsoft.ML.Model
98
{
109
/// <summary>
1110
/// A base class for predictors producing <typeparamref name="TOutput"/>.

src/Microsoft.ML.Data/Dirty/PredictorInterfaces.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
using Microsoft.ML.Calibrators;
1010
using Microsoft.ML.Data;
1111

12-
namespace Microsoft.ML.Internal.Internallearn
12+
namespace Microsoft.ML.Model
1313
{
1414
/// <summary>
1515
/// A generic interface for models that can average parameters from multiple instance of self

src/Microsoft.ML.Data/EntryPoints/SummarizePredictor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
using Microsoft.ML.CommandLine;
1010
using Microsoft.ML.Data;
1111
using Microsoft.ML.EntryPoints;
12-
using Microsoft.ML.Internal.Internallearn;
12+
using Microsoft.ML.Model;
1313

1414
[assembly: EntryPointModule(typeof(SummarizePredictor))]
1515

src/Microsoft.ML.Data/Scorers/QuantileRegressionScorer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
using Microsoft.ML;
99
using Microsoft.ML.CommandLine;
1010
using Microsoft.ML.Data;
11-
using Microsoft.ML.Internal.Internallearn;
11+
using Microsoft.ML.Model;
1212

1313
[assembly: LoadableClass(typeof(IDataScorerTransform), typeof(QuantileRegressionScorerTransform), typeof(QuantileRegressionScorerTransform.Arguments),
1414
typeof(SignatureDataScorer), "Quantile Regression Scorer", "QuantileRegressionScorer", AnnotationUtils.Const.ScoreColumnKind.QuantileRegression)]

src/Microsoft.ML.Data/Transforms/ExplainabilityCatalog.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// See the LICENSE file in the project root for more information.
44

55
using Microsoft.ML.Data;
6-
using Microsoft.ML.Internal.Internallearn;
6+
using Microsoft.ML.Model;
77

88
namespace Microsoft.ML
99
{

src/Microsoft.ML.Data/Training/EarlyStoppingCriteria.cs renamed to src/Microsoft.ML.FastTree/Training/EarlyStoppingCriteria.cs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
using Microsoft.ML;
77
using Microsoft.ML.CommandLine;
88
using Microsoft.ML.EntryPoints;
9-
using Microsoft.ML.Internal.Internallearn;
9+
using Microsoft.ML.Trainers.FastTree;
1010
using Float = System.Single;
1111

1212
[assembly: LoadableClass(typeof(TolerantEarlyStoppingCriterion), typeof(TolerantEarlyStoppingCriterion.Options), typeof(SignatureEarlyStoppingCriterion), "Tolerant (TR)", "tr")]
@@ -21,12 +21,12 @@
2121
[assembly: EntryPointModule(typeof(PQEarlyStoppingCriterion))]
2222
[assembly: EntryPointModule(typeof(UPEarlyStoppingCriterion))]
2323

24-
namespace Microsoft.ML.Internal.Internallearn
24+
namespace Microsoft.ML.Trainers.FastTree
2525
{
2626
internal delegate void SignatureEarlyStoppingCriterion(bool lowerIsBetter);
2727

2828
// These criteria will be used in FastTree and NeuralNets.
29-
public interface IEarlyStoppingCriterion
29+
public abstract class IEarlyStoppingCriterion
3030
{
3131
/// <summary>
3232
/// Check if the learning should stop or not.
@@ -35,7 +35,7 @@ public interface IEarlyStoppingCriterion
3535
/// <param name="trainingScore">A non negative number. Higher score means better result unless "_lowerIsBetter" is true.</param>
3636
/// <param name="isBestCandidate">True if the current result is the best ever.</param>
3737
/// <returns>If true, the learning should stop.</returns>
38-
bool CheckScore(Float validationScore, Float trainingScore, out bool isBestCandidate);
38+
public abstract bool CheckScore(Float validationScore, Float trainingScore, out bool isBestCandidate);
3939
}
4040

4141
[TlcModule.ComponentKind("EarlyStoppingCriterion")]
@@ -69,8 +69,6 @@ internal EarlyStoppingCriterion(TOptions options, bool lowerIsBetter)
6969
_bestScore = LowerIsBetter ? Float.PositiveInfinity : Float.NegativeInfinity;
7070
}
7171

72-
public abstract bool CheckScore(Float validationScore, Float trainingScore, out bool isBestCandidate);
73-
7472
/// <summary>
7573
/// Check if the given score is the best ever. The best score will be stored at this._bestScore.
7674
/// </summary>

src/Microsoft.ML.HalLearners/SymSgdClassificationTrainer.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
using Microsoft.ML.EntryPoints;
1616
using Microsoft.ML.Internal.Internallearn;
1717
using Microsoft.ML.Internal.Utilities;
18+
using Microsoft.ML.Model;
1819
using Microsoft.ML.Trainers.HalLearners;
1920
using Microsoft.ML.Transforms;
2021

src/Microsoft.ML.StandardLearners/Standard/LogisticRegression/LogisticRegression.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
using Microsoft.ML.CommandLine;
1111
using Microsoft.ML.Data;
1212
using Microsoft.ML.EntryPoints;
13-
using Microsoft.ML.Internal.Internallearn;
1413
using Microsoft.ML.Internal.Utilities;
14+
using Microsoft.ML.Model;
1515
using Microsoft.ML.Numeric;
1616
using Microsoft.ML.Trainers;
1717

src/Microsoft.ML.StandardLearners/Standard/Online/AveragedPerceptron.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
using Microsoft.ML.CommandLine;
1010
using Microsoft.ML.Data;
1111
using Microsoft.ML.EntryPoints;
12-
using Microsoft.ML.Internal.Internallearn;
12+
using Microsoft.ML.Model;
1313
using Microsoft.ML.Numeric;
1414
using Microsoft.ML.Trainers.Online;
1515

src/Microsoft.ML.StandardLearners/Standard/Online/LinearSvm.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
using Microsoft.ML.EntryPoints;
1212
using Microsoft.ML.Internal.Internallearn;
1313
using Microsoft.ML.Internal.Utilities;
14+
using Microsoft.ML.Model;
1415
using Microsoft.ML.Numeric;
1516
using Microsoft.ML.Trainers.Online;
1617

0 commit comments

Comments
 (0)