diff --git a/Microsoft.ML.sln b/Microsoft.ML.sln index 2d10df0f1a..a174f74768 100644 --- a/Microsoft.ML.sln +++ b/Microsoft.ML.sln @@ -100,7 +100,7 @@ Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Microsoft.ML.FSharp.Tests", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.ImageAnalytics", "src\Microsoft.ML.ImageAnalytics\Microsoft.ML.ImageAnalytics.csproj", "{00E38F77-1E61-4CDF-8F97-1417D4E85053}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.HalLearners", "src\Microsoft.ML.HalLearners\Microsoft.ML.HalLearners.csproj", "{A7222F41-1CF0-47D9-B80C-B4D77B027A61}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.Mkl.Components", "src\Microsoft.ML.Mkl.Components\Microsoft.ML.Mkl.Components.csproj", "{A7222F41-1CF0-47D9-B80C-B4D77B027A61}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.TensorFlow", "src\Microsoft.ML.TensorFlow\Microsoft.ML.TensorFlow.csproj", "{570A0B8A-5463-44D2-8521-54C0CA4CACA9}" EndProject @@ -142,7 +142,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.StaticPipe", " EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.TensorFlow.StaticPipe", "src\Microsoft.ML.TensorFlow.StaticPipe\Microsoft.ML.TensorFlow.StaticPipe.csproj", "{F95F7AFB-03AF-4D20-BD75-1740B5FF71D3}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.HalLearners.StaticPipe", "src\Microsoft.ML.HalLearners.StaticPipe\Microsoft.ML.HalLearners.StaticPipe.csproj", "{2F25EF6A-C754-45BE-AD9E-7DDF46A1B51A}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.Mkl.Components.StaticPipe", "src\Microsoft.ML.Mkl.Components.StaticPipe\Microsoft.ML.Mkl.Components.StaticPipe.csproj", "{2F25EF6A-C754-45BE-AD9E-7DDF46A1B51A}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.OnnxTransformer.StaticPipe", "src\Microsoft.ML.OnnxTransformer.StaticPipe\Microsoft.ML.OnnxTransformer.StaticPipe.csproj", "{D1324668-9568-40F4-AA55-30A9A516C230}" EndProject @@ -150,10 +150,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.LightGBM.Stati EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.TimeSeries.StaticPipe", "src\Microsoft.ML.TimeSeries.StaticPipe\Microsoft.ML.TimeSeries.StaticPipe.csproj", "{06A147ED-15EA-4106-9105-9B745125B470}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft.ML.HalLearners", "Microsoft.ML.HalLearners", "{63006A14-B924-48C5-83C9-CFE9DA22B01F}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft.ML.Mkl.Components", "Microsoft.ML.Mkl.Components", "{63006A14-B924-48C5-83C9-CFE9DA22B01F}" ProjectSection(SolutionItems) = preProject - pkg\Microsoft.ML.HalLearners\Microsoft.ML.HalLearners.nupkgproj = pkg\Microsoft.ML.HalLearners\Microsoft.ML.HalLearners.nupkgproj - pkg\Microsoft.ML.HalLearners\Microsoft.ML.HalLearners.symbols.nupkgproj = pkg\Microsoft.ML.HalLearners\Microsoft.ML.HalLearners.symbols.nupkgproj + pkg\Microsoft.ML.Mkl.Components\Microsoft.ML.Mkl.Components.nupkgproj = pkg\Microsoft.ML.Mkl.Components\Microsoft.ML.Mkl.Components.nupkgproj + pkg\Microsoft.ML.Mkl.Components\Microsoft.ML.Mkl.Components.symbols.nupkgproj = pkg\Microsoft.ML.Mkl.Components\Microsoft.ML.Mkl.Components.symbols.nupkgproj EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft.ML.ImageAnalytics", "Microsoft.ML.ImageAnalytics", "{1229F799-37F0-4282-B9F0-74BFA97CC362}" diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/PermutationFeatureImportance/PFIHelper.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/PermutationFeatureImportance/PFIHelper.cs index 8905cf6cdc..8245a76d6e 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/PermutationFeatureImportance/PFIHelper.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/PermutationFeatureImportance/PFIHelper.cs @@ -3,7 +3,6 @@ using Microsoft.Data.DataView; using Microsoft.ML.Trainers; using Microsoft.ML.SamplesUtils; -using Microsoft.ML.Trainers.HalLearners; namespace Microsoft.ML.Samples.Dynamic.PermutationFeatureImportance { diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/BinaryClassification/SymbolicStochasticGradientDescent.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/BinaryClassification/SymbolicStochasticGradientDescent.cs index 2b69730004..c3f1e1508e 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/BinaryClassification/SymbolicStochasticGradientDescent.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/BinaryClassification/SymbolicStochasticGradientDescent.cs @@ -2,7 +2,7 @@ { public static class SymbolicStochasticGradientDescent { - // This example requires installation of additional nuget package Microsoft.ML.HalLearners. + // This example requires installation of additional nuget package Microsoft.ML.Mkl.Components. // In this example we will use the adult income dataset. The goal is to predict // if a person's income is above $50K or not, based on demographic information about that person. // For more details about this dataset, please see https://archive.ics.uci.edu/ml/datasets/adult diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/BinaryClassification/SymbolicStochasticGradientDescentWithOptions.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/BinaryClassification/SymbolicStochasticGradientDescentWithOptions.cs index 31b1955a3e..de4f4ff386 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/BinaryClassification/SymbolicStochasticGradientDescentWithOptions.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/BinaryClassification/SymbolicStochasticGradientDescentWithOptions.cs @@ -2,7 +2,7 @@ { public static class SymbolicStochasticGradientDescentWithOptions { - // This example requires installation of additional nuget package Microsoft.ML.HalLearners. + // This example requires installation of additional nuget package Microsoft.ML.Mkl.Components. // In this example we will use the adult income dataset. The goal is to predict // if a person's income is above $50K or not, based on demographic information about that person. // For more details about this dataset, please see https://archive.ics.uci.edu/ml/datasets/adult @@ -20,7 +20,7 @@ public static void Example() var split = mlContext.BinaryClassification.TrainTestSplit(data, testFraction: 0.1); // Create data training pipeline var pipeline = mlContext.BinaryClassification.Trainers.SymbolicStochasticGradientDescent( - new ML.Trainers.HalLearners.SymbolicStochasticGradientDescentClassificationTrainer.Options() + new ML.Trainers.SymbolicStochasticGradientDescentClassificationTrainer.Options() { LearningRate = 0.2f, NumberOfIterations = 10, diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/Regression/OrdinaryLeastSquares.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/Regression/OrdinaryLeastSquares.cs index 29c720a205..7fe79c9a43 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/Regression/OrdinaryLeastSquares.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/Regression/OrdinaryLeastSquares.cs @@ -6,7 +6,7 @@ namespace Microsoft.ML.Samples.Dynamic.Trainers.Regression { public static class OrdinaryLeastSquares { - // This example requires installation of additional nuget package Microsoft.ML.HalLearners. + // This example requires installation of additional nuget package Microsoft.ML.Mkl.Components. // In this examples we will use the housing price dataset. The goal is to predict median home value. // For more details about this dataset, please see https://archive.ics.uci.edu/ml/machine-learning-databases/housing/ public static void Example() diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/Regression/OrdinaryLeastSquaresWithOptions.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/Regression/OrdinaryLeastSquaresWithOptions.cs index 9d2db10930..5a5eadaf75 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/Regression/OrdinaryLeastSquaresWithOptions.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/Regression/OrdinaryLeastSquaresWithOptions.cs @@ -1,13 +1,13 @@ using System; using Microsoft.ML.Data; using Microsoft.ML.SamplesUtils; -using Microsoft.ML.Trainers.HalLearners; +using Microsoft.ML.Trainers; namespace Microsoft.ML.Samples.Dynamic.Trainers.Regression { public static class OrdinaryLeastSquaresWithOptions { - // This example requires installation of additional nuget package Microsoft.ML.HalLearners. + // This example requires installation of additional nuget package Microsoft.ML.Mkl.Components. // In this examples we will use the housing price dataset. The goal is to predict median home value. // For more details about this dataset, please see https://archive.ics.uci.edu/ml/machine-learning-databases/housing/ public static void Example() diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/Projection/VectorWhiten.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/Projection/VectorWhiten.cs index b281c058ed..8e95b64806 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/Projection/VectorWhiten.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/Projection/VectorWhiten.cs @@ -8,7 +8,7 @@ namespace Microsoft.ML.Samples.Dynamic public sealed class VectorWhiten { - /// This example requires installation of additional nuget package Microsoft.ML.HalLearners. + /// This example requires installation of additional nuget package Microsoft.ML.Mkl.Components. public static void Example() { // Create a new ML context, for ML.NET operations. It can be used for exception tracking and logging, diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/Projection/VectorWhitenWithColumnOptions.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/Projection/VectorWhitenWithColumnOptions.cs index 80548ba9bb..15d282c6ad 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/Projection/VectorWhitenWithColumnOptions.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/Projection/VectorWhitenWithColumnOptions.cs @@ -7,7 +7,7 @@ namespace Microsoft.ML.Samples.Dynamic { public sealed class VectorWhitenWithColumnOptions { - /// This example requires installation of additional nuget package Microsoft.ML.HalLearners. + /// This example requires installation of additional nuget package Microsoft.ML.Mkl.Components. public static void Example() { // Create a new ML context, for ML.NET operations. It can be used for exception tracking and logging, diff --git a/docs/samples/Microsoft.ML.Samples/Microsoft.ML.Samples.csproj b/docs/samples/Microsoft.ML.Samples/Microsoft.ML.Samples.csproj index 63f92ff47d..a7749cbb7f 100644 --- a/docs/samples/Microsoft.ML.Samples/Microsoft.ML.Samples.csproj +++ b/docs/samples/Microsoft.ML.Samples/Microsoft.ML.Samples.csproj @@ -6,7 +6,7 @@ - + diff --git a/pkg/Microsoft.ML.HalLearners/Microsoft.ML.HalLearners.symbols.nupkgproj b/pkg/Microsoft.ML.HalLearners/Microsoft.ML.HalLearners.symbols.nupkgproj deleted file mode 100644 index 248ae82414..0000000000 --- a/pkg/Microsoft.ML.HalLearners/Microsoft.ML.HalLearners.symbols.nupkgproj +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/pkg/Microsoft.ML.HalLearners/Microsoft.ML.HalLearners.nupkgproj b/pkg/Microsoft.ML.Mkl.Components/Microsoft.ML.Mkl.Components.nupkgproj similarity index 75% rename from pkg/Microsoft.ML.HalLearners/Microsoft.ML.HalLearners.nupkgproj rename to pkg/Microsoft.ML.Mkl.Components/Microsoft.ML.Mkl.Components.nupkgproj index 2503b9911a..1bd16d235d 100644 --- a/pkg/Microsoft.ML.HalLearners/Microsoft.ML.HalLearners.nupkgproj +++ b/pkg/Microsoft.ML.Mkl.Components/Microsoft.ML.Mkl.Components.nupkgproj @@ -2,12 +2,12 @@ netstandard2.0 - ML.NET additional learners making use of hardware acceleration. They use Intel Mkl. + ML.NET additional learners making use of Intel Mkl. - + diff --git a/pkg/Microsoft.ML.Mkl.Components/Microsoft.ML.Mkl.Components.symbols.nupkgproj b/pkg/Microsoft.ML.Mkl.Components/Microsoft.ML.Mkl.Components.symbols.nupkgproj new file mode 100644 index 0000000000..0eaabcdd6e --- /dev/null +++ b/pkg/Microsoft.ML.Mkl.Components/Microsoft.ML.Mkl.Components.symbols.nupkgproj @@ -0,0 +1,5 @@ + + + + + diff --git a/src/Microsoft.ML.Console/Microsoft.ML.Console.csproj b/src/Microsoft.ML.Console/Microsoft.ML.Console.csproj index d3678c7c4b..a3b41c1265 100644 --- a/src/Microsoft.ML.Console/Microsoft.ML.Console.csproj +++ b/src/Microsoft.ML.Console/Microsoft.ML.Console.csproj @@ -13,7 +13,7 @@ - + diff --git a/src/Microsoft.ML.Core/Data/ModelLoading.cs b/src/Microsoft.ML.Core/Data/ModelLoading.cs index a1571598e4..6186c04da5 100644 --- a/src/Microsoft.ML.Core/Data/ModelLoading.cs +++ b/src/Microsoft.ML.Core/Data/ModelLoading.cs @@ -21,6 +21,23 @@ internal sealed partial class ModelLoadContext : IDisposable public const string ModelStreamName = "Model.key"; internal const string NameBinary = "Model.bin"; + /// + /// Returns the new assembly name to maintain backward compatibility. + /// + private string ForwardedLoaderAssemblyName + { + get + { + switch (LoaderAssemblyName) + { + case "Microsoft.ML.HalLearners": + return "Microsoft.ML.Mkl.Components"; + default: + return LoaderAssemblyName; + } + } + } + /// /// Return whether this context contains a directory and stream for a sub-model with /// the indicated name. This does not attempt to load the sub-model. @@ -259,7 +276,7 @@ private void EnsureLoaderAssemblyIsRegistered(ComponentCatalog catalog) { if (!string.IsNullOrEmpty(LoaderAssemblyName)) { - var assembly = Assembly.Load(LoaderAssemblyName); + var assembly = Assembly.Load(ForwardedLoaderAssemblyName); catalog.RegisterAssembly(assembly); } } diff --git a/src/Microsoft.ML.Core/Properties/AssemblyInfo.cs b/src/Microsoft.ML.Core/Properties/AssemblyInfo.cs index b1849191a5..9ddb49d4a5 100644 --- a/src/Microsoft.ML.Core/Properties/AssemblyInfo.cs +++ b/src/Microsoft.ML.Core/Properties/AssemblyInfo.cs @@ -23,7 +23,7 @@ [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Api" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Ensemble" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.FastTree" + PublicKey.Value)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.HalLearners" + PublicKey.Value)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Mkl.Components" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.KMeansClustering" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.LightGBM" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.OnnxConverter" + PublicKey.Value)] @@ -42,7 +42,7 @@ [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.StaticPipe" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TensorFlow.StaticPipe" + PublicKey.Value)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.HalLearners.StaticPipe" + PublicKey.Value)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Mkl.Components.StaticPipe" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.OnnxTransformer.StaticPipe" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.LightGBM.StaticPipe" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TimeSeries.StaticPipe" + PublicKey.Value)] diff --git a/src/Microsoft.ML.CpuMath/AssemblyInfo.cs b/src/Microsoft.ML.CpuMath/AssemblyInfo.cs index 65557d90f9..136148d27e 100644 --- a/src/Microsoft.ML.CpuMath/AssemblyInfo.cs +++ b/src/Microsoft.ML.CpuMath/AssemblyInfo.cs @@ -9,7 +9,7 @@ [assembly: InternalsVisibleTo("Microsoft.ML.CpuMath.UnitTests.netcoreapp" + PublicKey.TestValue)] [assembly: InternalsVisibleTo("Microsoft.ML.Data" + PublicKey.Value)] [assembly: InternalsVisibleTo("Microsoft.ML.FastTree" + PublicKey.Value)] -[assembly: InternalsVisibleTo("Microsoft.ML.HalLearners" + PublicKey.Value)] +[assembly: InternalsVisibleTo("Microsoft.ML.Mkl.Components" + PublicKey.Value)] [assembly: InternalsVisibleTo("Microsoft.ML.KMeansClustering" + PublicKey.Value)] [assembly: InternalsVisibleTo("Microsoft.ML.PCA" + PublicKey.Value)] [assembly: InternalsVisibleTo("Microsoft.ML.StandardLearners" + PublicKey.Value)] diff --git a/src/Microsoft.ML.Data/Properties/AssemblyInfo.cs b/src/Microsoft.ML.Data/Properties/AssemblyInfo.cs index 63a5ff7ea5..6c3738add7 100644 --- a/src/Microsoft.ML.Data/Properties/AssemblyInfo.cs +++ b/src/Microsoft.ML.Data/Properties/AssemblyInfo.cs @@ -23,7 +23,7 @@ [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Api" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Ensemble" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.FastTree" + PublicKey.Value)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.HalLearners" + PublicKey.Value)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Mkl.Components" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.KMeansClustering" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.LightGBM" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.OnnxConverter" + PublicKey.Value)] diff --git a/src/Microsoft.ML.HalLearners.StaticPipe/Microsoft.ML.HalLearners.StaticPipe.csproj b/src/Microsoft.ML.Mkl.Components.StaticPipe/Microsoft.ML.Mkl.Components.StaticPipe.csproj similarity index 77% rename from src/Microsoft.ML.HalLearners.StaticPipe/Microsoft.ML.HalLearners.StaticPipe.csproj rename to src/Microsoft.ML.Mkl.Components.StaticPipe/Microsoft.ML.Mkl.Components.StaticPipe.csproj index 715cc7df2b..a5ae4ee177 100644 --- a/src/Microsoft.ML.HalLearners.StaticPipe/Microsoft.ML.HalLearners.StaticPipe.csproj +++ b/src/Microsoft.ML.Mkl.Components.StaticPipe/Microsoft.ML.Mkl.Components.StaticPipe.csproj @@ -6,7 +6,7 @@ - + diff --git a/src/Microsoft.ML.HalLearners.StaticPipe/VectorWhiteningStaticExtensions.cs b/src/Microsoft.ML.Mkl.Components.StaticPipe/VectorWhiteningStaticExtensions.cs similarity index 92% rename from src/Microsoft.ML.HalLearners.StaticPipe/VectorWhiteningStaticExtensions.cs rename to src/Microsoft.ML.Mkl.Components.StaticPipe/VectorWhiteningStaticExtensions.cs index c3bf58f560..a9f940a73b 100644 --- a/src/Microsoft.ML.HalLearners.StaticPipe/VectorWhiteningStaticExtensions.cs +++ b/src/Microsoft.ML.Mkl.Components.StaticPipe/VectorWhiteningStaticExtensions.cs @@ -6,7 +6,7 @@ using Microsoft.ML.StaticPipe; using Microsoft.ML.Transforms; -namespace Microsoft.ML.HalLearners.StaticPipe +namespace Microsoft.ML.Mkl.Components.StaticPipe { /// /// Extensions for statically typed Whitening estimator. @@ -55,7 +55,7 @@ public override IEstimator Reconcile(IHostEnvironment env, } } - /// + /// /// The column to which the transform will be applied. /// Whitening constant, prevents division by zero when scaling the data by inverse of eigenvalues. /// Maximum number of rows used to train the transform. @@ -66,7 +66,7 @@ public static Vector PcaWhitening(this Vector input, int pcaNum = VectorWhiteningEstimator.Defaults.PcaNum) => new OutPipelineColumn(input, WhiteningKind.Pca, eps, maxRows, pcaNum); - /// + /// /// The column to which the transform will be applied. /// Whitening constant, prevents division by zero. /// Maximum number of rows used to train the transform. diff --git a/src/Microsoft.ML.HalLearners/ComputeLRTrainingStdThroughHal.cs b/src/Microsoft.ML.Mkl.Components/ComputeLRTrainingStdThroughHal.cs similarity index 92% rename from src/Microsoft.ML.HalLearners/ComputeLRTrainingStdThroughHal.cs rename to src/Microsoft.ML.Mkl.Components/ComputeLRTrainingStdThroughHal.cs index 44b9dcbf34..02c84e25df 100644 --- a/src/Microsoft.ML.HalLearners/ComputeLRTrainingStdThroughHal.cs +++ b/src/Microsoft.ML.Mkl.Components/ComputeLRTrainingStdThroughHal.cs @@ -5,13 +5,13 @@ using System; using Microsoft.ML.Data; using Microsoft.ML.Internal.Utilities; -using Microsoft.ML.Trainers.HalLearners; +using Microsoft.ML.Trainers; namespace Microsoft.ML.Trainers { - using Mkl = OrdinaryLeastSquaresRegressionTrainer.Mkl; + using MklOls = OrdinaryLeastSquaresRegressionTrainer.Mkl; - public sealed class ComputeLRTrainingStdThroughHal : ComputeLRTrainingStd + public sealed class ComputeLRTrainingStdThroughMkl : ComputeLRTrainingStd { /// /// Computes the standart deviation matrix of each of the non-zero training weights, needed to calculate further the standart deviation, @@ -36,12 +36,12 @@ public override VBuffer ComputeStd(double[] hessian, int[] weightIndices, try { // First, find the Cholesky decomposition LL' of the Hessian. - Mkl.Pptrf(Mkl.Layout.RowMajor, Mkl.UpLo.Lo, numSelectedParams, hessian); + MklOls.Pptrf(MklOls.Layout.RowMajor, MklOls.UpLo.Lo, numSelectedParams, hessian); // Note that hessian is already modified at this point. It is no longer the original Hessian, // but instead represents the Cholesky decomposition L. // Also note that the following routine is supposed to consume the Cholesky decomposition L instead // of the original information matrix. - Mkl.Pptri(Mkl.Layout.RowMajor, Mkl.UpLo.Lo, numSelectedParams, hessian); + MklOls.Pptri(MklOls.Layout.RowMajor, MklOls.UpLo.Lo, numSelectedParams, hessian); // At this point, hessian should contain the inverse of the original Hessian matrix. // Swap hessian with invHessian to avoid confusion in the following context. Utils.Swap(ref hessian, ref invHessian); diff --git a/src/Microsoft.ML.HalLearners/Microsoft.ML.HalLearners.csproj b/src/Microsoft.ML.Mkl.Components/Microsoft.ML.Mkl.Components.csproj similarity index 86% rename from src/Microsoft.ML.HalLearners/Microsoft.ML.HalLearners.csproj rename to src/Microsoft.ML.Mkl.Components/Microsoft.ML.Mkl.Components.csproj index 9f5b88b77e..1aa100c9ad 100644 --- a/src/Microsoft.ML.HalLearners/Microsoft.ML.HalLearners.csproj +++ b/src/Microsoft.ML.Mkl.Components/Microsoft.ML.Mkl.Components.csproj @@ -2,7 +2,7 @@ netstandard2.0 - Microsoft.ML.HalLearners + Microsoft.ML.Mkl.Components true @@ -15,7 +15,7 @@ + dependancy on MlNetMklDeps. From the users prospective, the Microsoft.ML.Mkl.Components package depends on Microsoft.ML.Mkl.Redist. --> diff --git a/src/Microsoft.ML.HalLearners/HalLearnersCatalog.cs b/src/Microsoft.ML.Mkl.Components/MklComponentsCatalog.cs similarity index 99% rename from src/Microsoft.ML.HalLearners/HalLearnersCatalog.cs rename to src/Microsoft.ML.Mkl.Components/MklComponentsCatalog.cs index c368acb8ef..930fe66b93 100644 --- a/src/Microsoft.ML.HalLearners/HalLearnersCatalog.cs +++ b/src/Microsoft.ML.Mkl.Components/MklComponentsCatalog.cs @@ -3,7 +3,7 @@ // See the LICENSE file in the project root for more information. using Microsoft.ML.Data; -using Microsoft.ML.Trainers.HalLearners; +using Microsoft.ML.Trainers; using Microsoft.ML.Transforms; namespace Microsoft.ML @@ -11,7 +11,7 @@ namespace Microsoft.ML /// /// The trainer catalog extensions for the and . /// - public static class HalLearnersCatalog + public static class MklComponentsCatalog { /// /// Predict a target using a linear regression model trained with the . diff --git a/src/Microsoft.ML.HalLearners/OlsLinearRegression.cs b/src/Microsoft.ML.Mkl.Components/OlsLinearRegression.cs similarity index 99% rename from src/Microsoft.ML.HalLearners/OlsLinearRegression.cs rename to src/Microsoft.ML.Mkl.Components/OlsLinearRegression.cs index be556ea7c8..51f797f63b 100644 --- a/src/Microsoft.ML.HalLearners/OlsLinearRegression.cs +++ b/src/Microsoft.ML.Mkl.Components/OlsLinearRegression.cs @@ -15,7 +15,7 @@ using Microsoft.ML.Internal.Internallearn; using Microsoft.ML.Internal.Utilities; using Microsoft.ML.Model; -using Microsoft.ML.Trainers.HalLearners; +using Microsoft.ML.Trainers; [assembly: LoadableClass(OrdinaryLeastSquaresRegressionTrainer.Summary, typeof(OrdinaryLeastSquaresRegressionTrainer), typeof(OrdinaryLeastSquaresRegressionTrainer.Options), new[] { typeof(SignatureRegressorTrainer), typeof(SignatureTrainer), typeof(SignatureFeatureScorerTrainer) }, @@ -29,7 +29,7 @@ [assembly: LoadableClass(typeof(void), typeof(OrdinaryLeastSquaresRegressionTrainer), null, typeof(SignatureEntryPointModule), OrdinaryLeastSquaresRegressionTrainer.LoadNameValue)] -namespace Microsoft.ML.Trainers.HalLearners +namespace Microsoft.ML.Trainers { /// public sealed class OrdinaryLeastSquaresRegressionTrainer : TrainerEstimatorBase, OlsLinearRegressionModelParameters> diff --git a/src/Microsoft.ML.HalLearners/Properties/AssemblyInfo.cs b/src/Microsoft.ML.Mkl.Components/Properties/AssemblyInfo.cs similarity index 84% rename from src/Microsoft.ML.HalLearners/Properties/AssemblyInfo.cs rename to src/Microsoft.ML.Mkl.Components/Properties/AssemblyInfo.cs index fb1cb20750..f3505fb02c 100644 --- a/src/Microsoft.ML.HalLearners/Properties/AssemblyInfo.cs +++ b/src/Microsoft.ML.Mkl.Components/Properties/AssemblyInfo.cs @@ -7,7 +7,7 @@ [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Tests" + PublicKey.TestValue)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.HalLearners.StaticPipe" + PublicKey.Value)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Mkl.Components.StaticPipe" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "RunTests" + InternalPublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Internal.MetaLinearLearner" + InternalPublicKey.Value)] diff --git a/src/Microsoft.ML.HalLearners/SymSgdClassificationTrainer.cs b/src/Microsoft.ML.Mkl.Components/SymSgdClassificationTrainer.cs similarity index 99% rename from src/Microsoft.ML.HalLearners/SymSgdClassificationTrainer.cs rename to src/Microsoft.ML.Mkl.Components/SymSgdClassificationTrainer.cs index a111f9b44e..8af12c405d 100644 --- a/src/Microsoft.ML.HalLearners/SymSgdClassificationTrainer.cs +++ b/src/Microsoft.ML.Mkl.Components/SymSgdClassificationTrainer.cs @@ -16,7 +16,7 @@ using Microsoft.ML.Internal.Internallearn; using Microsoft.ML.Internal.Utilities; using Microsoft.ML.Model; -using Microsoft.ML.Trainers.HalLearners; +using Microsoft.ML.Trainers; using Microsoft.ML.Transforms; [assembly: LoadableClass(typeof(SymbolicStochasticGradientDescentClassificationTrainer), typeof(SymbolicStochasticGradientDescentClassificationTrainer.Options), @@ -27,7 +27,7 @@ [assembly: LoadableClass(typeof(void), typeof(SymbolicStochasticGradientDescentClassificationTrainer), null, typeof(SignatureEntryPointModule), SymbolicStochasticGradientDescentClassificationTrainer.LoadNameValue)] -namespace Microsoft.ML.Trainers.HalLearners +namespace Microsoft.ML.Trainers { using TPredictor = CalibratedModelParametersBase; diff --git a/src/Microsoft.ML.HalLearners/VectorWhitening.cs b/src/Microsoft.ML.Mkl.Components/VectorWhitening.cs similarity index 100% rename from src/Microsoft.ML.HalLearners/VectorWhitening.cs rename to src/Microsoft.ML.Mkl.Components/VectorWhitening.cs diff --git a/src/Microsoft.ML.HalLearners/doc.xml b/src/Microsoft.ML.Mkl.Components/doc.xml similarity index 100% rename from src/Microsoft.ML.HalLearners/doc.xml rename to src/Microsoft.ML.Mkl.Components/doc.xml diff --git a/src/Microsoft.ML.StandardLearners/AssemblyInfo.cs b/src/Microsoft.ML.StandardLearners/AssemblyInfo.cs index 65b5ed14ea..176cecd557 100644 --- a/src/Microsoft.ML.StandardLearners/AssemblyInfo.cs +++ b/src/Microsoft.ML.StandardLearners/AssemblyInfo.cs @@ -7,6 +7,6 @@ [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.EntryPoints" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.LightGBM" + PublicKey.Value)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.HalLearners" + PublicKey.Value)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Mkl.Components" + PublicKey.Value)] [assembly: WantsToBeBestFriends] diff --git a/src/Microsoft.ML.StandardLearners/Standard/LogisticRegression/LogisticRegression.cs b/src/Microsoft.ML.StandardLearners/Standard/LogisticRegression/LogisticRegression.cs index e38f779d60..02b22f017e 100644 --- a/src/Microsoft.ML.StandardLearners/Standard/LogisticRegression/LogisticRegression.cs +++ b/src/Microsoft.ML.StandardLearners/Standard/LogisticRegression/LogisticRegression.cs @@ -46,7 +46,7 @@ public sealed class Options : OptionsBase /// If you have a large number of learned training parameters(more than 500), /// generating the training statistics might take a few seconds. /// More than 1000 weights might take a few minutes. For those cases consider using the instance of - /// present in the Microsoft.ML.HalLearners package. That computes the statistics using hardware acceleration. + /// present in the Microsoft.ML.Mkl.Components package. That computes the statistics using hardware acceleration. /// [Argument(ArgumentType.AtMostOnce, HelpText = "Show statistics of training examples.", ShortName = "stat", SortOrder = 50)] public bool ShowTrainingStats = false; @@ -54,8 +54,8 @@ public sealed class Options : OptionsBase /// /// The instance of that computes the std of the training statistics, at the end of training. /// The calculations are not part of Microsoft.ML package, due to the size of MKL. - /// If you need these calculations, add the Microsoft.ML.HalLearners package, and initialize . - /// to the implementation in the Microsoft.ML.HalLearners package. + /// If you need these calculations, add the Microsoft.ML.Mkl.Components package, and initialize . + /// to the implementation in the Microsoft.ML.Mkl.Components package. /// public ComputeLRTrainingStd StdComputer; } @@ -429,7 +429,7 @@ internal static CommonOutputs.BinaryClassificationOutput TrainBinary(IHostEnviro /// /// Computes the standard deviation matrix of each of the non-zero training weights, needed to calculate further the standard deviation, /// p-value and z-Score. - /// If you need fast calculations, use the implementation in the Microsoft.ML.HALLearners package, + /// If you need fast calculations, use the implementation in the Microsoft.ML.Mkl.Components package, /// which makes use of hardware acceleration. /// Due to the existence of regularization, an approximation is used to compute the variances of the trained linear coefficients. /// @@ -439,8 +439,8 @@ public abstract class ComputeLRTrainingStd /// Computes the standard deviation matrix of each of the non-zero training weights, needed to calculate further the standard deviation, /// p-value and z-Score. /// The calculations are not part of Microsoft.ML package, due to the size of MKL. - /// If you need these calculations, add the Microsoft.ML.HalLearners package, and initialize - /// to the implementation in the Microsoft.ML.HalLearners package. + /// If you need these calculations, add the Microsoft.ML.Mkl.Components package, and initialize + /// to the implementation in the Microsoft.ML.Mkl.Components package. /// Due to the existence of regularization, an approximation is used to compute the variances of the trained linear coefficients. /// public abstract VBuffer ComputeStd(double[] hessian, int[] weightIndices, int parametersCount, int currentWeightsCount, IChannel ch, float l2Weight); diff --git a/src/Native/build.proj b/src/Native/build.proj index 0ecba6deea..0d12196c26 100644 --- a/src/Native/build.proj +++ b/src/Native/build.proj @@ -90,7 +90,7 @@ + RelativePath="Microsoft.ML.Mkl.Components\runtimes\$(PackageRid)\native" /> - + diff --git a/test/Microsoft.ML.Core.Tests/UnitTests/TestEntryPoints.cs b/test/Microsoft.ML.Core.Tests/UnitTests/TestEntryPoints.cs index 746e0fd16d..b32708754c 100644 --- a/test/Microsoft.ML.Core.Tests/UnitTests/TestEntryPoints.cs +++ b/test/Microsoft.ML.Core.Tests/UnitTests/TestEntryPoints.cs @@ -22,7 +22,6 @@ using Microsoft.ML.Trainers; using Microsoft.ML.Trainers.Ensemble; using Microsoft.ML.Trainers.FastTree; -using Microsoft.ML.Trainers.HalLearners; using Microsoft.ML.Transforms; using Microsoft.ML.Transforms.Text; using Microsoft.ML.Transforms.TimeSeries; @@ -1326,7 +1325,7 @@ public void EntryPointPipelineEnsembleGetSummary() NormalizeFeatures = NormalizeOption.Yes, NumThreads = 1, ShowTrainingStats = true, - StdComputer = new ComputeLRTrainingStdThroughHal() + StdComputer = new ComputeLRTrainingStdThroughMkl() }; predictorModels[i] = LogisticRegression.TrainBinary(Env, lrInput).PredictorModel; var transformModel = new TransformModelImpl(Env, data, splitOutput.TrainData[i]); @@ -3323,7 +3322,7 @@ public void EntryPointLinearPredictorSummary() NormalizeFeatures = NormalizeOption.Yes, NumThreads = 1, ShowTrainingStats = true, - StdComputer = new ComputeLRTrainingStdThroughHal() + StdComputer = new ComputeLRTrainingStdThroughMkl() }; var model = LogisticRegression.TrainBinary(Env, lrInput).PredictorModel; diff --git a/test/Microsoft.ML.Functional.Tests/Microsoft.ML.Functional.Tests.csproj b/test/Microsoft.ML.Functional.Tests/Microsoft.ML.Functional.Tests.csproj index 61cab872b8..6d5b61350d 100644 --- a/test/Microsoft.ML.Functional.Tests/Microsoft.ML.Functional.Tests.csproj +++ b/test/Microsoft.ML.Functional.Tests/Microsoft.ML.Functional.Tests.csproj @@ -10,7 +10,7 @@ - + diff --git a/test/Microsoft.ML.Functional.Tests/Validation.cs b/test/Microsoft.ML.Functional.Tests/Validation.cs index 588243fc20..68049e0010 100644 --- a/test/Microsoft.ML.Functional.Tests/Validation.cs +++ b/test/Microsoft.ML.Functional.Tests/Validation.cs @@ -7,7 +7,7 @@ using Microsoft.ML.RunTests; using Microsoft.ML.TestFramework; using Microsoft.ML.Trainers.FastTree; -using Microsoft.ML.Trainers.HalLearners; +using Microsoft.ML.Trainers; using Xunit; namespace Microsoft.ML.Functional.Tests diff --git a/test/Microsoft.ML.Predictor.Tests/Microsoft.ML.Predictor.Tests.csproj b/test/Microsoft.ML.Predictor.Tests/Microsoft.ML.Predictor.Tests.csproj index 50abe5ee21..1717f87de8 100644 --- a/test/Microsoft.ML.Predictor.Tests/Microsoft.ML.Predictor.Tests.csproj +++ b/test/Microsoft.ML.Predictor.Tests/Microsoft.ML.Predictor.Tests.csproj @@ -4,7 +4,7 @@ - + diff --git a/test/Microsoft.ML.Predictor.Tests/TestPredictors.cs b/test/Microsoft.ML.Predictor.Tests/TestPredictors.cs index 8e6156634f..796a32e42f 100644 --- a/test/Microsoft.ML.Predictor.Tests/TestPredictors.cs +++ b/test/Microsoft.ML.Predictor.Tests/TestPredictors.cs @@ -20,7 +20,6 @@ namespace Microsoft.ML.RunTests using Microsoft.ML.TestFramework; using Microsoft.ML.Trainers; using Microsoft.ML.Trainers.FastTree; - using Microsoft.ML.Trainers.HalLearners; using Xunit; using Xunit.Abstractions; using TestLearners = TestLearnersBase; diff --git a/test/Microsoft.ML.StaticPipelineTesting/Microsoft.ML.StaticPipelineTesting.csproj b/test/Microsoft.ML.StaticPipelineTesting/Microsoft.ML.StaticPipelineTesting.csproj index ce9770535a..ae2a57565c 100644 --- a/test/Microsoft.ML.StaticPipelineTesting/Microsoft.ML.StaticPipelineTesting.csproj +++ b/test/Microsoft.ML.StaticPipelineTesting/Microsoft.ML.StaticPipelineTesting.csproj @@ -4,8 +4,8 @@ - - + + diff --git a/test/Microsoft.ML.StaticPipelineTesting/StaticPipeTests.cs b/test/Microsoft.ML.StaticPipelineTesting/StaticPipeTests.cs index 0177fb350e..0c6fb3c510 100644 --- a/test/Microsoft.ML.StaticPipelineTesting/StaticPipeTests.cs +++ b/test/Microsoft.ML.StaticPipelineTesting/StaticPipeTests.cs @@ -11,7 +11,7 @@ using Microsoft.Data.DataView; using Microsoft.ML.Data; using Microsoft.ML.Data.IO; -using Microsoft.ML.HalLearners.StaticPipe; +using Microsoft.ML.Mkl.Components.StaticPipe; using Microsoft.ML.Internal.Utilities; using Microsoft.ML.RunTests; using Microsoft.ML.StaticPipe; diff --git a/test/Microsoft.ML.Tests/Microsoft.ML.Tests.csproj b/test/Microsoft.ML.Tests/Microsoft.ML.Tests.csproj index be0dec9ffa..383e0aef24 100644 --- a/test/Microsoft.ML.Tests/Microsoft.ML.Tests.csproj +++ b/test/Microsoft.ML.Tests/Microsoft.ML.Tests.csproj @@ -9,7 +9,7 @@ - + diff --git a/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/SimpleTrainAndPredict.cs b/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/SimpleTrainAndPredict.cs index a6366365a0..c72a2d7f76 100644 --- a/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/SimpleTrainAndPredict.cs +++ b/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/SimpleTrainAndPredict.cs @@ -6,7 +6,6 @@ using Microsoft.ML.Data; using Microsoft.ML.RunTests; using Microsoft.ML.Trainers; -using Microsoft.ML.Trainers.HalLearners; using Xunit; namespace Microsoft.ML.Tests.Scenarios.Api diff --git a/test/Microsoft.ML.Tests/TrainerEstimators/LbfgsTests.cs b/test/Microsoft.ML.Tests/TrainerEstimators/LbfgsTests.cs index 2ba1e4dda7..0bb2c6b064 100644 --- a/test/Microsoft.ML.Tests/TrainerEstimators/LbfgsTests.cs +++ b/test/Microsoft.ML.Tests/TrainerEstimators/LbfgsTests.cs @@ -77,7 +77,7 @@ public void TestLogisticRegressionWithStats() new LogisticRegression.Options { ShowTrainingStats = true, - StdComputer = new ComputeLRTrainingStdThroughHal(), + StdComputer = new ComputeLRTrainingStdThroughMkl(), })); var transformer = pipe.Fit(dataView) as TransformerChain>>; diff --git a/test/Microsoft.ML.Tests/TrainerEstimators/OlsLinearRegressionTests.cs b/test/Microsoft.ML.Tests/TrainerEstimators/OlsLinearRegressionTests.cs index edcb2b8124..df1cb9a0a5 100644 --- a/test/Microsoft.ML.Tests/TrainerEstimators/OlsLinearRegressionTests.cs +++ b/test/Microsoft.ML.Tests/TrainerEstimators/OlsLinearRegressionTests.cs @@ -3,7 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Collections.Generic; -using Microsoft.ML.Trainers.HalLearners; +using Microsoft.ML.Trainers; using Xunit; namespace Microsoft.ML.Tests.TrainerEstimators diff --git a/test/Microsoft.ML.Tests/TrainerEstimators/SymSgdClassificationTests.cs b/test/Microsoft.ML.Tests/TrainerEstimators/SymSgdClassificationTests.cs index 054203725c..4074049b07 100644 --- a/test/Microsoft.ML.Tests/TrainerEstimators/SymSgdClassificationTests.cs +++ b/test/Microsoft.ML.Tests/TrainerEstimators/SymSgdClassificationTests.cs @@ -4,7 +4,7 @@ using System.Linq; using Microsoft.ML.Data; -using Microsoft.ML.Trainers.HalLearners; +using Microsoft.ML.Trainers; using Xunit; namespace Microsoft.ML.Tests.TrainerEstimators