Help Center/ ModelArts/ API Reference/ Training Management/ Querying Information About a Trial Using Hyperparameter Search
Updated on 2026-07-24 GMT+08:00

Querying Information About a Trial Using Hyperparameter Search

Function

This API is used to obtain the detailed results of a specific trial in a specified hyperparameter search job.

This API is used when you need to view the performance metrics and status of a specific trial in a hyperparameter search job. Before using this API, ensure that the hyperparameter search job exists and you have the required permission. After the query, the API returns the detailed results of the specified trial. If the hyperparameter search job does not exist, the specified trial does not exist, or you do not have the required 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:get

    Read

    trainJob *

    g:ResourceTag/<tag-key>

    -

    -

    -

    • modelarts:poolType

    • modelarts:poolId

URI

GET /v2/{project_id}/training-jobs/{training_job_id}/autosearch-trials/{trial_id}

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

trial_id

Yes

String

Definition: Trial ID of the hyperparameter search.

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

header

Array of strings

Definition: Field information of a trial searched using hyperparameters.

data

Array<Array<String>>

Definition: Data list of a trial searched using hyperparameters.

Example Requests

The following shows how to query information about trial ae544174 of the job whose training_job_id is 5b60a667-1438-4eb5-9705-85b860e623dc.

GET https://{endpoint}/v2/{project_id}/training-jobs/5b60a667-1438-4eb5-9705-85b860e623dc/autosearch-trials/ae544174

Example Responses

Status code: 200

ok

{
  "header" : [ "done", "pid", "best_reward", "time_total_s", "config", "acc", "loss", "trial_id", "training_iteration", "reward_attr" ],
  "data" : [ [ "False", "314", "0.0625", "19.477163314819336", "batch_size: 32\nlearning_rate: 0.05512301741232006\ntrial_index: 0\nparam/batch_size: 32\nparam/learning_rate: 0.05512301741232006", "0.0625", "tensor(0.0754, device='cuda:0', requires_grad=True)", "ae544174", "2", "0.0625" ], [ "True", "314", "0.0625", "19.477163314819336", "batch_size: 32\nlearning_rate: 0.05512301741232006\ntrial_index: 0\nparam/batch_size: 32\nparam/learning_rate: 0.05512301741232006", "0.0625", "tensor(0.0754, device='cuda:0', requires_grad=True)", "ae544174", "2", "0.0625" ] ]
}

Status Codes

Status Code

Description

200

ok

Error Codes

See Error Codes.