您现在访问的是微软AZURE全球版技术文档网站,若需要访问由世纪互联运营的MICROSOFT AZURE中国区技术文档网站,请访问 https://docs.azure.cn.

在 Azure 门户中创建和管理 Azure 机器学习服务工作区Create and manage Azure Machine Learning service workspaces in the Azure portal

本文将介绍如何在 Azure 门户中针对 Azure 机器学习服务创建、查看和删除 Azure 机器学习服务工作区In this article, you'll create, view, and delete Azure Machine Learning service workspaces in the Azure portal for Azure Machine Learning service. 门户是开始使用工作区的最简单方法,但随着需求的更改或自动化的要求增加,你还可以使用通过使用 Python 代码通过 VS Code 扩展来创建和删除工作区。The portal is the easiest way to get started with workspaces but as your needs change or requirements for automation increase you can also create and delete workspaces using the CLI, with Python code or via the VS Code extension.

创建工作区Create a workspace

必须有 Azure 订阅,才能创建工作区。To create a workspace, you need an Azure subscription. 如果还没有 Azure 订阅,请在开始前创建免费帐户。If you don’t have an Azure subscription, create a free account before you begin. 立即试用 Azure 机器学习服务免费版或付费版Try the free or paid version of Azure Machine Learning service today.

  1. 使用将所使用的 Azure 订阅的凭据登录到 Azure 门户Sign in to the Azure portal by using the credentials for the Azure subscription you use.

  2. 在 Azure 门户的左上角,选择“+ 创建资源” 。In the upper-left corner of Azure portal, select + Create a resource.

    创建新资源

  3. 使用搜索栏查找“机器学习服务工作区” 。Use the search bar to find Machine Learning service workspace.

  4. 选择“机器学习服务工作区” 。Select Machine Learning service workspace.

  5. 在“机器学习服务工作区”窗格中,选择“创建”以开始 。In the Machine Learning service workspace pane, select Create to begin.

  6. 提供以下信息来配置新工作区:Provide the following information to configure your new workspace:

    字段Field 说明Description
    工作区名称Workspace name 输入用于标识工作区的唯一名称。Enter a unique name that identifies your workspace. 本示例使用 docs-ws 。In this example, we use docs-ws. 名称在整个资源组中必须唯一。Names must be unique across the resource group. 使用易于记忆且区别于其他人所创建工作区的名称。Use a name that's easy to recall and to differentiate from workspaces created by others.
    SubscriptionSubscription 选择要使用的 Azure 订阅。Select the Azure subscription that you want to use.
    Resource groupResource group 使用订阅中的现有资源组,或者输入一个名称以创建新的资源组。Use an existing resource group in your subscription or enter a name to create a new resource group. 资源组保存 Azure 解决方案的相关资源。A resource group holds related resources for an Azure solution. 本示例使用 docs-aml 。In this example, we use docs-aml.
    位置Location 选择离你的用户和数据资源最近的位置来创建工作区。Select the location closest to your users and the data resources to create your workspace.
  7. 完成工作区配置后,选择“创建” 。After you are finished configuring the workspace, select Create.

    警告

    在云中创建工作区可能需要几分钟时间。It can take a several minutes to create your workspace in the cloud.

    完成创建后,会显示部署成功消息。When the process is finished, a deployment success message appears.

  8. 若要查看新工作区,请选择“转到资源” 。To view the new workspace, select Go to resource.

下载配置文件Download a configuration file

  1. 如果要创建笔记本 VM,请跳过此步骤。If you will be creating a Notebook VM, skip this step.

  2. 如果计划使用引用此工作区的本地环境中的代码,请从工作区的“概述”部分中选择“下载 config.json”。If you plan to use code on your local environment that references this workspace, select Download config.json from the Overview section of the workspace.

    下载 config.json

    使用 Python 脚本或 Jupyter Notebook 将此文件放入到目录结构中。Place the file into the directory structure with your Python scripts or Jupyter Notebooks. 它可以位于同一目录(名为 .azureml 的子目录)中,也可以位于父目录中。It can be in the same directory, a subdirectory named .azureml, or in a parent directory. 创建笔记本 VM 时,会将此文件添加到 VM 上的正确目录。When you create a Notebook VM, this file is added to the correct directory on the VM for you.

查看工作区View a workspace

  1. 选择门户左上角的“所有服务”。In top left corner of the portal, select All services.

  2. 在 "所有服务" 筛选器字段中,键入 "机器学习服务"。In the All services filter field, type machine learning service.

  3. 选择机器学习服务工作区Select Machine Learning service workspaces.

    搜索 Azure 机器学习服务工作区

  4. 浏览筛选出的工作区列表。Look through the list of workspaces found. 筛选依据可包括订阅、资源组和位置。You can filter based on subscription, resource groups, and locations.

  5. 选择要显示其属性的工作区。Select a workspace to display its properties. 工作区属性Workspace properties

创建工作区Delete a workspace

单击要删除的工作区顶部的“删除”按钮。Use the Delete button at the top of the workspace you wish to delete.

“删除”按钮

清理资源Clean up resources

重要

已创建的资源可以用作其他 Azure 机器学习服务教程和操作方法文章的先决条件。The resources you created can be used as prerequisites to other Azure Machine Learning service tutorials and how-to articles.

如果不打算使用已创建的资源,请删除它们,以免产生任何费用:If you don't plan to use the resources you created, delete them, so you don't incur any charges:

  1. 在 Azure 门户中,选择最左侧的“资源组” 。In the Azure portal, select Resource groups on the far left.

    在 Azure 门户中删除Delete in the Azure portal

  2. 从列表中选择已创建的资源组。From the list, select the resource group you created.

  3. 选择“删除资源组” 。Select Delete resource group.

  4. 输入资源组名称。Enter the resource group name. 然后选择“删除” 。Then select Delete.

后续步骤Next steps

学习整个教程,了解如何通过 Azure 机器学习服务使用工作区来生成、定型和部署模型。Follow the full-length tutorial to learn how to use a workspace to build, train, and deploy models with Azure Machine Learning service.