Skip to content

Internalization of OneToOne and ManyToOne Column classes #2632

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 2 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
8 changes: 5 additions & 3 deletions src/Microsoft.ML.Data/Transforms/ColumnBindingsBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

namespace Microsoft.ML.Data
{
public abstract class SourceNameColumnBase
internal abstract class SourceNameColumnBase
{
[Argument(ArgumentType.AtMostOnce, HelpText = "Name of the new column", ShortName = "name")]
public string Name;
Expand Down Expand Up @@ -103,13 +103,15 @@ public bool TrySanitize()
}
}

public abstract class OneToOneColumn : SourceNameColumnBase
[BestFriend]
internal abstract class OneToOneColumn : SourceNameColumnBase
{
[BestFriend]
private protected OneToOneColumn() { }
}

public abstract class ManyToOneColumn
[BestFriend]
internal abstract class ManyToOneColumn
{
[Argument(ArgumentType.AtMostOnce, HelpText = "Name of the new column", ShortName = "name")]
public string Name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ internal static IDataTransform Create(IHostEnvironment env, Options options, IDa
/// </summary>
internal static class NgramHashExtractingTransformer
{
public abstract class ColumnBase : ManyToOneColumn
internal abstract class ColumnBase : ManyToOneColumn
{
[Argument(ArgumentType.AtMostOnce, HelpText = "Ngram length (stores all lengths up to the specified Ngram length)", ShortName = "ngram")]
public int? NgramLength;
Expand Down