Skip to content

Commit 0e365de

Browse files
committed
PR review comments + the following changes:
Microsoft.ML.Calibrators namespace for calibrators Microsoft.ML.Data.Evaluators.Metrics -> Microsoft.ML.Data Microsoft.ML.FastTree --> Microsoft.ML.Trainers.FastTree ICanSaveModel, ModelSaveContext move from Microsoft.ML.Model to Microsoft.Ml
1 parent 12ab036 commit 0e365de

File tree

54 files changed

+63
-65
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+63
-65
lines changed

src/Microsoft.ML.Core/Data/ModelLoadContext.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
using System.IO;
77
using System.Text;
88
using Microsoft.ML.Internal.Utilities;
9+
using Microsoft.ML.Model;
910

10-
namespace Microsoft.ML.Model
11+
namespace Microsoft.ML
1112
{
1213
/// <summary>
1314
/// This is a convenience context object for loading models from a repository, for

src/Microsoft.ML.Core/Data/ModelLoading.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@
77
using System.Reflection;
88
using System.Text;
99
using Microsoft.ML.Internal.Utilities;
10+
using Microsoft.ML.Model;
1011

11-
namespace Microsoft.ML.Model
12+
namespace Microsoft.ML
1213
{
1314
/// <summary>
1415
/// Signature for a repository based model loader. This is the dual of <see cref="ICanSaveModel"/>.

src/Microsoft.ML.Core/Data/ModelSaveContext.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
using System.IO;
77
using System.Text;
88
using Microsoft.ML.Internal.Utilities;
9+
using Microsoft.ML.Model;
910

10-
namespace Microsoft.ML.Model
11+
namespace Microsoft.ML
1112
{
1213
/// <summary>
1314
/// This is a convenience context object for saving models to a repository, for

src/Microsoft.ML.Core/Data/ModelSaving.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
using System;
66
using System.IO;
77
using System.Text;
8+
using Microsoft.ML.Model;
89

9-
namespace Microsoft.ML.Model
10+
namespace Microsoft.ML
1011
{
1112
public sealed partial class ModelSaveContext : IDisposable
1213
{

src/Microsoft.ML.Core/Data/Repository.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
using System.IO.Compression;
99
using Microsoft.ML.Internal.Utilities;
1010

11-
namespace Microsoft.ML.Model
11+
namespace Microsoft.ML
1212
{
1313
/// <summary>
1414
/// For saving a model into a repository.

src/Microsoft.ML.Data/Commands/CrossValidationCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
using System.Threading.Tasks;
1010
using Microsoft.Data.DataView;
1111
using Microsoft.ML;
12-
using Microsoft.ML.Calibrator;
12+
using Microsoft.ML.Calibrators;
1313
using Microsoft.ML.Command;
1414
using Microsoft.ML.CommandLine;
1515
using Microsoft.ML.Data;

src/Microsoft.ML.Data/Commands/TrainCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
using System.Linq;
99
using Microsoft.Data.DataView;
1010
using Microsoft.ML;
11-
using Microsoft.ML.Calibrator;
11+
using Microsoft.ML.Calibrators;
1212
using Microsoft.ML.Command;
1313
using Microsoft.ML.CommandLine;
1414
using Microsoft.ML.Data;

src/Microsoft.ML.Data/Commands/TrainTestCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
using System.IO;
77
using Microsoft.Data.DataView;
88
using Microsoft.ML;
9-
using Microsoft.ML.Calibrator;
9+
using Microsoft.ML.Calibrators;
1010
using Microsoft.ML.Command;
1111
using Microsoft.ML.CommandLine;
1212
using Microsoft.ML.Data;

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

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

55
using System.Text;
66
using System.Text.RegularExpressions;
7-
using Microsoft.ML.Calibrator;
7+
using Microsoft.ML.Calibrators;
88

99
namespace Microsoft.ML.Internal.Utilities
1010
{

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
using System.Collections.Generic;
77
using System.IO;
88
using Microsoft.Data.DataView;
9-
using Microsoft.ML.Calibrator;
9+
using Microsoft.ML.Calibrators;
1010
using Microsoft.ML.Data;
1111

1212
namespace Microsoft.ML.Internal.Internallearn

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
using System;
66
using System.Collections.Generic;
77
using Microsoft.Data.DataView;
8-
using Microsoft.ML.Calibrator;
8+
using Microsoft.ML.Calibrators;
99
using Microsoft.ML.CommandLine;
1010
using Microsoft.ML.Data;
1111
using Microsoft.ML.Data.IO;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
using System.IO;
88
using System.Linq;
99
using Microsoft.Data.DataView;
10-
using Microsoft.ML.Calibrator;
10+
using Microsoft.ML.Calibrators;
1111
using Microsoft.ML.Data;
1212
using Microsoft.ML.Internal.Internallearn;
1313
using Microsoft.ML.Model;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
using System.IO;
66
using System.Text;
77
using Microsoft.Data.DataView;
8-
using Microsoft.ML.Calibrator;
8+
using Microsoft.ML.Calibrators;
99
using Microsoft.ML.CommandLine;
1010
using Microsoft.ML.Data;
1111
using Microsoft.ML.EntryPoints;

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
using Microsoft.ML;
1111
using Microsoft.ML.CommandLine;
1212
using Microsoft.ML.Data;
13-
using Microsoft.ML.Data.Evaluators.Metrics;
1413
using Microsoft.ML.EntryPoints;
1514
using Microsoft.ML.Internal.Utilities;
1615
using Microsoft.ML.Transforms;

src/Microsoft.ML.Data/Evaluators/Metrics/AnomalyDetectionMetrics.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
using System;
66
using Microsoft.Data.DataView;
77

8-
namespace Microsoft.ML.Data.Evaluators.Metrics
8+
namespace Microsoft.ML.Data
99
{
1010
/// <summary>
1111
/// Evaluation results for anomaly detection.

src/Microsoft.ML.Data/Model/Onnx/ICanSaveOnnx.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
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.Calibrator;
5+
using Microsoft.ML.Calibrators;
66
using Microsoft.ML.Data;
77

88
namespace Microsoft.ML.Model.OnnxConverter

src/Microsoft.ML.Data/Model/Pfa/ICanSavePfa.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
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.Calibrator;
5+
using Microsoft.ML.Calibrators;
66
using Microsoft.ML.Data;
77
using Newtonsoft.Json.Linq;
88

src/Microsoft.ML.Data/Prediction/Calibrator.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
using System.Linq;
1111
using Microsoft.Data.DataView;
1212
using Microsoft.ML;
13-
using Microsoft.ML.Calibrator;
13+
using Microsoft.ML.Calibrators;
1414
using Microsoft.ML.CommandLine;
1515
using Microsoft.ML.Data;
1616
using Microsoft.ML.EntryPoints;
@@ -79,7 +79,7 @@
7979
[assembly: EntryPointModule(typeof(PavCalibratorTrainerFactory))]
8080
[assembly: EntryPointModule(typeof(PlattCalibratorTrainerFactory))]
8181

82-
namespace Microsoft.ML.Calibrator
82+
namespace Microsoft.ML.Calibrators
8383
{
8484
/// <summary>
8585
/// Signature for the loaders of calibrators.

src/Microsoft.ML.Data/Prediction/CalibratorCatalog.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
using System.Linq;
77
using Microsoft.Data.DataView;
88
using Microsoft.ML;
9-
using Microsoft.ML.Calibrator;
9+
using Microsoft.ML.Calibrators;
1010
using Microsoft.ML.Data;
1111
using Microsoft.ML.Model;
1212
using Microsoft.ML.Trainers;
@@ -20,7 +20,7 @@
2020
[assembly: LoadableClass(typeof(CalibratorTransformer<PavCalibrator>), typeof(PavCalibratorTransformer), null,
2121
typeof(SignatureLoadModel), "", PavCalibratorTransformer.LoadName)]
2222

23-
namespace Microsoft.ML.Calibrator
23+
namespace Microsoft.ML.Calibrators
2424
{
2525

2626
/// <summary>

src/Microsoft.ML.Data/Prediction/IPredictionTransformer.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.Data.DataView;
6-
using Microsoft.ML.Calibrator;
6+
using Microsoft.ML.Calibrators;
77

88
namespace Microsoft.ML
99
{

src/Microsoft.ML.Data/TrainCatalog.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
using System.Linq;
77
using Microsoft.Data.DataView;
88
using Microsoft.ML.Data;
9-
using Microsoft.ML.Data.Evaluators.Metrics;
109
using Microsoft.ML.Transforms;
1110
using Microsoft.ML.Transforms.Conversions;
1211

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
using System.Collections.Generic;
66
using Microsoft.Data.DataView;
77
using Microsoft.ML;
8-
using Microsoft.ML.Calibrator;
8+
using Microsoft.ML.Calibrators;
99
using Microsoft.ML.CommandLine;
1010
using Microsoft.ML.Data;
1111
using Microsoft.ML.EntryPoints;

src/Microsoft.ML.Ensemble/EntryPoints/PipelineEnsemble.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.Data.DataView;
6-
using Microsoft.ML.Calibrator;
6+
using Microsoft.ML.Calibrators;
77
using Microsoft.ML.Data;
88
using Microsoft.ML.EntryPoints;
99
using Microsoft.ML.Trainers.Ensemble;

src/Microsoft.ML.Ensemble/PipelineEnsemble.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
using System.Text;
1010
using Microsoft.Data.DataView;
1111
using Microsoft.ML;
12-
using Microsoft.ML.Calibrator;
12+
using Microsoft.ML.Calibrators;
1313
using Microsoft.ML.Data;
1414
using Microsoft.ML.EntryPoints;
1515
using Microsoft.ML.Internal.Internallearn;

src/Microsoft.ML.FastTree/FastTree.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,15 @@
1111
using System.Linq;
1212
using System.Text;
1313
using Microsoft.Data.DataView;
14-
using Microsoft.ML.Calibrator;
14+
using Microsoft.ML.Calibrators;
1515
using Microsoft.ML.CommandLine;
1616
using Microsoft.ML.Data;
1717
using Microsoft.ML.Data.Conversion;
18-
using Microsoft.ML.EntryPoints;
19-
using Microsoft.ML.FastTree;
2018
using Microsoft.ML.Internal.Internallearn;
2119
using Microsoft.ML.Internal.Utilities;
2220
using Microsoft.ML.Model;
2321
using Microsoft.ML.Model.OnnxConverter;
2422
using Microsoft.ML.Model.Pfa;
25-
using Microsoft.ML.Trainers;
2623
using Microsoft.ML.Transforms;
2724
using Microsoft.ML.Transforms.Conversions;
2825
using Microsoft.ML.TreePredictor;
@@ -3384,7 +3381,7 @@ public abstract class TreeEnsembleModelParametersBasedOnRegressionTree : TreeEns
33843381
{
33853382
/// <summary>
33863383
/// An ensemble of trees exposed to users. It is a wrapper on the <see langword="internal"/>
3387-
/// <see cref="InternalTreeEnsemble"/> in <see cref="ML.FastTree.TreeEnsemble{T}"/>.
3384+
/// <see cref="InternalTreeEnsemble"/> in <see cref="ML.Trainers.FastTree.TreeEnsemble{T}"/>.
33883385
/// </summary>
33893386
public RegressionTreeEnsemble TrainedTreeEnsemble { get; }
33903387

@@ -3424,7 +3421,7 @@ public abstract class TreeEnsembleModelParametersBasedOnQuantileRegressionTree :
34243421
{
34253422
/// <summary>
34263423
/// An ensemble of trees exposed to users. It is a wrapper on the <see langword="internal"/>
3427-
/// <see cref="InternalTreeEnsemble"/> in <see cref="ML.FastTree.TreeEnsemble{T}"/>.
3424+
/// <see cref="InternalTreeEnsemble"/> in <see cref="ML.Trainers.FastTree.TreeEnsemble{T}"/>.
34283425
/// </summary>
34293426
public QuantileRegressionTreeEnsemble TrainedTreeEnsemble { get; }
34303427

src/Microsoft.ML.FastTree/FastTreeClassification.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
using System.Linq;
88
using Microsoft.Data.DataView;
99
using Microsoft.ML;
10-
using Microsoft.ML.Calibrator;
10+
using Microsoft.ML.Calibrators;
1111
using Microsoft.ML.Data;
1212
using Microsoft.ML.EntryPoints;
1313
using Microsoft.ML.Internal.Internallearn;

src/Microsoft.ML.FastTree/GamClassification.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
using System.Threading.Tasks;
77
using Microsoft.Data.DataView;
88
using Microsoft.ML;
9-
using Microsoft.ML.Calibrator;
9+
using Microsoft.ML.Calibrators;
1010
using Microsoft.ML.CommandLine;
1111
using Microsoft.ML.Data;
1212
using Microsoft.ML.Internal.Internallearn;

src/Microsoft.ML.FastTree/GamModelParameters.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
using System.Threading;
1010
using Microsoft.Data.DataView;
1111
using Microsoft.ML;
12-
using Microsoft.ML.Calibrator;
12+
using Microsoft.ML.Calibrators;
1313
using Microsoft.ML.Command;
1414
using Microsoft.ML.CommandLine;
1515
using Microsoft.ML.Data;

src/Microsoft.ML.FastTree/RandomForestClassification.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
using System.Linq;
77
using Microsoft.Data.DataView;
88
using Microsoft.ML;
9-
using Microsoft.ML.Calibrator;
9+
using Microsoft.ML.Calibrators;
1010
using Microsoft.ML.CommandLine;
1111
using Microsoft.ML.Data;
1212
using Microsoft.ML.EntryPoints;

src/Microsoft.ML.FastTree/RegressionTree.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@
44

55
using System.Collections.Generic;
66
using System.Collections.Immutable;
7-
using Microsoft.ML.Trainers.FastTree;
87

9-
namespace Microsoft.ML.FastTree
8+
namespace Microsoft.ML.Trainers.FastTree
109
{
1110
/// <summary>
1211
/// A container base class for exposing <see cref="InternalRegressionTree"/>'s and

src/Microsoft.ML.FastTree/TreeEnsemble.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
using System.Collections.Generic;
66
using System.Linq;
77

8-
namespace Microsoft.ML.FastTree
8+
namespace Microsoft.ML.Trainers.FastTree
99
{
1010
/// <summary>
1111
/// A list of <see cref="RegressionTreeBase"/>'s derived class. To compute the output value of a

src/Microsoft.ML.FastTree/TreeEnsemble/TreeEnsembleCombiner.cs

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

55
using System.Collections.Generic;
66
using Microsoft.ML;
7-
using Microsoft.ML.Calibrator;
7+
using Microsoft.ML.Calibrators;
88
using Microsoft.ML.Data;
99
using Microsoft.ML.Trainers.FastTree;
1010

src/Microsoft.ML.FastTree/TreeEnsembleFeaturizer.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
using System.Linq;
99
using Microsoft.Data.DataView;
1010
using Microsoft.ML;
11-
using Microsoft.ML.Calibrator;
11+
using Microsoft.ML.Calibrators;
1212
using Microsoft.ML.CommandLine;
1313
using Microsoft.ML.Data;
1414
using Microsoft.ML.Data.Conversion;
@@ -654,8 +654,8 @@ public static IDataTransform CreateForEntryPoint(IHostEnvironment env, Arguments
654654
ch.Assert(predictor == predictor2);
655655

656656
// Make sure that the given predictor has the correct number of input features.
657-
if (predictor is CalibratedModelParametersBase<IPredictorProducing<float>, Calibrator.ICalibrator>)
658-
predictor = ((CalibratedModelParametersBase<IPredictorProducing<float>, Calibrator.ICalibrator>)predictor).SubModel;
657+
if (predictor is CalibratedModelParametersBase<IPredictorProducing<float>, Calibrators.ICalibrator>)
658+
predictor = ((CalibratedModelParametersBase<IPredictorProducing<float>, Calibrators.ICalibrator>)predictor).SubModel;
659659
// Predictor should be a TreeEnsembleModelParameters, which implements IValueMapper, so this should
660660
// be non-null.
661661
var vm = predictor as IValueMapper;

src/Microsoft.ML.FastTree/Utils/FastTreeIniFileUtils.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 System.Text;
6-
using Microsoft.ML.Calibrator;
6+
using Microsoft.ML.Calibrators;
77
using Microsoft.ML.Data;
88
using Microsoft.ML.Internal.Utilities;
99

src/Microsoft.ML.HalLearners/SymSgdClassificationTrainer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
using System.Security;
99
using Microsoft.Data.DataView;
1010
using Microsoft.ML;
11-
using Microsoft.ML.Calibrator;
11+
using Microsoft.ML.Calibrators;
1212
using Microsoft.ML.CommandLine;
1313
using Microsoft.ML.Data;
1414
using Microsoft.ML.Data.Conversion;

src/Microsoft.ML.ImageAnalytics/EntryPoints/ImageAnalytics.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
using Microsoft.ML.EntryPoints;
77
using Microsoft.ML.ImageAnalytics;
88

9-
[assembly: LoadableClass(typeof(void), typeof(ImageAnalytics), null, typeof(SignatureEntryPointModule), "ImageAnalytics")]
9+
[assembly: LoadableClass(typeof(void), typeof(ImageAnalyticsEntryPoints), null, typeof(SignatureEntryPointModule), "ImageAnalytics")]
1010
namespace Microsoft.ML.ImageAnalytics
1111
{
12-
internal static class ImageAnalytics
12+
internal static class ImageAnalyticsEntryPoints
1313
{
1414
[TlcModule.EntryPoint(Name = "Transforms.ImageLoader", Desc = ImageLoadingTransformer.Summary,
1515
UserName = ImageLoadingTransformer.UserName, ShortName = ImageLoadingTransformer.LoaderSignature)]

0 commit comments

Comments
 (0)