Help Center/ ModelArts/ API Reference/ Model Training/ Training Management/ Obtaining the Route Planning Information of a Training Job
Updated on 2026-11-12 GMT+08:00

Obtaining the Route Planning Information of a Training Job

Function

This API is used to obtain the rank mapping result of a specified training job in the Ascend dedicated resource pool.

This API is applicable to the following scenario: When you create a multi-node (at least three nodes) training job in the Ascend 910 dedicated resource pool and need to obtain the rank mapping that takes effect for the job to optimize performance or locate faults, you can use this API to obtain the rank mapping result. Before using this API, ensure that you have obtained the training job ID and have the permission to view job details. After the query is complete, the platform returns the route planning status and rank mapping result of the job. If the training job does not meet the route planning conditions (non-Ascend 910 specifications or fewer than three nodes), the API returns the default rank mapping result in the failed state. If the training job ID does not exist or you do not have the operation permission, the API will return an error message.

Debugging

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

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.

  • If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, the following identity policy-based permissions are required.

    Action

    Access Level

    Resource Type (*: required)

    Condition Key

    Alias

    Dependencies

    modelarts:trainJob:getRoutePlan

    Read

    trainJob *

    g:ResourceTag/<tag-key>

    modelarts:trainJob:get

    -

    -

    g:EnterpriseProjectId

URI

GET /v2/{project_id}/training-jobs/{training_job_id}/route_plan

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

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

Constraints: N/A

Range: The value can contain 1 to 64 characters. Only letters, digits, and hyphens (-) are allowed.

Default Value: N/A

training_job_id

Yes

String

Definition: Training job ID. For details, see Obtaining Training Jobs.

Constraints: N/A

Range: N/A

Default Value: N/A

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

job_id

String

Definition: Training job ID.

Range: N/A

status

String

Definition: Route planning status.

Range:

  • success: Route planning is successful.

  • failed: Route planning is not executed or the conditions are not met. The default rank mapping is returned.

rank_mapping

String

Definition: Rank mapping result. The format is "newRankId-workerId". Multiple mapping items are separated by commas (,).

Range: N/A

Example Requests

Obtain the route planning information about the training job whose training_job_id is 3faf5c03-aaa1-4cbe-879d-24b05d997347.

GET https://{endpoint}/v2/{project_id}/training-jobs/3faf5c03-aaa1-4cbe-879d-24b05d997347/route_plan

Example Responses

Status code: 200

{
  "job_id" : "3faf5c03-aaa1-4cbe-879d-24b05d997347",
  "status" : "success",
  "rank_mapping" : "0-0,1-0,2-1,3-1,4-2,5-2,6-3,7-3"
}

Status Codes

Status Code

Description

200

ok

Error Codes

See Error Codes.