如何安装 ML.NET 模型生成器How to install ML.NET Model Builder

了解如何安装 ML.NET 模型生成器以将机器学习添加到 .NET 应用程序。Learn how to install ML.NET Model Builder to add machine learning to your .NET applications.

备注

模型生成器当前为预览版。Model Builder is currently in Preview.

系统必备Prerequisites

  • Visual Studio 2017 版本 15.9.12 或更高版本/Visual Studio 2019Visual Studio 2017 version 15.9.12 or later / Visual Studio 2019
  • .NET Core 2.1 SDK 或更高版本。.NET Core 2.1 SDK or later.

备注

暂不支持 .NET Core 3.0 SDK。.NET Core 3.0 SDK is not currently supported.

限制Limitations

  • ML.NET 模型生成器扩展目前仅适用于 Windows 上的 Visual Studio。ML.NET Model Builder Extension currently only works on Visual Studio on Windows.
  • 1 GB 的训练数据集限制Training dataset limit of 1GB
  • SQL Server 在训练用途上有 100,000 行的限制SQL Server has a limit of 100 thousand rows for training
  • 不支持适用于 Visual Studio 2017 的 Microsoft SQL Server Data ToolsMicrosoft SQL Server Data Tools for Visual Studio 2017 is not supported

安装Install

可通过 Visual Studio Marketplace 或从 Visual Studio 中安装 ML.NET 模型生成器。ML.NET Model builder can be installed either through the Visual Studio Marketplace or from within Visual Studio.

Visual Studio MarketplaceVisual Studio Marketplace

  1. Visual Studio Marketplace 中下载Download from Visual Studio Marketplace
  2. 按照提示安装到相应的 Visual Studio 版本上Follow prompts to install onto respective Visual Studio version

Visual Studio 2017Visual Studio 2017

  1. 从菜单栏选择“工具” > “扩展和更新” In the menu bar, select Tools > Extensions and Updates

    VS2017 打开“扩展管理器”对话框

  2. 在“扩展和更新”提示符中选择“联机”节点 。Inside the Extension and Updates prompt, select the Online node.

  3. 在搜索栏中搜索“ML.NET 模型生成器”,并在搜索结果中选择 ML.NET 模型搜索器(预览版) In the search bar, search for ML.NET Model Builder and from the results, select ML.NET Model Builder (Preview)

    VS2017 从“扩展管理器”对话框中搜索并安装“模型生成器”扩展

  4. 按照提示完成安装Follow the prompts to complete the installation

Visual Studio 2019Visual Studio 2019

  1. 从菜单栏选择“扩展” > “管理扩展” On the menu bar, select Extensions > Manage Extensions

    VS2019 打开“扩展管理器”对话框

  2. 在“扩展和更新”提示符中选择“联机”节点 。Inside the Extension and Updates prompt, select the Online node.

  3. 在搜索栏中键入“ML.NET 模型生成器”并选择 ML.NET 模型生成器(预览版) Type ML.NET Model Builder into the search bar select ML.NET Model Builder (Preview)

    VS2019 从“扩展管理器”对话框中搜索并安装“模型生成器”扩展

  4. 按照提示完成安装Follow the prompts to complete the installation

卸载Uninstall

Visual Studio 2017Visual Studio 2017

  1. 从菜单栏选择“工具” > “扩展和更新” On the menu bar, select Tools > Extensions and Updates

    VS2017 打开“管理扩展”对话框

  2. 在“扩展和更新”提示窗口中展开“已安装”节点并选择“工具”节点 Inside the Extension and Updates prompt, expand the Installed node and select Tools

  3. 从工具列表中选择 ML.NET 模型生成器(预览版),然后选择“卸载” Select ML.NET Model Builder (Preview) from the list of tools and then, select Uninstall

    VS2017 从“扩展管理器”对话框中搜索并卸载“模型生成器”扩展

  4. 按照提示完成卸载。Follow the prompts to complete the uninstallation.

Visual Studio 2019Visual Studio 2019

  1. 从菜单栏选择“扩展” > “管理扩展” On the menu bar, select Extensions > Manage Extensions

    VS2019 打开“管理扩展”对话框

  2. 在“扩展和更新”提示窗口中展开“已安装”节点并选择“工具”节点 Inside the Extension and Updates prompt, expand the Installed node and select Tools

  3. 从工具列表中选择 ML.NET 模型生成器(预览版),然后选择“卸载” Select ML.NET Model Builder (Preview) from the list of tools and then, select Uninstall

    VS2019 从“扩展管理器”对话框中搜索并卸载“模型生成器”扩展

  4. 按照提示完成卸载。Follow the prompts to complete the uninstallation.

UpgradeUpgrade

升级流程与安装流程类似。The upgrade process is similar to the installation process. 可以从 Visual Studio Marketplace 中下载最新版本,或者使用 Visual Studio 中的扩展管理器进行升级。Either download the latest version from Visual Studio Marketplace or use the Extensions Manager in Visual Studio.