更新时间:2024-03-21 GMT+08:00
分享

查询模型runtime

功能介绍

查询模型AI引擎以及runtime。

调试

您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。

URI

GET /v1/{project_id}/models/ai-engine-runtimes

表1 路径参数

参数

是否必选

参数类型

描述

project_id

String

用户项目ID。获取方法请参见获取项目ID

表2 Query参数

参数

是否必选

参数类型

描述

limit

String

每页显示的条目数量

offset

String

偏移量,表示从此偏移量开始查询, offset大于等于0

请求参数

表3 请求Header参数

参数

是否必选

参数类型

描述

X-Auth-Token

String

用户token

响应参数

状态码: 200

表4 响应Body参数

参数

参数类型

描述

count

Integer

不分页的情况下符合查询条件的总数量。

total_count

Integer

当前查询结果的数量,不设置offset、limit查询参数时,count与total相同。

engine_runtimes

Array of EngineAndRuntimesResponse objects

引擎运行环境。

表5 EngineAndRuntimesResponse

参数

参数类型

描述

ai_engine

String

AI引擎类型,目前共有以下几种类型:

  • TensorFlow

  • PyTorch

  • MindSpore

  • XGBoost

  • Scikit_Learn

  • Spark_MLlib

runtimes

Array of strings

运行镜像,如pytorch_1.8.0-cuda_10.2-py_3.7-ubuntu_18.04-x86_64

request_mode

Array of strings

请求模式,AI引擎支持部署为同步在线服务或异步在线服务

  • sync(同步在线服务)

  • async (异步在线服务)

accelerators

Array of Accelerator objects

AI引擎可使用的加速卡

arch

Array of strings

AI引擎架构,目前共两种:

  • x86_64

  • aarch64

status_list

Array of strings

AI引擎状态,目前共三种:

  • normal (正常)

  • deleted (已下线)

  • deleting (下线中)

image_source

Array of strings

镜像来源,目前共两种:

  • base_image (基础镜像)

  • uniform_image (统一镜像)

表6 Accelerator

参数

参数类型

描述

type

String

加速卡类型 ,目前共三种

  • npu

  • gpu

  • none

name

String

加速卡名称,如a30

cuda_version

String

cuda驱动版本

driver_version_section

String

驱动版本集合

状态码: 401

表7 响应Body参数

参数

参数类型

描述

error_code

String

ModelArts错误码

error_msg

String

具体错误信息

状态码: 403

表8 响应Body参数

参数

参数类型

描述

error_code

String

ModelArts错误码

error_msg

String

具体错误信息

状态码: 404

表9 响应Body参数

参数

参数类型

描述

error_code

String

ModelArts错误码

error_msg

String

具体错误信息

请求示例

GET https://{endpoint}/v1/{project_id}/models/ai-engine-runtimes

响应示例

状态码: 200

OK

{
  "count" : 4,
  "total_count" : 4,
  "engine_runtimes" : [ {
    "ai_engine" : "TensorFlow",
    "runtimes" : [ "tf1.13-python3.6-cpu", "tf1.13-python3.6-gpu", "tf1.13-python3.7-cpu", "tf1.13-python3.7-gpu", "python3.6", "tf1.13-python3.7-aiflow-gpu", "tf1.13-python3.7-gpu-async", "tensorflow_2.1.0-cuda_10.1-py_3.7-ubuntu_18.04-x86_64", "tensorflow_2.6.0-cuda_11.2-py_3.7-ubuntu_18.04-x86_64", "tensorflow_1.15.5-cuda_11.4-py_3.8-ubuntu_20.04-x86_64" ],
    "request_mode" : [ "sync", "sync", "sync", "sync", "sync", "sync", "async", "sync", "sync", "sync" ],
    "accelerators" : [ {
      "type" : "none"
    }, {
      "type" : "gpu",
      "cuda_version" : "cuda 10.2"
    }, {
      "type" : "none"
    }, {
      "type" : "gpu",
      "cuda_version" : "cuda 10.2"
    }, {
      "type" : "none"
    }, {
      "type" : "gpu",
      "cuda_version" : "cuda 10.2"
    }, {
      "type" : "gpu",
      "cuda_version" : "cuda 10.2"
    }, {
      "type" : "none"
    }, {
      "type" : "none"
    }, {
      "type" : "none"
    } ],
    "arch" : [ "x86_64", "x86_64", "x86_64", "x86_64", "x86_64", "x86_64", "x86_64", "x86_64", "x86_64", "x86_64" ],
    "status_list" : [ "normal", "normal", "normal", "normal", "normal", "normal", "normal", "normal", "normal", "normal" ],
    "image_source" : [ "base_image", "base_image", "base_image", "base_image", "base_image", "base_image", "base_image", "uniform_image", "uniform_image", "uniform_image" ]
  }, {
    "ai_engine" : "PyTorch",
    "runtimes" : [ "python3.6", "python3.7", "pytorch1.4-python3.7", "pytorch_1.11.0-cann_7.0.1-py_3.9-euler_2.10.7-aarch64-snt9b", "pytorch_1.8.0-cuda_10.2-py_3.7-ubuntu_18.04-x86_64", "pytorch_1.8.2-cuda_11.1-py_3.7-ubuntu_18.04-x86_64" ],
    "request_mode" : [ "sync", "sync", "sync", "sync", "sync", "sync" ],
    "accelerators" : [ {
      "type" : "none"
    }, {
      "type" : "none"
    }, {
      "type" : "none"
    }, {
      "type" : "npu",
      "name" : "SNT9",
      "driver_version_section" : "C8x"
    }, {
      "type" : "none"
    }, {
      "type" : "none"
    } ],
    "arch" : [ "x86_64", "x86_64", "x86_64", "aarch64", "x86_64", "x86_64" ],
    "status_list" : [ "normal", "normal", "normal", "normal", "normal", "normal" ],
    "image_source" : [ "base_image", "base_image", "base_image", "uniform_image", "uniform_image", "uniform_image" ]
  }, {
    "ai_engine" : "MindSpore",
    "runtimes" : [ "mindspore_1.9.0-cann_6.0.1-py_3.7-euler_2.9.9-x86_64-snt3p-300i", "mindspore_1.7.0-cuda_10.1-py_3.7-ubuntu_18.04-x86_64", "mindspore_1.2.0-py_3.7-cuda_10.1-ubuntu_18.04-x86_64" ],
    "request_mode" : [ "sync", "sync", "sync" ],
    "accelerators" : [ {
      "type" : "none"
    }, {
      "type" : "none"
    }, {
      "type" : "none"
    } ],
    "arch" : [ "x86_64", "x86_64", "x86_64" ],
    "status_list" : [ "normal", "normal", "normal" ],
    "image_source" : [ "uniform_image", "uniform_image", "uniform_image" ]
  }, {
    "ai_engine" : "Custom",
    "runtimes" : [ ],
    "request_mode" : [ ],
    "accelerators" : [ ],
    "arch" : [ ],
    "status_list" : [ ],
    "image_source" : [ ]
  } ]
}

状态码

状态码

描述

200

OK

401

Unauthorized

403

Forbidden

404

Not Found

错误码

请参见错误码

分享:

    相关文档

    相关产品