什么是 Azure 机器学习工作区?What is an Azure Machine Learning workspace?

工作区是 Azure 机器学习的顶级资源,为使用 Azure 机器学习时创建的所有项目提供了一个集中的处理位置。The workspace is the top-level resource for Azure Machine Learning, providing a centralized place to work with all the artifacts you create when you use Azure Machine Learning. 工作区保留所有训练运行的历史记录,包括日志、指标、输出和脚本快照。The workspace keeps a history of all training runs, including logs, metrics, output, and a snapshot of your scripts. 使用此信息可以确定哪个训练运行产生最佳模型。You use this information to determine which training run produces the best model.

拥有了所需的模型后,可将其注册到工作区。Once you have a model you like, you register it with the workspace. 然后,使用已注册的模型和评分脚本,将其部署到 Azure 容器实例、Azure Kubernetes 服务中或部署到现场可编程门阵列 (FPGA) 作为基于 REST 的 HTTP 终结点。You then use the registered model and scoring scripts to deploy to Azure Container Instances, Azure Kubernetes Service, or to a field-programmable gate array (FPGA) as a REST-based HTTP endpoint. 还可以将模型作为模块部署到 Azure IoT Edge 设备。You can also deploy the model to an Azure IoT Edge device as a module.

定价和可用的功能取决于为工作区选择了普通版还是企业版Pricing and features available depend on whether Basic or Enterprise edition is selected for the workspace. 创建工作区时需要选择版本。You select the edition when you create the workspace. 也可以从普通版升级到企业版。You can also upgrade from Basic to Enterprise edition.

分类Taxonomy

下图演示了工作区的分类:A taxonomy of the workspace is illustrated in the following diagram:

工作区分类Workspace taxonomy

此图显示了工作区的以下组件:The diagram shows the following components of a workspace:

  • 工作区可以包含 Azure 机器学习计算实例和配置了运行 Azure 机器学习所需的 Python 环境的云资源。A workspace can contain Azure Machine Learning compute instances, cloud resources configured with the Python environment necessary to run Azure Machine Learning.

  • 用户角色使你可以与其他用户、团队或项目共享你的工作区。User roles enable you to share your workspace with other users, teams or projects.

  • 计算目标用于运行试验。Compute targets are used to run your experiments.

  • 创建工作区的同时还会创建关联的资源When you create the workspace, associated resources are also created for you.

  • 试验是用于构建模型的训练用运行。Experiments are training runs you use to build your models.

  • 管道是可重复使用的工作流,用于训练和重新训练模型。Pipelines are reusable workflows for training and retraining your model.

  • 数据集帮助管理用于模型训练和管道创建的数据。Datasets aid in management of the data you use for model training and pipeline creation.

  • 有了要部署的模型后,需要创建一个已注册的模型。Once you have a model you want to deploy, you create a registered model.

  • 使用已注册的模型和评分脚本创建部署终结点Use the registered model and a scoring script to create a deployment endpoint.

用于进行工作区交互的工具Tools for workspace interaction

可以通过以下方式与工作区交互:You can interact with your workspace in the following ways:

使用工作区进行机器学习Machine learning with a workspace

机器学习任务将项目读取到和/或写入工作区。Machine learning tasks read and/or write artifacts to your workspace.

  • 运行试验以训练模型 - 将试验运行结果写入工作区。Run an experiment to train a model - writes experiment run results to the workspace.
  • 使用自动机器学习训练模型 - 将训练结果写入工作区。Use automated ML to train a model - writes training results to the workspace.
  • 在工作区中注册模型。Register a model in the workspace.
  • 部署模型 - 使用注册的模型来创建部署。Deploy a model - uses the registered model to create a deployment.
  • 创建并运行可重用的工作流。Create and run reusable workflows.
  • 查看机器学习项目,如试验、管道、模型和部署。View machine learning artifacts such as experiments, pipelines, models, deployments.
  • 跟踪和监视模型。Track and monitor models.

工作区管理Workspace management

还可以执行以下工作区管理任务:You can also perform the following workspace management tasks:

工作区管理任务Workspace management task 门户Portal 工作室Studio Python SDK / R SDKPython SDK / R SDK CLICLI
创建工作区Create a workspace
管理工作区访问权限Manage workspace access
升级到企业版Upgrade to Enterprise edition
创建和管理计算资源Create and manage compute resources
创建笔记本 VMCreate a Notebook VM

警告

不支持将 Azure 机器学习工作区移动到另一个订阅,或将拥有的订阅移到新租户。Moving your Azure Machine Learning workspace to a different subscription, or moving the owning subscription to a new tenant, is not supported. 这样做可能会导致错误。Doing so may cause errors.

创建工作区Create a workspace

创建工作区时,可以选择使用基本版或企业版来创建工作区。When you create a workspace, you decide whether to create it with Basic or Enterprise edition. 版本确定工作区中可用的功能。The edition determines the features available in the workspace. 企业版的突出功能包括可以访问 Azure 机器学习设计器和提供工作室版本的自动机器学习试验构建功能。Among other features, Enterprise edition gives you access to Azure Machine Learning designer and the studio version of building automated machine learning experiments. 有关详细信息和定价信息,请参阅 Azure 机器学习定价For more details and pricing information, see Azure Machine Learning pricing.

可通过多种方式创建工作区:There are multiple ways to create a workspace:

备注

工作区名称不区分大小写。The workspace name is case-insensitive.

升级到企业版Upgrade to Enterprise edition

可使用 Azure 门户将工作区从基本版升级到企业版You can upgrade your workspace from Basic to Enterprise edition using Azure portal. 不能将企业版工作区降级为基本版工作区。You cannot downgrade an Enterprise edition workspace to a Basic edition workspace.

关联的资源Associated resources

创建新工作区时,它会自动创建工作区使用的几个 Azure 资源:When you create a new workspace, it automatically creates several Azure resources that are used by the workspace:

  • Azure 容器注册表:注册在训练期间和部署模型时使用的 Docker 容器。Azure Container Registry: Registers docker containers that you use during training and when you deploy a model. 要最大程度地降低成本,ACR 在创建部署映像之前会“延迟加载”。To minimize costs, ACR is lazy-loaded until deployment images are created.
  • Azure 存储帐户,用作工作区的默认数据存储。Azure Storage account: Is used as the default datastore for the workspace. 与 Azure 机器学习计算实例一起使用的 Jupyter 笔记本也存储在此处。Jupyter notebooks that are used with your Azure Machine Learning compute instances are stored here as well.
  • Azure Application Insights:存储有关模型的监视信息。Azure Application Insights: Stores monitoring information about your models.
  • Azure Key Vault:存储计算目标使用的机密和工作区所需的其他敏感信息。Azure Key Vault: Stores secrets that are used by compute targets and other sensitive information that's needed by the workspace.

备注

除创建新版本以外,还可以使用现有的 Azure 服务。In addition to creating new versions, you can also use existing Azure services.

后续步骤Next steps

若要开始使用 Azure 机器学习,请参阅:To get started with Azure Machine Learning, see: