Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ ModelArts/ API Reference/ AI Application Management/ Obtaining Details About an AI Application

Obtaining Details About an AI Application

Updated on 2024-06-13 GMT+08:00

Function

This API is used to query details about an AI application based on the AI application ID.

Debugging

You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.

URI

GET /v1/{project_id}/models/{model_id}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

model_id

Yes

String

Model ID

project_id

Yes

String

Project ID. For details, see Obtaining a Project ID and Name.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token. It can be obtained by calling the IAM API that is used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

model_version

String

Model version

source_job_version

String

Version of the source training job

source_location

String

OBS path where the model is located or the template address of the SWR image

source_job_id

String

ID of the source training job

source_copy

String

Whether to enable image replication. This parameter is valid only when model_type is set to Image.

  • true: Default value, indicating that image replication is enabled. After this function is enabled, AI applications cannot be rapidly created, and modifying or deleting an image in the SWR source directory will not affect service deployment.

  • false: Image replication is not enabled. After this function is disabled, AI applications can be rapidly created, but modifying or deleting an image in the SWR source directory will affect service deployment.

description

String

Model description

project

String

Project ID of the tenant to which a model belongs

workspace_id

String

Workspace ID. Value 0 indicates the default workspace.

model_algorithm

String

Model algorithm type, which can be predict_analysis, object_detection, or image_classification

model_name

String

Model name

tenant

String

Account ID of the tenant to which a model belongs

model_docs

Array of GuideDoc objects

List of template documents

owner

String

ID of the tenant to which a model belongs

execution_code

String

OBS path for storing the execution code. The name of the execution code file is consistently to be customize_service.py.

schema_doc

String

Download address of the model schema file

image_address

String

Image path generated after model packaging

output_params

Array of ModelParamsInfo objects

Collection of output parameters of a model

health

ModelHealth object

Model health check API information.

runtime

String

Model runtime environment

model_metrics

String

Model precision

source_type

String

Model source type. This parameter is valid and its value is auto only if the model is deployed using ExeML.

model_type

String

Model type. The value is TensorFlow/Image/PyTorch/Template/MindSpore.

model_id

String

Model ID

dependencies

Array of ModelDependencies objects

Package required for running the code and model

model_size

Long

Model size, in bytes

model_status

String

Model status

apis

String

All API input and output parameter information of a model, which is obtained from the model preview

model_source

String

Model source. Options:

  • auto: ExeML

  • algos: preset algorithm

  • custom: customized

tunable

Boolean

Whether a model can be tuned. Options:

  • true: Supported.

  • false: Not supported.

market_flag

Boolean

Whether a model is subscribed from the marketplace. Options:

  • true: from the market

  • false: no

publishable_flag

Boolean

Whether a model can be published to the marketplace. Options:

  • true: The product can be released to the market.

  • false: The product cannot be released to the marketplace.

model_labels

Array of strings

Model label array

labels_map

Map<String,String>

Model label map. The key is consistently to be labels, and the value is the model label array.

install_type

Array of strings

Supported service type for deployment

config

String

Model configurations

specification

ModelSpecification object

Minimum specifications for model deployment

input_params

Array of ModelParamsInfo objects

Collection of input parameters of a model

create_at

Long

Time when a model is created, in milliseconds calculated from 1970.1.1 0:0:0 UTC.

Table 4 GuideDoc

Parameter

Type

Description

doc_url

String

HTTP(S) link of the document

doc_name

String

Document name, which must start with a letter. Enter 1 to 48 characters. Only letters, digits, hyphens (-), and underscores (_) are allowed.

Table 5 ModelHealth

Parameter

Type

Description

protocol

String

Request protocol of the health check API. Only HTTP is supported.

initial_delay_seconds

String

After an instance is started, a health check starts after the time configured in initial_delay_seconds expires.

timeout_seconds

String

Health check timeout.

url

String

URL of a health check API.

Table 6 ModelDependencies

Parameter

Type

Description

installer

String

Installation mode. Only pip is supported.

packages

Array of Packages objects

Collection of dependency packages

Table 7 Packages

Parameter

Type

Description

package_version

String

Version of a dependency package. If this parameter is left blank, the latest version is installed by default. Chinese characters and special characters (&!'"<>=) are not allowed.

package_name

String

Name of a dependency package. Ensure that the package name is correct and available. Chinese characters and special characters (&!'"<>=) are not allowed.

restraint

String

Version restriction, which can be EXACT, ATLEAST, or ATMOST. This parameter is mandatory only when package_version is available.

Table 8 ModelSpecification

Parameter

Type

Description

min_cpu

String

Minimal CPU specifications

min_gpu

String

Minimal GPU specifications

min_memory

String

Minimum memory

min_ascend

String

Minimal Ascend specifications

Table 9 ModelParamsInfo

Parameter

Type

Description

protocol

String

Request protocol, for example, http.

url

String

API URL

min

Number

Minimum value of a numeric parameter.

method

String

Request method, for example, post.

max

Number

Maximum value of a numeric parameter.

param_desc

String

Parameter description.

param_name

String

Parameter name.

param_type

String

Parameter type.

Example Requests

GET https://{endpoint}/v1/{project_id}/models/{model_id}

Example Responses

Status code: 200

Model details

{
  "model_id" : "10eb0091-887f-4839-9929-cbc884f1e20e",
  "model_name" : "mnist",
  "model_version" : "1.0.0",
  "runtime" : "python2.7",
  "tenant" : "6d28e85aa78b4e1a9b4bd83501bcd4a1",
  "project" : "d04c10db1f264cfeb1966deff1a3527c",
  "owner" : "6d28e85aa78b4e1a9b4bd83501bcd4a1",
  "source_location" : "https://models.obs.xxxxx.com/mnist",
  "model_type" : "TensorFlow",
  "model_size" : 5633481,
  "model_status" : "published",
  "execution_code" : "https://testmodel.obs.xxxxx.com/customize_service.py",
  "image_address" : "100.125.5.235:20202/models/10eb0091-887f-4839-9929-cbc884f1e20e:1.0.0",
  "input_params" : [ {
    "url" : "/",
    "method" : "post",
    "protocol" : "http",
    "param_name" : "data",
    "param_type" : "object",
    "param_desc" : "{\"type\":\"object\",\"properties\":{\"req_data\":{\"items\":[{\"type\":\"object\",\"properties\":{}}],\"type\":\"array\"}}}"
  } ],
  "output_params" : [ {
    "url" : "/",
    "method" : "post",
    "protocol" : "http",
    "param_name" : "data",
    "param_type" : "object",
    "param_desc" : "{\"type\":\"object\",\"properties\":{\"resp_data\":{\"type\":\"array\",\"items\":[{\"type\":\"object\",\"properties\":{}}]}}}"
  } ],
  "dependencies" : [ {
    "installer" : "pip",
    "packages" : [ {
      "package_name" : "pkg1",
      "package_version" : "1.0.1",
      "restraint" : "ATLEAST"
    } ]
  } ],
  "model_metrics" : "{\"f1\":0.52381,\"recall\":0.666667,\"precision\":0.466667,\"accuracy\":0.625}",
  "apis" : "[{\"protocol\":\"http\",\"method\":\"post\",\"url\":\"/\",\"input_params\":{\"type\":\"object\",\"properties\":{\"data\":{\"type\":\"object\",\"properties\":{\"req_data\":{\"items\":[{\"type\":\"object\",\"properties\":{}}],\"type\":\"array\"}}}}},\"output_params\":{\"type\":\"object\",\"properties\":{\"data\":{\"type\":\"object\",\"properties\":{\"resp_data\":{\"type\":\"array\",\"items\":[{\"type\":\"object\",\"properties\":{}}]}}}}}}]",
  "model_labels" : [ ],
  "labels_map" : {
    "labels" : [ ]
  },
  "workspace_id" : "0",
  "install_type" : [ "realtime", "batch", "edge" ],
  "specification" : { },
  "config" : "{\"model_algorithm\":\"image_classification\",\"model_source\":\"auto\",\"tunable\":false,\"downloadable_flag\":true,\"algorithm\":\"resnet_v2_50,mobilenet_v1\",\"metrics\":{\"f1\":0.912078373015873,\"recall\":0.9125,\"precision\":0.9340277777777778,\"accuracy\":0.263250724969475},\"model_type\":\"TensorFlow\",\"runtime\":\"tf1.13-python3.6-cpu\",\"apis\":[{\"protocol\":\"https\",\"url\":\"/\",\"method\":\"post\",\"request\":{\"data\":{\"type\":\"object\",\"properties\":{\"images\":{\"type\":\"file\"}}},\"Content-type\":\"multipart/form-data\"},\"response\":{\"data\":{\"type\":\"object\",\"required\":[\"predicted_label\",\"scores\"],\"properties\":{\"predicted_label\":{\"type\":\"string\"},\"scores\":{\"type\":\"array\",\"items\":{\"type\":\"array\",\"minItems\":2,\"maxItems\":2,\"items\":[{\"type\":\"string\"},{\"type\":\"number\"}]}}}},\"Content-type\":\"multipart/form-data\"}}],\"dependencies\":[{\"installer\":\"pip\",\"packages\":[{\"package_name\":\"numpy\",\"package_version\":\"1.17.0\",\"restraint\":\"EXACT\"},{\"package_name\":\"h5py\",\"package_version\":\"2.8.0\",\"restraint\":\"EXACT\"},{\"package_name\":\"Pillow\",\"package_version\":\"5.2.0\",\"restraint\":\"EXACT\"},{\"package_name\":\"scipy\",\"package_version\":\"1.2.1\",\"restraint\":\"EXACT\"},{\"package_name\":\"resampy\",\"package_version\":\"0.2.1\",\"restraint\":\"EXACT\"},{\"package_name\":\"scikit-learn\",\"package_version\":\"0.19.1\",\"restraint\":\"EXACT\"}]}]}"
}

Status Codes

Status Code

Description

200

Model details

Error Codes

See Error Codes.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback