ML.NET Tutorial - Get started in 10 minutes

Download and install

Model Builder ships with Visual Studio version 16.6.1 and later versions when you install one of the .NET workloads.

  1. Open the Visual Studio Installer and Modify the instance of Visual Studio that you'd like to use with Model Builder.

  2. Check the optional ML.NET Model Builder (Preview) component in any of the .NET workloads (such as .NET Core cross-platform development).

  3. Model Builder component in Visual Studio Installer.


Enable Preview Feature

ML.NET Model Builder is currently a Preview feature. So, you must enable this Preview feature in Visual Studio in order to use the tool.

  1. In Visual Studio, go to Tools > Options > Environment > Preview Features.

  2. Check Enable ML.NET Model Builder.

  3. Enable Model Builder as a Preview Feature.

Note: If the tutorial screenshots do not match with what you see, you may need to update your version of Model Builder. Go to Extensions > Manage Extensions to make sure that there are no available updates for Model Builder. The most recent version is 16.3.0.2056001.

Install .NET SDK

To build .NET apps, you need to download and install the .NET Core 3.1 SDK (Software Development Kit).

Install ML.NET CLI

The ML.NET command-line interface (CLI), provides tools for building machine learning models with ML.NET.

Note: ML.NET CLI is currently in Preview.

Once you've installed the .NET SDK, open a new terminal and run the following command:

Command prompt
dotnet tool install -g mlnet

If the tool installs successfully, you should see the following output message:

Command prompt
You can invoke the tool using the following command: mlnet
Tool 'mlnet' (version '16.1.1') was successfully installed.

Note: If you're using a console other than Bash (for example, zsh, which is the new default for macOS), then you'll need to give mlnet executable permissions and include mlnet to the system path. Instructions on how to do this should appear in the terminal when you install mlnet (or any global tool).

Alternatively, you can try using the following command to run the mlnet tool:

Command prompt
~/.dotnet/tools/mlnet

If the command still gives you an error, use the I ran into an issue button below to report the issue and get help fixing the problem.

Continue