类 Service

服务

azureml.deploy.server.service.Service(service, http_client)

基于服务元数据属性的服务使用和批处理的动态对象。

批处理

batch(records, parallel_count=10)

为此服务上的批处理执行注册一组输入记录。

参数

records

要执行的输入记录的 data.frame 或列表。

parallel_count

用于处理批次中的项的线程数。 默认值为 10。 请确保不要使用过高的数字,因为这可能会对性能产生负面影响。

返回

用于控制此服务的批处理生命周期的 Batch 实例。

capabilities

capabilities()

提供以下信息,描述此服务的所有内容:

  • api - API REST 终结点。

  • name - 服务名称。

  • version - 服务版本。

  • published_by - 服务发布作者。

  • runtime - 服务运行时上下文 R|Python。

  • description - 服务说明。

  • creation_time - 服务发布时间戳。

  • snapshot_id - 此服务绑定的快照标识符。

  • inputs - 输入架构名称/类型定义。

  • outputs - 输出架构名称/类型定义。

  • inputs_encoded - 已编码为 Python 的输入架构名称/类型。

  • outputs_encoded - 已编码为 Python 的输出架构名称/类型。

  • artifacts - 支持的生成文件。

  • operation_id - 函数 alias

  • swagger - 此服务的 swagger.json 文档的 API REST 终结点。

返回

描述服务的键/值的 dict

get_batch

get_batch(execution_id)

基于执行标识符检索服务批次。

参数

execution_id

批处理执行的标识符。

返回

用于控制此服务的批处理生命周期的 Batch 实例。

list_executions

list_batch_executions()

获取此服务的当前排队的所有批处理执行标识符。

返回

执行标识符的 list

swagger

swagger()

检索此服务的 swagger.json(参阅 http://swagger.io/)。

返回

此服务的 swagger 文档,作为 json str