使用 Azure 机器学习工作室(经典)Web 服务门户管理 Web 服务Manage a web service using the Azure Machine Learning Studio (classic) Web Services portal

适用于: yes机器学习工作室(经典) noAzure 机器学习APPLIES TO: yesMachine Learning Studio (classic) noAzure Machine Learning

可以使用 Microsoft Azure 机器学习 Web 服务门户来管理机器学习 Web 服务(新 Web 服务和经典 Web 服务)。You can manage your Machine Learning New and Classic Web services using the Microsoft Azure Machine Learning Web Services portal. 由于经典 Web 服务和新的 Web 服务基于不同的基础技术,针对它们的管理能力会稍有不同。Since Classic Web services and New Web services are based on different underlying technologies, you have slightly different management capabilities for each of them.

在机器学习 Web 服务门户中,可以:In the Machine Learning Web Services portal you can:

  • 监视 Web 服务的使用方式。Monitor how the web service is being used.
  • 配置说明、更新 Web 服务的密钥(仅限于新的 Web 服务)、更新存储帐户的密钥(仅限于新的 Web 服务)、启用日志记录以及启用或禁用示例数据。Configure the description, update the keys for the web service (New only), update your storage account key (New only), enable logging, and enable or disable sample data.
  • 删除 Web 服务。Delete the web service.
  • 创建、 删除或更新计费计划 (仅限于新的Web 服务)。Create, delete, or update billing plans (New only).
  • 添加和删除终结点(仅限于经典 Web 服务)Add and delete endpoints (Classic only)

备注

此外,还可以在“Web 服务”选项卡上的机器学习工作室(经典)中管理经典 Web 服务。You also can manage Classic web services in Machine Learning Studio (classic) on the Web services tab.

用于管理基于资源管理器的新 Web 服务的权限Permissions to manage New Resources Manager based web services

新 Web 服务以 Azure 资源的形式部署。New web services are deployed as Azure resources. 因此,必须拥有正确的权限才能部署和管理新 Web 服务。As such, you must have the correct permissions to deploy and manage New web services. 若要部署或管理新 Web 服务,必须分配有该 Web 服务部署到的订阅上的参与者或管理员角色。To deploy or manage New web services you must be assigned a contributor or administrator role on the subscription to which the web service is deployed. 如果邀请其他用户加入机器学习工作区,必须向其分配订阅上的参与者或管理员角色,他们才能部署或管理 Web 服务。If you invite another user to a machine learning workspace, you must assign them to a contributor or administrator role on the subscription before they can deploy or manage web services.

如果用户没有访问 Azure 机器学习 Web 服务门户中的资源的正确权限,那么在尝试部署 Web 服务时会收到以下错误:If the user does not have the correct permissions to access resources in the Azure Machine Learning Web Services portal, they will receive the following error when trying to deploy a web service:

Web Service deployment failed.This account does not have sufficient access to the Azure subscription that contains the Workspace.In order to deploy a Web Service to Azure, the same account must be invited to the Workspace and be given access to the Azure subscription that contains the Workspace. (Web 服务部署失败。此帐户没有足够的权限访问工作区所属的 Azure 订阅。若要将 Web 服务部署到 Azure,必须邀请同一帐户加入工作区并为其授予对工作区所属的 Azure 订阅的访问权限。)Web Service deployment failed. This account does not have sufficient access to the Azure subscription that contains the Workspace. In order to deploy a Web Service to Azure, the same account must be invited to the Workspace and be given access to the Azure subscription that contains the Workspace.

有关创建工作区的详细信息,请参阅创建和共享 Azure 机器学习工作室(经典)工作区For more information on creating a workspace, see Create and share an Azure Machine Learning Studio (classic) workspace.

有关设置访问权限的更多信息,请参阅使用 RBAC 和 Azure 门户管理访问权限For more information on setting access permissions, see Manage access using RBAC and the Azure portal.

管理新的 Web 服务Manage New Web services

要管理新的 Web 服务:To manage your New Web services:

  1. 使用 Microsoft Azure 帐户登录到 Microsoft Azure 机器学习 Web 服务门户 - 使用与 Azure 订阅相关联的帐户。Sign in to the Microsoft Azure Machine Learning Web Services portal using your Microsoft Azure account - use the account that's associated with the Azure subscription.
  2. 在菜单上,单击“Web 服务”。On the menu, click Web Services.

此时会显示你订阅的已部署 Web 服务列表。This displays a list of deployed Web services for your subscription.

要管理 Web 服务,请单击“Web 服务”。To manage a Web service, click Web Services. 可以从“Web 服务”页上:From the Web Services page you can:

  • 单击 Web 服务以对其进行管理。Click the web service to manage it.
  • 单击 Web 服务的“计费计划”以进行更新。Click the Billing Plan for the web service to update it.
  • 删除 Web 服务。Delete a web service.
  • 复制并部署 Web 服务到另一个区域。Copy a web service and deploy it to another region.

单击 Web 服务时,将打开 Web 服务快速入门页。When you click a web service, the web service Quickstart page opens. Web 服务快速入门页提供了两个允许管理 Web 服务的菜单选项:The web service Quickstart page has two menu options that allow you to manage your web service:

  • 仪表板 - 允许查看 Web 服务的使用情况。DASHBOARD - Allows you to view Web service usage.
  • 配置 - 允许添加说明性文本、更新与 Web 服务相关联的存储帐户的密钥,以及启用或禁用示例数据。CONFIGURE - Allows you to add descriptive text, update the key for the storage account associated with the Web service, and enable or disable sample data.

监视 Web 服务的使用方式Monitoring how the web service is being used

单击“仪表板”选项卡 。Click the DASHBOARD tab.

从仪表板可以查看在一段时间内 Web 服务的总体使用情况。From the dashboard, you can view overall usage of your Web service over a period of time. 可以从使用情况图表右上角的“期间”下拉菜单中选择要查看的期间。You can select the period to view from the Period dropdown menu in the upper right of the usage charts. 仪表板显示以下信息:The dashboard shows the following information:

  • 一段时间内的请求”以步进图显示所选时间段内的请求数。Requests Over Time displays a step graph of the number of requests over the selected time period. 它可以帮助识别是否经历了使用峰值。It can help identify if you are experiencing spikes in usage.
  • 请求 - 响应请求”显示所选时间段内此服务收到的合计请求-响应调用数,以及有多少请求失败。Request-Response Requests displays the total number of Request-Response calls the service has received over the selected time period and how many of them failed.
  • 平均请求 - 响应计算时间”显示执行接收请求所需的平均时间。Average Request-Response Compute Time displays an average of the time needed to execute the received requests.
  • 批请求”显示所选时间段内此服务收到的合计批请求数,以及有多少批请求失败。Batch Requests displays the total number of Batch Requests the service has received over the selected time period and how many of them failed.
  • 平均作业滞后时间”显示执行接收请求所需的平均时间。Average Job Latency displays an average of the time needed to execute the received requests.
  • 错误”显示调用 Web 服务时合计发生的错误数。Errors displays the aggregate number of errors that have occurred on calls to the web service.
  • 服务成本”显示与服务关联的计费计划的费用。Services Costs displays the charges for the billing plan associated with the service.

配置 Web 服务Configuring the web service

单击“配置”菜单选项。Click the CONFIGURE menu option.

可以更新以下属性:You can update the following properties:

  • 说明”允许输入 Web 服务的说明。Description allows you to enter a description for the Web service.
  • 标题”允许输入 Web 服务的标题Title allows you to enter a title for the Web service
  • 密钥”允许修改主要和次要 API 密钥。Keys allows you to rotate your primary and secondary API keys.
  • 存储帐户密钥”允许更新与 Web 服务更改相关联的存储帐户密钥。Storage account key allows you to update the key for the storage account associated with the Web service changes.
  • 启用示例数据”允许提供可用于测试请求 - 响应服务的示例数据。Enable Sample data allows you to provide sample data that you can use to test the Request-Response service. 如果在机器学习工作室(经典)中创建了 Web 服务,示例数据将来自用于训练模型的数据。If you created the web service in Machine Learning Studio (classic), the sample data is taken from the data your used to train your model. 如果以编程方式创建服务,则从作为 JSON 包的一部分提供的示例数据中获取数据。If you created the service programmatically, the data is taken from the example data you provided as part of the JSON package.

管理计费计划Managing billing plans

从 Web 服务快速入门页的菜单选项单击“计划”。Click the Plans menu option from the web services Quickstart page. 还可以单击与特定的 Web 服务关联的计划来管理该计划。You can also click the plan associated with specific Web service to manage that plan.

  • 新建”允许创建一个新的计划。New allows you to create a new plan.
  • 添加/删除计划实例”允许“向外扩展”现有的计划来增加容量。Add/Remove Plan instance allows you to "scale out" an existing plan to add capacity.
  • 升级/降级”允许“纵向扩展”现有的计划来增加容量。Upgrade/DownGrade allows you to "scale up" an existing plan to add capacity.
  • 删除”允许删除某一个计划。Delete allows you to delete a plan.

单击一个计划以查看其仪表板。Click a plan to view its dashboard. 仪表板提供所选时间段内的快照或计划使用情况。The dashboard gives you snapshot or plan usage over a selected period of time. 若要选择要查看的时间段,单击仪表板右上方的“期间”下拉列表。To select the time period to view, click the Period dropdown at the upper right of dashboard.

计划仪表板提供了以下信息:The plan dashboard provides the following information:

  • 计划描述”显示有关与计划关联的成本和容量信息。Plan Description displays information about the costs and capacity associated with the plan.
  • 计划使用情况”显示已针对计划计费的事务数和计算小时数。Plan Usage displays the number of transactions and compute hours that have been charged against the plan.
  • Web 服务”显示正在使用此计划的 Web 服务数。Web Services displays the number of Web services that are using this plan.
  • 按调用列出的前几个 Web 服务”显示产生最多调用并已按计划收费的前四个 Web 服务。Top Web Service By Calls displays the top four Web services that are making calls that are charged against the plan.
  • 按计算小时数列出的前几个 Web 服务”显示正在使用计算资源并已按计划收费的前四个 Web 服务。Top Web Services by Compute Hrs displays the top four Web services that are using compute resources that are charged against the plan.

管理经典 Web 服务Manage Classic Web Services

备注

此部分中的过程与通过 Azure 机器学习 Web 服务门户管理经典 Web 服务相关。The procedures in this section are relevant to managing Classic web services through the Azure Machine Learning Web Services portal. 有关通过机器学习工作室(经典)和 Azure 门户管理经典 Web 服务的信息,请参阅管理 Azure 机器学习工作室(经典)工作区For information on managing Classic Web services through the Machine Learning Studio (classic) and the Azure portal, see Manage an Azure Machine Learning Studio (classic) workspace.

要管理经典 Web 服务:To manage your Classic Web services:

  1. 使用 Microsoft Azure 帐户登录到 Microsoft Azure 机器学习 Web 服务门户 - 使用与 Azure 订阅相关联的帐户。Sign in to the Microsoft Azure Machine Learning Web Services portal using your Microsoft Azure account - use the account that's associated with the Azure subscription.
  2. 在菜单上,单击“经典 Web 服务”。On the menu, click Classic Web Services.

要管理经典 Web 服务,单击“经典 Web 服务”。To manage a Classic Web Service, click Classic Web Services. 可以从“经典 Web 服务”页上:From the Classic Web Services page you can:

  • 单击 Web 服务以查看关联的终结点。Click the web service to view the associated endpoints.
  • 删除 Web 服务。Delete a web service.

在管理经典 Web 服务时,每个终结点单独管理。When you manage a Classic Web service, you manage each of the endpoints separately. 单击“Web 服务”页中的 Web 服务时会打开与服务关联的终结点列表。When you click a web service in the Web Services page, the list of endpoints associated with the service opens.

在“经典 Web 服务”终结点页,可以添加和删除服务上的终结点。On the Classic Web Service endpoint page, you can add and delete endpoints on the service. 有关添加终结点的详细信息,请参阅创建终结点For more information on adding endpoints, see Creating Endpoints.

单击其中的一个终结点,以打开 Web 服务快速入门页。Click one of the endpoints to open the web service Quickstart page. 在“快速入门”页上,有两个菜单选项可用于管理 Web 服务:On the Quickstart page, there are two menu options that allow you to manage your web service:

  • 仪表板 - 允许查看 Web 服务的使用情况。DASHBOARD - Allows you to view Web service usage.
  • 配置 - 允许添加说明性文本、打开或关闭错误日志记录、更新与 Web 服务相关联的存储帐户的密钥,以及启用和禁用示例数据。CONFIGURE - Allows you to add descriptive text, turn error logging on and off, update the key for the storage account associated with the Web service, and enable and disable sample data.

监视 Web 服务的使用方式Monitoring how the web service is being used

单击“仪表板”选项卡 。Click the DASHBOARD tab.

从仪表板可以查看在一段时间内 Web 服务的总体使用情况。From the dashboard, you can view overall usage of your Web service over a period of time. 可以从使用情况图表右上角的“期间”下拉菜单中选择要查看的期间。You can select the period to view from the Period dropdown menu in the upper right of the usage charts. 仪表板显示以下信息:The dashboard shows the following information:

  • 一段时间内的请求”以步进图显示所选时间段内的请求数。Requests Over Time displays a step graph of the number of requests over the selected time period. 它可以帮助识别是否经历了使用峰值。It can help identify if you are experiencing spikes in usage.
  • 请求 - 响应请求”显示所选时间段内此服务收到的合计请求-响应调用数,以及有多少请求失败。Request-Response Requests displays the total number of Request-Response calls the service has received over the selected time period and how many of them failed.
  • 平均请求 - 响应计算时间”显示执行接收请求所需的平均时间。Average Request-Response Compute Time displays an average of the time needed to execute the received requests.
  • 批请求”显示所选时间段内此服务收到的合计批请求数,以及有多少批请求失败。Batch Requests displays the total number of Batch Requests the service has received over the selected time period and how many of them failed.
  • 平均作业滞后时间”显示执行接收请求所需的平均时间。Average Job Latency displays an average of the time needed to execute the received requests.
  • 错误”显示调用 Web 服务时合计发生的错误数。Errors displays the aggregate number of errors that have occurred on calls to the web service.
  • 服务成本”显示与服务关联的计费计划的费用。Services Costs displays the charges for the billing plan associated with the service.

配置 Web 服务Configuring the web service

单击“配置”菜单选项。Click the CONFIGURE menu option.

可以更新以下属性:You can update the following properties:

  • 说明”允许输入 Web 服务的说明。Description allows you to enter a description for the Web service. “说明”是必填字段。Description is a required field.
  • 日志记录”允许启用或禁用终结点上的错误记录。Logging allows you to enable or disable error logging on the endpoint. 有关日志记录的详细信息,请参阅为机器学习 Web 服务启用日志记录For more information on Logging, see Enable logging for Machine Learning web services.
  • 启用示例数据”允许提供可用于测试请求 - 响应服务的示例数据。Enable Sample data allows you to provide sample data that you can use to test the Request-Response service. 如果在机器学习工作室(经典)中创建了 Web 服务,示例数据将来自用于训练模型的数据。If you created the web service in Machine Learning Studio (classic), the sample data is taken from the data your used to train your model. 如果以编程方式创建服务,则从作为 JSON 包的一部分提供的示例数据中获取数据。If you created the service programmatically, the data is taken from the example data you provided as part of the JSON package.