Skip to content

Commit ce7d3f6

Browse files
authored
Updating the CopyColumnsEstimator and Transform to use common code (#706) (#1141)
* Updating the CopyColumnsEstimator and Transform to use common code (#706) This builds on the Estimator conversion for the CopyColumnsTransform. This change is mainly refactoring as common code has moved to base level classes. This change is the following: - CopyColumnTransform now derives from OneToOneTransformerBase - CopyColumnEstimator now derives from TrivialEstimator - CopyColumnTransform::Mapper now derives from MapperBase - Removed code that was no longer needed due to these changes * - Moved CopyColumnsTransform into Microsoft.ML.Transforms namespace, updated namespace usage and entrypoints due to this change. - Save now uses the SaveColumns from the base class - Other various changes based upon feedback.
1 parent 22b0845 commit ce7d3f6

File tree

12 files changed

+86
-225
lines changed

12 files changed

+86
-225
lines changed

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

+1-3
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5-
using System.Collections.Generic;
6-
using System.Linq;
75
using Microsoft.ML.Runtime;
8-
using Microsoft.ML.Runtime.CommandLine;
96
using Microsoft.ML.Runtime.Data;
107
using Microsoft.ML.Runtime.EntryPoints;
8+
using Microsoft.ML.Transforms;
119

1210
[assembly: LoadableClass(typeof(void), typeof(SchemaManipulation), null, typeof(SignatureEntryPointModule), "SchemaManipulation")]
1311

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

+3-4
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5+
using Microsoft.ML.Runtime.CommandLine;
6+
using Microsoft.ML.Runtime.Data;
7+
using Microsoft.ML.Transforms;
58
using System;
69
using System.Collections.Generic;
710
using System.Linq;
8-
using Microsoft.ML.Runtime;
9-
using Microsoft.ML.Runtime.CommandLine;
10-
using Microsoft.ML.Runtime.Data;
11-
using Microsoft.ML.Runtime.EntryPoints;
1211

1312
namespace Microsoft.ML.Runtime.EntryPoints
1413
{

src/Microsoft.ML.Data/Evaluators/MulticlassClassifierEvaluator.cs

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
using Microsoft.ML.Runtime.EntryPoints;
99
using Microsoft.ML.Runtime.Internal.Utilities;
1010
using Microsoft.ML.Runtime.Model;
11+
using Microsoft.ML.Transforms;
1112
using System;
1213
using System.Collections.Generic;
1314
using System.Linq;

src/Microsoft.ML.Data/StaticPipe/Reconciler.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5-
using System;
6-
using System.Collections.Generic;
75
using Microsoft.ML.Core.Data;
86
using Microsoft.ML.Runtime;
9-
using Microsoft.ML.Runtime.Data;
7+
using Microsoft.ML.Transforms;
8+
using System;
9+
using System.Collections.Generic;
1010

1111
namespace Microsoft.ML.StaticPipe.Runtime
1212
{

src/Microsoft.ML.Data/StaticPipe/StaticPipeUtils.cs

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
using Microsoft.ML.Core.Data;
1010
using Microsoft.ML.Runtime;
1111
using Microsoft.ML.Runtime.Data;
12+
using Microsoft.ML.Transforms;
1213

1314
namespace Microsoft.ML.StaticPipe.Runtime
1415
{

src/Microsoft.ML.Data/StaticPipe/TrainerEstimatorReconciler.cs

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5-
using System.Collections.Generic;
6-
using System.Linq;
75
using Microsoft.ML.Core.Data;
86
using Microsoft.ML.Runtime;
97
using Microsoft.ML.Runtime.Data;
108
using Microsoft.ML.Runtime.Internal.Utilities;
9+
using Microsoft.ML.Transforms;
10+
using System.Collections.Generic;
11+
using System.Linq;
1112

1213
namespace Microsoft.ML.StaticPipe.Runtime
1314
{

0 commit comments

Comments
 (0)