Skip to content

Microsoft.ML.Internal.Internallearn namespace requires certain internalization. #2667

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 2 additions & 13 deletions src/Microsoft.ML.Data/Dirty/PredictionUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ namespace Microsoft.ML.Internal.Internallearn
/// <summary>
/// Various utilities
/// </summary>
public static class PredictionUtil
[BestFriend]
internal static class PredictionUtil
{
/// <summary>
/// generic method for parsing arguments using CommandLine. If there's a problem, it throws an InvalidOperationException, with a message giving usage.
Expand Down Expand Up @@ -152,16 +153,4 @@ public static char SepCharFromString(string s)
}
}
}

/// <summary>
/// A generic reverse Comparer (for use in Array.Sort)
/// </summary>
public sealed class ReverseComparer<T> : IComparer<T>
where T : IComparable<T>
{
public int Compare(T x, T y)
{
return -x.CompareTo(y);
}
}
}
9 changes: 2 additions & 7 deletions src/Microsoft.ML.Data/Dirty/PredictorInterfaces.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@

namespace Microsoft.ML.Internal.Internallearn
{

/// <summary>
/// Signature for loading from a file name.
/// </summary>
public delegate void SignaturePredictorFromFile(string fileName);

/// <summary>
/// A generic interface for models that can average parameters from multiple instance of self
/// </summary>
Expand Down Expand Up @@ -146,7 +140,8 @@ internal interface ICanSaveInSourceCode
/// <summary>
/// Signature for trainers that produce predictors that in turn can be use to score features.
/// </summary>
public delegate void SignatureFeatureScorerTrainer();
[BestFriend]
internal delegate void SignatureFeatureScorerTrainer();

/// <summary>
/// Interface implemented by components that can assign weights to features.
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.ML.Data/Training/EarlyStoppingCriteria.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

namespace Microsoft.ML.Internal.Internallearn
{
public delegate void SignatureEarlyStoppingCriterion(bool lowerIsBetter);
internal delegate void SignatureEarlyStoppingCriterion(bool lowerIsBetter);

// These criteria will be used in FastTree and NeuralNets.
public interface IEarlyStoppingCriterion
Expand Down
3 changes: 2 additions & 1 deletion src/Microsoft.ML.Data/Utilities/SlotDropper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ namespace Microsoft.ML.Internal.Internallearn
/// <summary>
/// Drops slots from a fixed or variable sized column based on slot ranges.
/// </summary>
public sealed class SlotDropper
[BestFriend]
internal sealed class SlotDropper
{
private readonly int[] _lengthReduction;

Expand Down
96 changes: 0 additions & 96 deletions src/Microsoft.ML.Data/Utilities/TypeUtils.cs

This file was deleted.