Repository navigation
Open
Labels
Priority:2Work that is important, but not critical for the releaseWork that is important, but not critical for the releasearea-AutoMLAutomated machine learning, Model Builder, and ML.NET CLIAutomated machine learning, Model Builder, and ML.NET CLIenhancementNew feature or requestNew feature or request
Milestone
Description
schema should contain all required information to generate both input/output class
Usage
-
add
model.zipasAdditionalFilesand setIsMLNetModeltotrue

-
mlnet generate both input and output class for project
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.ML;
using Microsoft.ML.Data;
namespace MLNetSourceGenerator.CodeGen
{
public class TitanicInput
{
[ColumnName(@"PassengerId")]
public float PassengerId {get; set;}
[ColumnName(@"Survived")]
public float Survived {get; set;}
[ColumnName(@"Pclass")]
public float Pclass {get; set;}
[ColumnName(@"Name")]
public string Name {get; set;}
[ColumnName(@"Sex")]
public string Sex {get; set;}
[ColumnName(@"Age")]
public float Age {get; set;}
[ColumnName(@"SibSp")]
public float SibSp {get; set;}
[ColumnName(@"Parch")]
public float Parch {get; set;}
[ColumnName(@"Ticket")]
public string Ticket {get; set;}
[ColumnName(@"Fare")]
public float Fare {get; set;}
[ColumnName(@"Cabin")]
public string Cabin {get; set;}
[ColumnName(@"Embarked")]
public string Embarked {get; set;}
}
public class TitanicOutput
{
[ColumnName(@"PassengerId")]
public float PassengerId {get; set;}
[ColumnName(@"Survived")]
public uint Survived {get; set;}
[ColumnName(@"Pclass")]
public float Pclass {get; set;}
[ColumnName(@"Name")]
public float[] Name {get; set;}
[ColumnName(@"Sex")]
public float[] Sex {get; set;}
[ColumnName(@"Age")]
public float Age {get; set;}
[ColumnName(@"SibSp")]
public float SibSp {get; set;}
[ColumnName(@"Parch")]
public float Parch {get; set;}
[ColumnName(@"Ticket")]
public float[] Ticket {get; set;}
[ColumnName(@"Fare")]
public float Fare {get; set;}
[ColumnName(@"Cabin")]
public float[] Cabin {get; set;}
[ColumnName(@"Embarked")]
public float[] Embarked {get; set;}
[ColumnName(@"Features")]
public float[] Features {get; set;}
[ColumnName(@"PredictedLabel")]
public float PredictedLabel {get; set;}
[ColumnName(@"Score")]
public float[] Score {get; set;}
}
}
Example
Reacted by Luis Quintanilla
Metadata
Metadata
Assignees
Labels
Priority:2Work that is important, but not critical for the releaseWork that is important, but not critical for the releasearea-AutoMLAutomated machine learning, Model Builder, and ML.NET CLIAutomated machine learning, Model Builder, and ML.NET CLIenhancementNew feature or requestNew feature or request
Activity
[-]Consider generating ModelInput/Output class from mlnet model via source generator?[/-][+]Consider providing a source generator to generate ModelInput/Output class?[/+]michaelgsharp commentedon Apr 27, 2022
I think this is something that would be good to do. Have you looked into this at all @LittleLittleCloud?
@luisquintanilla I'm going to add this to the future milestone. We can move it around as desired.
luisquintanilla commentedon Apr 27, 2022
Related to dotnet/machinelearning-modelbuilder#1973
luisquintanilla commentedon Apr 27, 2022
Thanks @michaelgsharp I agree to put this in Future milestone. One concern I'd have with Source Generators would be they're not available in F#.