dotnet / dotnet/machinelearning-modelbuilder

[Proposal] Convert ONNX to ML.NET model in Visual Studio

Aperta
#2,059 4 commenti 5 reazioni 0 assegnatari Vedi su GitHub
Feature request Stale
Lingua principale
Dockerfile
Stelle
285
Fork
66
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

## Problem

To use an ONNX model with ML.NET, you create a pipeline that includes the `ApplyOnnxModel` transform. The pipeline then needs to be converted into an `ITransformer` before using the model to make predictions. Therefore, every time you use the model to make predictions, you have to call the `Fit` transform. The challenge with that is now instead of loading the model and calling `Predict` or `Transform`, you have to also generate the `ITransformer`. Unless the application the model is being used in is a console application, you have to create a separate console app or a notebook just to convert the ONNX model into ML.NET.

```csharp
var onxxModelPipeline =
// pre-processing transforms
.Append(ctx.Model.ApplyOnnxModel("outputColName", "inputColName", "model.onnx")
// post-processing transforms

var model = onnxModelPipeline.Fit(emptyIdv);
```

As a result, it's recommended to save the `ITransformer` as an ML.NET model so you can use it just like any other ML.NET model.

## Proposal

In Visual Studio, when I right-click on an ONNX model file, I'd like the option "Convert to ML.NET". In the background, a process takes my model, creates an ML.NET pipeline with the default input and output columns specified by the ONNX model and saves the ML.NET pipeline to my project.

## Things to consider

- Conversion would not include pre-processing and post-processing steps.
- Would the user have control over the input / output columns?

## Related Issues

- [x] #1870
- [x] #1182

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

L’issue inizialmente non indica file, test o punti di ingresso. Chiarisci innanzitutto la posizione dell’integrazione di Visual Studio e il workflow di conversione, comprese le colonne di input e output predefinite o controllate dall’utente; il completamento significa che un file ONNX può essere convertito in un modello ML.NET salvato senza pre-elaborazione o post-elaborazione.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
csharp
Ambito
machine-learning, tooling
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.