docs icon indicating copy to clipboard operation
docs copied to clipboard

Getting Full code from Model Builder

Open NarwhalRoger opened this issue 3 years ago • 2 comments
trafficstars

Hello

I am working in ML.NET to create a image classification model, and I got interested in the Model Builder code consumption. I have used the Model Builder to train a simple model and then consumed it to get a generated code in C# console form. As I understood when consuming the Model Builder generates 4 files: consumption file, training file, zip file with the actual model, and the main program.cs file. When launched, the program executes program.cs file which invokes consumption file which gets data for the model from zip file. So training file is not used in its default state and is present only for possibility of retraining the model in future.

I am curious about getting the code for the program which created the zip file, namely the original pipeline training algorithm, which transforms data, chooses the classification algorithm/method, performs training and saves the model. Is it possible to get this code? Retraining the model is not an option for me because I want to generate lots of small concrete models, rather than having one huge universal model.

I couldn't find any function that actually creates new model saves it to zip file.

Correct me please, if I am wrong

Thanks in advance

NarwhalRoger avatar Jul 18 '22 15:07 NarwhalRoger

@luisquintanilla Can you take a look at this question?

gewarren avatar Jul 25 '22 21:07 gewarren

Hi @NarwhalRoger

Model Builder is powered by our AutoML API. Here's a few sample notebook showing how to use it.

https://github.com/dotnet/csharp-notebooks/blob/main/machine-learning/03-Training%20and%20AutoML.ipynb

https://github.com/dotnet/csharp-notebooks/blob/main/machine-learning/E2E-Classification%20with%20Iris%20Dataset.ipynb

Hope this helps.

luisquintanilla avatar Jul 29 '22 12:07 luisquintanilla