Querying Job Engine Specifications

Function

This API is used to query the engine type and version of a specified job.

You must specify the engine specifications when creating a training job or an inference job.

URI

GET /v1/{project_id}/job/ai-engines

Table 1 describes the required parameters.
Table 1 Parameter description

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details about how to obtain the project ID, see Obtaining a Project ID.

Table 2 Parameter description

Parameter

Mandatory

Type

Description

job_type

No

String

Job type. The value can be train or inference.

Request Body

None

Response Body

Table 3 describes the response parameters.
Table 3 Parameter description

Parameter

Type

Description

is_success

Boolean

Whether the request is successful

error_msg

String

Error message of a failed API call.

This parameter is not included when the API call succeeds.

error_code

String

Error code of a failed API call. For details, see Error Code.

This parameter is not included when the API call succeeds.

engines

JSON Array

List of engine specifications attributes

Table 4 engines parameters

Parameter

Type

Description

engine_type

Short

Engine type of a training job

  • 1: TensorFlow
  • 2: MXNet
  • 4: Caffe

engine_id

Long

ID of the engine selected for a training job

engine_name

String

Name of the engine selected for a training job

engine_version

String

Version of the engine selected for a training job

Samples

The following shows how to query the engine specifications of a training job.

  • Sample request
    GET    https://endpoint/v1/{project_id}/job/ai-engines?job_type=train
  • Successful sample response
    {
        "is_success": true,
        "engines": [
            {
                "engine_type": 1,
                "engine_name": "TensorFlow",
                "engine_id": 1,
                "engine_version": "TF-1.4.0-python2.7"
            }
        ]
    }
  • Failed sample response
    {
        "is_success": false,
        "error_msg": "Error string",
        "error_code": "ModelArts.0105"
    }

Status Code

For details about the status code, see Table 1.