Updated on 2024-05-30 GMT+08:00

Querying Job Engine Specifications

Function

This API is used to obtain 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 Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

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

Table 2 Parameters

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 Parameters

Parameter

Type

Description

is_success

Boolean

Whether the request is successful

error_message

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 Codes.

This parameter is not included when the API call succeeds.

engines

engines array

List of engine specifications attributes. For details, see Table 4.

Table 4 engines parameters

Parameter

Type

Description

engine_type

Integer

Engine type of a training job

  • 1: TensorFlow
  • 2: MXNet
  • 4: Caffe
  • 5: Spark_MLlib
  • 6: Scikit Learn
  • 9: XGBoost-Sklearn
  • 10: PyTorch
  • 13: Ascend-Powered-Engine
  • 17: MindSpore-GPU

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

Sample Request

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

GET    https://endpoint/v1/{project_id}/job/ai-engines?job_type=train

Sample Response

  • Successful response
    {
        "is_success": true,
        "engines": [
            {
                "engine_type": 1,
                "engine_name": "TensorFlow",
                "engine_id": 1,
                "engine_version": "TF-1.4.0-python2.7"
            }
        ]
    }
  • Failed response
    {
        "is_success": false,
        "error_message": "Error string",
        "error_code": "ModelArts.0105"
    }

Status Code

For details about the status code, see Table 1.