Skip to content

Instantly share code, notes, and snippets.

View CESARDELATORRE's full-sized avatar

Cesar De la Torre CESARDELATORRE

  • Microsoft Corp
  • U.S.
View GitHub Profile
@CESARDELATORRE
CESARDELATORRE / mlnet-static-api-not-using-dataset-file.cs
Last active October 3, 2018 17:16
ML.NET static API loading traing DataSet NOT from a file
var dataReader = TextLoader.CreateReader(env,
c => (
CustomerId: c.LoadText(0),
ProductId: c.LoadText(1),
Quantity: c.LoadFloat(2),
Label: c.LoadBool(3)),
separator: ',', hasHeader: true);
FieldAwareFactorizationMachinePredictor pred = null;
var ctx = new BinaryClassificationContext(env);
There are many more breaking changes in 0.9, but these are the ones that mostly the ML.NET samples faced when moving to v0.9:
1. MakePredictionFunction() --> CreatePredictionEngine() --> Based on my original feedback and this [issue](https://github.com/dotnet/machinelearning/issues/1761), since it creates an object, not a function..
2. The type or namespace name 'Microsoft.ML.Runtime' does not exist in the namespace 'Microsoft.ML' (Error: are you missing an assembly reference?)
a. Data attributes are now in: using Microsoft.ML.Data;
b. TextLoader and other types moved to using Microsoft.ML.Data;
c. Related, removed:
using Microsoft.ML.Runtime.Learners;
@CESARDELATORRE
CESARDELATORRE / Breaking changes from ML.NET v0.9 to v0.10 impacting ML.NET Samples.md
Last active January 14, 2023 14:25
Breaking changes from ML.NET v0.9 to v0.10 impacting ML.NET Samples

The following are the breaking changes that were impacting the ML.NET samples (at https://github.com/dotnet/machinelearning-samples) when moving to v0.10:

  1. IDataView moved to a different NuGet package: a. Error: error CS0246: The type or namespace name 'IDataView' could not be found (are you missing a using directive or an assembly reference?) b. Fix: Add using Microsoft.Data.DataView; i. The new NuGet package is added automatically when using 0.10 version

  2. AsEnumerable() moved to mlContext.CreateEnumerable() a. Error: Severity Code Description Project File Line Suppression State