Help Center/ ModelArts/ API Reference/ Resource Management/ Querying dedicated resource pool Job Statistics
Updated on 2024-05-30 GMT+08:00

Querying dedicated resource pool Job Statistics

Function

This API is used to query dedicated resource pool job statistics.

Debugging

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

URI

GET /v2/{project_id}/statistics/pools/{pool_name}/workloads

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

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

pool_name

Yes

String

Resource pool to which a job belongs.

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

statistics

statistics object

Statistics of a job.

Table 3 statistics

Parameter

Type

Description

total

Integer

Number of statistics lists.

items

Array of WorkloadStatistics objects

Statistics of a specific job type.

Table 4 WorkloadStatistics

Parameter

Type

Description

type

String

Type of a job. The options are as follows:

  • train: training job

  • infer: inference job

  • notebook: notebook job

total

Integer

Number of jobs.

status

status object

Number of jobs in different states.

Table 5 status

Parameter

Type

Description

Queue

Integer

Number of jobs in the queue.

Pending

Integer

Number of jobs in waiting state.

Abnormal

Integer

Number of abnormal jobs.

Terminating

Integer

Number of jobs being terminated.

Creating

Integer

Number of jobs being created.

Running

Integer

Number of running jobs.

Completed

Integer

Number of completed jobs.

Terminated

Integer

Number of terminated jobs.

Failed

Integer

Number of jobs that fail to be executed.

Status code: 400

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error codes of ModelArts.

error_msg

String

Error message.

Status code: 404

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Error codes of ModelArts.

error_msg

String

Error message.

Example Requests

GET https://{endpoint}/v2/{project_id}/statistics/pools/{pool_name}/workloads

Example Responses

Status code: 400

Bad Request.

{
  "error_code" : "ModelArts.50004000",
  "error_msg" : "Bad request."
}

Status code: 404

Not Found.

{
  "error_code" : "ModelArts.50015001",
  "error_msg" : "Pool {name} not found."
}

Status Codes

Status Code

Description

200

OK.

400

Bad Request.

404

Not Found.

Error Codes

See Error Codes.