Skip to content
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

Update release for 0.11 #2861

Merged
merged 4 commits into from
Mar 5, 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
40 changes: 40 additions & 0 deletions docs/release-notes/0.11/release-0.11.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# ML.NET 0.11 Release Notes

[ML.NET](https://aka.ms/mlnet) 0.11 will be the last preview release before we reach `Release Candidate` for v1. We continue to push for creating a coherent and clean API surface for [ML.NET](https://aka.ms/mlnet) users. This release includes several bug fixes as well as extensive work on reducing the public API surface. The work on the API is tracked via [this project](https://github.com/dotnet/machinelearning/projects/13). In the upcoming 0.12 (RC1) releases before we reach 1.0, we will continue on refining the API and improving documentation.

### Installation

ML.NET supports Windows, MacOS, and Linux. See [supported OS versions of .NET Core 2.0](https://github.com/dotnet/core/blob/master/release-notes/2.0/2.0-supported-os.md) for more details.

You can install ML.NET NuGet from the CLI using:
```
dotnet add package Microsoft.ML
```

From package manager:
```
Install-Package Microsoft.ML
```

### Release Notes

Below are a few of the highlights from this release. There are many other improvements in the API.

* Creation of components through MLContext: advanced options and other feedback. ([#1798](https://github.coalsom/dotnet/machinelearning/issues/1798))
* Several issues closed on internalizing public surface. ([19 issues](https://github.com/dotnet/machinelearning/issues?q=is%3Aissue+lockdown+is%3Aclosed))
* Stop using MEF as part of the public API. ([#2422](https://github.com/dotnet/machinelearning/issues/2422))
* Several `NameSpace` changes. ([#2326](https://github.com/dotnet/machinelearning/issues/2326))
* `ONNX` is now `ONNXConverter`. ([#2625](https://github.com/dotnet/machinelearning/pull/2625))
* `ONNXTransform` is now `ONNXTransformer`. ([#2544](https://github.com/dotnet/machinelearning/pull/2544))
* `FastTree` has it's own package now. ([#2752](https://github.com/dotnet/machinelearning/issues/2752))
* `Ensemble` has been moved out of `Microsoft.ML` package. ([#2717](https://github.com/dotnet/machinelearning/issues/2717))
* Add support for string types in TensorFlowTransformer. ([#2545](https://github.com/dotnet/machinelearning/issues/2545))
* Make FastTree/LightGBM learned model suitable for public consumption. ([#1960](https://github.com/dotnet/machinelearning/issues/1960))


### Acknowledgements

Shoutout to [PaulTFreedman](https://github.com/PaulTFreedman),
[kant2002](https://github.com/kant2002),
[jwood803](https://github.com/jwood803), [mareklinka](https://github.com/mareklinka), [elbruno](https://github.com/elbruno) and the [ML.NET](https://aka.ms/mlnet) team for their
contributions as part of this release!
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;
using Microsoft.ML.Data;
using Microsoft.ML.Transforms.Conversions;
using Microsoft.ML.Transforms;

namespace Microsoft.ML.Samples.Dynamic
{
Expand Down
2 changes: 1 addition & 1 deletion docs/samples/Microsoft.ML.Samples/Dynamic/Normalizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using Microsoft.ML.Data;
using Microsoft.ML.Transforms.Normalizers;
using Microsoft.ML.Transforms;

namespace Microsoft.ML.Samples.Dynamic
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public static void Example()
//0.165 0.117 -0.547 0.014

// A pipeline to project Features column into L-p normalized vector.
var lpNormalizePipeline = ml.Transforms.Projection.LpNormalize(nameof(SamplesUtils.DatasetUtils.SampleVectorOfNumbersData.Features), normKind: Transforms.Projections.LpNormalizingEstimatorBase.NormalizerKind.L1Norm);
var lpNormalizePipeline = ml.Transforms.Projection.LpNormalize(nameof(SamplesUtils.DatasetUtils.SampleVectorOfNumbersData.Features), normKind: Transforms.LpNormalizingEstimatorBase.NormalizerKind.L1Norm);
// The transformed (projected) data.
transformedData = lpNormalizePipeline.Fit(trainData).Transform(trainData);
// Getting the data of the newly created column, so we can preview it.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Microsoft.ML;
using Microsoft.ML.Trainers.Online;
using Microsoft.ML.Trainers;

namespace Microsoft.ML.Samples.Dynamic.Trainers.BinaryClassification
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Linq;
using Microsoft.ML.Data;
using Microsoft.ML.Trainers.FactorizationMachine;
using Microsoft.ML.Trainers;

namespace Microsoft.ML.Samples.Dynamic
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Microsoft.ML.Transforms.Categorical;
using Microsoft.ML.Transforms;

namespace Microsoft.ML.Samples.Dynamic.Trainers.BinaryClassification
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
using System;
using Microsoft.ML.Data;

namespace Microsoft.ML.Samples.Dynamic
{
public static class ConvertType
{
private sealed class InputData
{
public bool Survived;
}

private sealed class TransformedData
{
public bool Survived { get; set; }

public Int32 SurvivedInt32 { get; set; }
}

public static void Example()
{
var mlContext = new MLContext(seed: 1, conc: 1);
var rawData = new[] {
new InputData() { Survived = true },
new InputData() { Survived = false },
new InputData() { Survived = true },
new InputData() { Survived = false },
new InputData() { Survived = false },
};

var data = mlContext.Data.LoadFromEnumerable(rawData);

// Construct the pipeline.
var pipeline = mlContext.Transforms.Conversion.ConvertType("SurvivedInt32", "Survived", DataKind.Int32);

// Let's train our pipeline, and then apply it to the same data.
var transformer = pipeline.Fit(data);
var transformedData = transformer.Transform(data);

// Display original column 'Survived' (boolean) and converted column 'SurvivedInt32' (Int32)
var convertedData = mlContext.Data.CreateEnumerable<TransformedData>(transformedData, true);
foreach (var item in convertedData)
{
Console.WriteLine("A:{0,-10} Aconv:{1}", item.Survived, item.SurvivedInt32);
}

// Output
// A: True Aconv:1
// A: False Aconv:0
// A: True Aconv:1
// A: False Aconv:0
// A: False Aconv:0
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public static void Example()

// A pipeline to project Features column into white noise vector.
var whiteningPipeline = ml.Transforms.Projection.VectorWhiten(nameof(SamplesUtils.DatasetUtils.SampleVectorOfNumbersData.Features),
kind: Transforms.Projections.WhiteningKind.Zca);
kind: Transforms.WhiteningKind.Zca);
// The transformed (projected) data.
var transformedData = whiteningPipeline.Fit(trainData).Transform(trainData);
// Getting the data of the newly created column, so we can preview it.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ public static void Example()


// A pipeline to project Features column into white noise vector.
var whiteningPipeline = ml.Transforms.Projection.VectorWhiten(new Transforms.Projections.VectorWhiteningEstimator.ColumnOptions(
nameof(SamplesUtils.DatasetUtils.SampleVectorOfNumbersData.Features), kind: Transforms.Projections.WhiteningKind.Pca, pcaNum: 4));
var whiteningPipeline = ml.Transforms.Projection.VectorWhiten(new Transforms.VectorWhiteningEstimator.ColumnOptions(
nameof(SamplesUtils.DatasetUtils.SampleVectorOfNumbersData.Features), kind: Transforms.WhiteningKind.Pca, pcaNum: 4));
// The transformed (projected) data.
var transformedData = whiteningPipeline.Fit(trainData).Transform(trainData);
// Getting the data of the newly created column, so we can preview it.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
using System;
using System.Collections.Generic;
using Microsoft.Data.DataView;
using Microsoft.ML.Data;
using Microsoft.ML.Transforms.Conversions;

namespace Microsoft.ML.Samples.Dynamic
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
using System;
using System.Collections.Generic;
using Microsoft.Data.DataView;
using Microsoft.ML.Data;
using Microsoft.ML.Transforms.Conversions;

namespace Microsoft.ML.Samples.Dynamic
{
Expand Down
1 change: 0 additions & 1 deletion src/Microsoft.ML.Data/Commands/CrossValidationCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
using Microsoft.ML.Data;
using Microsoft.ML.Internal.Utilities;
using Microsoft.ML.Transforms;
using Microsoft.ML.Transforms.Conversions;

[assembly: LoadableClass(typeof(CrossValidationCommand), typeof(CrossValidationCommand.Arguments), typeof(SignatureCommand),
"Cross Validation", CrossValidationCommand.LoadName)]
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.ML.Data/Commands/TrainCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
using Microsoft.ML.Data.IO;
using Microsoft.ML.Internal.Utilities;
using Microsoft.ML.Model;
using Microsoft.ML.Transforms.Normalizers;
using Microsoft.ML.Transforms;

[assembly: LoadableClass(TrainCommand.Summary, typeof(TrainCommand), typeof(TrainCommand.Arguments), typeof(SignatureCommand),
"Train Predictor", "Train")]
Expand Down
8 changes: 4 additions & 4 deletions src/Microsoft.ML.Data/Data/Conversion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1642,10 +1642,10 @@ public void Convert(in TX src, ref SB dst)
#endregion FromTX

#region FromBL
public void Convert(in BL src, ref I1 dst) => dst = (I1)(object)src;
public void Convert(in BL src, ref I2 dst) => dst = (I2)(object)src;
public void Convert(in BL src, ref I4 dst) => dst = (I4)(object)src;
public void Convert(in BL src, ref I8 dst) => dst = (I8)(object)src;
public void Convert(in BL src, ref I1 dst) => dst = System.Convert.ToSByte(src);
public void Convert(in BL src, ref I2 dst) => dst = System.Convert.ToInt16(src);
public void Convert(in BL src, ref I4 dst) => dst = System.Convert.ToInt32(src);
public void Convert(in BL src, ref I8 dst) => dst = System.Convert.ToInt64(src);
public void Convert(in BL src, ref R4 dst) => dst = System.Convert.ToSingle(src);
public void Convert(in BL src, ref R8 dst) => dst = System.Convert.ToDouble(src);
public void Convert(in BL src, ref BL dst) => dst = src;
Expand Down
3 changes: 1 addition & 2 deletions src/Microsoft.ML.Data/Evaluators/ClusteringEvaluator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@
using Microsoft.ML.Data;
using Microsoft.ML.EntryPoints;
using Microsoft.ML.Internal.Utilities;
using Microsoft.ML.Model;
using Microsoft.ML.Numeric;
using Microsoft.ML.Transforms.FeatureSelection;
using Microsoft.ML.Transforms;

[assembly: LoadableClass(typeof(ClusteringEvaluator), typeof(ClusteringEvaluator), typeof(ClusteringEvaluator.Arguments), typeof(SignatureEvaluator),
"Clustering Evaluator", ClusteringEvaluator.LoadName, "Clustering")]
Expand Down
1 change: 0 additions & 1 deletion src/Microsoft.ML.Data/Evaluators/EvaluatorUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
using Microsoft.ML.Data.IO;
using Microsoft.ML.Internal.Utilities;
using Microsoft.ML.Transforms;
using Microsoft.ML.Transforms.Conversions;

namespace Microsoft.ML.Data
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
using Microsoft.ML.Data;
using Microsoft.ML.EntryPoints;
using Microsoft.ML.Internal.Utilities;
using Microsoft.ML.Model;
using Microsoft.ML.Transforms;
using Microsoft.ML.Transforms.FeatureSelection;

[assembly: LoadableClass(typeof(MultiClassClassifierEvaluator), typeof(MultiClassClassifierEvaluator), typeof(MultiClassClassifierEvaluator.Arguments), typeof(SignatureEvaluator),
"Multi-Class Classifier Evaluator", MultiClassClassifierEvaluator.LoadName, "MultiClassClassifier", "MultiClass")]
Expand Down
1 change: 0 additions & 1 deletion src/Microsoft.ML.Data/TrainCatalog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
using Microsoft.Data.DataView;
using Microsoft.ML.Data;
using Microsoft.ML.Transforms;
using Microsoft.ML.Transforms.Conversions;

namespace Microsoft.ML
{
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.ML.Data/Transforms/ColumnBindingsBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
using Microsoft.Data.DataView;
using Microsoft.ML.CommandLine;
using Microsoft.ML.Internal.Utilities;
using Microsoft.ML.Transforms.Conversions;
using Microsoft.ML.Transforms;

namespace Microsoft.ML.Data
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using System.Collections.Generic;
using Microsoft.Data.DataView;
using Microsoft.ML.Data;
using Microsoft.ML.Transforms.Conversions;
using Microsoft.ML.Transforms;

namespace Microsoft.ML
{
Expand Down Expand Up @@ -47,6 +47,12 @@ public static HashingEstimator Hash(this TransformsCatalog.ConversionTransforms
/// <param name="outputColumnName">Name of the column resulting from the transformation of <paramref name="inputColumnName"/>.</param>
/// <param name="inputColumnName">Name of the column to transform. If set to <see langword="null"/>, the value of the <paramref name="outputColumnName"/> will be used as source.</param>
/// <param name="outputKind">The expected kind of the output column.</param>
/// <example>
/// <format type="text/markdown">
/// <![CDATA[
/// [!code-csharp[ConvertType](~/../docs/samples/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/Conversion/ConvertType.cs)]
/// ]]></format>
/// </example>
public static TypeConvertingEstimator ConvertType(this TransformsCatalog.ConversionTransforms catalog, string outputColumnName, string inputColumnName = null,
DataKind outputKind = ConvertDefaults.DefaultOutputKind)
=> new TypeConvertingEstimator(CatalogUtils.GetEnvironment(catalog), outputColumnName, inputColumnName, outputKind);
Expand Down
1 change: 1 addition & 0 deletions src/Microsoft.ML.Data/Transforms/ExplainabilityCatalog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

using Microsoft.ML.Data;
using Microsoft.ML.Model;
using Microsoft.ML.Transforms;

namespace Microsoft.ML
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
using Microsoft.ML.CommandLine;
using Microsoft.ML.Data;
using Microsoft.ML.EntryPoints;
using Microsoft.ML.Internal.Internallearn;
using Microsoft.ML.Internal.Utilities;
using Microsoft.ML.Model;
using Microsoft.ML.Transforms;

[assembly: LoadableClass(FeatureContributionCalculatingTransformer.Summary, typeof(FeatureContributionCalculatingTransformer), null, typeof(SignatureLoadModel),
FeatureContributionCalculatingTransformer.FriendlyName, FeatureContributionCalculatingTransformer.LoaderSignature)]
Expand All @@ -22,7 +22,7 @@

[assembly: LoadableClass(typeof(void), typeof(FeatureContributionEntryPoint), null, typeof(SignatureEntryPointModule), FeatureContributionCalculatingTransformer.LoaderSignature)]

namespace Microsoft.ML.Data
namespace Microsoft.ML.Transforms
{
/// <summary>
/// The FeatureContributionCalculationTransformer computes model-specific per-feature contributions to the score of each example.
Expand Down
5 changes: 2 additions & 3 deletions src/Microsoft.ML.Data/Transforms/Hashing.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
using Microsoft.ML.CommandLine;
using Microsoft.ML.Data;
using Microsoft.ML.Internal.Utilities;
using Microsoft.ML.Model;
using Microsoft.ML.Transforms.Conversions;
using Microsoft.ML.Transforms;

[assembly: LoadableClass(HashingTransformer.Summary, typeof(IDataTransform), typeof(HashingTransformer), typeof(HashingTransformer.Options), typeof(SignatureDataTransform),
"Hash Transform", "HashTransform", "Hash", DocName = "transform/HashTransform.md")]
Expand All @@ -27,7 +26,7 @@
[assembly: LoadableClass(typeof(IRowMapper), typeof(HashingTransformer), null, typeof(SignatureLoadRowMapper),
"Hash Transform", HashingTransformer.LoaderSignature)]

namespace Microsoft.ML.Transforms.Conversions
namespace Microsoft.ML.Transforms
{
/// <summary>
/// This transformer can hash either single valued columns or vector columns. For vector columns,
Expand Down
1 change: 0 additions & 1 deletion src/Microsoft.ML.Data/Transforms/InvertHashUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
using Microsoft.Data.DataView;
using Microsoft.ML.Data.IO;
using Microsoft.ML.Internal.Utilities;
using Microsoft.ML.Model;

namespace Microsoft.ML.Data
{
Expand Down
5 changes: 2 additions & 3 deletions src/Microsoft.ML.Data/Transforms/KeyToValue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@
using Microsoft.ML.Data;
using Microsoft.ML.EntryPoints;
using Microsoft.ML.Internal.Utilities;
using Microsoft.ML.Model;
using Microsoft.ML.Model.Pfa;
using Microsoft.ML.Transforms.Conversions;
using Microsoft.ML.Transforms;
using Newtonsoft.Json.Linq;

[assembly: LoadableClass(typeof(IDataTransform), typeof(KeyToValueMappingTransformer), typeof(KeyToValueMappingTransformer.Options), typeof(SignatureDataTransform),
Expand All @@ -30,7 +29,7 @@
[assembly: LoadableClass(typeof(IRowMapper), typeof(KeyToValueMappingTransformer), null, typeof(SignatureLoadRowMapper),
KeyToValueMappingTransformer.UserName, KeyToValueMappingTransformer.LoaderSignature)]

namespace Microsoft.ML.Transforms.Conversions
namespace Microsoft.ML.Transforms
{
/// <summary>
/// KeyToValueTransform utilizes KeyValues metadata to map key indices to the corresponding values in the KeyValues metadata.
Expand Down
5 changes: 2 additions & 3 deletions src/Microsoft.ML.Data/Transforms/KeyToVector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@
using Microsoft.ML.CommandLine;
using Microsoft.ML.Data;
using Microsoft.ML.Internal.Utilities;
using Microsoft.ML.Model;
using Microsoft.ML.Model.OnnxConverter;
using Microsoft.ML.Model.Pfa;
using Microsoft.ML.Transforms.Conversions;
using Microsoft.ML.Transforms;
using Newtonsoft.Json.Linq;

[assembly: LoadableClass(KeyToVectorMappingTransformer.Summary, typeof(IDataTransform), typeof(KeyToVectorMappingTransformer), typeof(KeyToVectorMappingTransformer.Options), typeof(SignatureDataTransform),
Expand All @@ -29,7 +28,7 @@
[assembly: LoadableClass(typeof(IRowMapper), typeof(KeyToVectorMappingTransformer), null, typeof(SignatureLoadRowMapper),
KeyToVectorMappingTransformer.UserName, KeyToVectorMappingTransformer.LoaderSignature)]

namespace Microsoft.ML.Transforms.Conversions
namespace Microsoft.ML.Transforms
{
/// <summary>
/// Converts the key types back to their original vectors.
Expand Down
Loading