Querying All Trials Using Hyperparameter Search
Function
This API is used to obtain the detailed results of all trials in a specified hyperparameter search job.
This API is used when you need to view the performance metrics and status of all trials 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 all trials. If the hyperparameter search job 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.
URI
GET /v2/{project_id}/training-jobs/{training_job_id}/autosearch-trials
| 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 |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| limit | No | Integer | Definition: Number of returned records. Constraints: N/A Range: N/A Default Value: N/A |
| offset | No | Integer | Definition: Offset of data records Constraints: N/A Range: N/A Default Value: N/A |
Request Parameters
None
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| total | Integer | Definition: Number of trials searched using hyperparameters. Range: N/A |
| count | Integer | Definition: Number of trials searched using hyperparameters displayed on the current page. Range: N/A |
| limit | Integer | Definition: Maximum number of trials searched using hyperparameters displayed on the current page. Range: N/A |
| offset | Integer | Definition: Page number of trials searched using hyperparameters. Range: N/A |
| group_by | String | Definition: Category. Range: N/A |
| items | items object | Definition: Hyperparameter search list. |
Example Requests
The following shows how to query all trial information about 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 Example Responses
Status code: 200
ok
{
"total" : 8,
"count" : 8,
"limit" : 50,
"offset" : 0,
"group_by" : "",
"items" : {
"header" : [ "", "done", "pid", "config", "trial_id", "training_iteration", "time_total_s", "worker_index", "reward_attr", "status", "acc", "loss", "best_reward" ],
"data" : [ [ "0", "True", "314", "batch_size: 32\nlearning_rate: 0.05512301741232006\ntrial_index: 0\nparam/batch_size: 32\nparam/learning_rate: 0.05512301741232006", "ae544174", "2", "19.477163314819336", "", "0.0625", "TERMINATED", "0.0625", "tensor(0.0754, device='cuda:0', requires_grad=True)", "0.0625" ], [ "1", "True", "315", "batch_size: 32\nlearning_rate: 0.0785570955603036\ntrial_index: 1\nparam/batch_size: 32\nparam/learning_rate: 0.0785570955603036", "ae548666", "2", "3.601897954940796", "", "0.0", "TERMINATED", "0.0", "tensor(0.0760, device='cuda:0', requires_grad=True)", "0.0" ], [ "2", "True", "312", "batch_size: 16\nlearning_rate: 0.04015387428829642\ntrial_index: 2\nparam/batch_size: 16\nparam/learning_rate: 0.04015387428829642", "ae54c0ea", "2", "3.5978384017944336", "", "0.1875", "TERMINATED", "0.1875", "tensor(0.1469, device='cuda:0', requires_grad=True)", "0.1875" ], [ "3", "True", "313", "batch_size: 32\nlearning_rate: 0.0340820322164706\ntrial_index: 3\nparam/batch_size: 32\nparam/learning_rate: 0.0340820322164706", "ae5503c0", "2", "3.641200304031372", "", "0.25", "TERMINATED", "0.25", "tensor(0.0716, device='cuda:0', requires_grad=True)", "0.25" ], [ "4", "True", "470", "batch_size: 32\nlearning_rate: 0.03656488928171769\ntrial_index: 4\nparam/batch_size: 32\nparam/learning_rate: 0.03656488928171769", "bef46590", "2", "3.6120550632476807", "", "0.09375", "TERMINATED", "0.09375", "tensor(0.0740, device='cuda:0', requires_grad=True)", "0.09375" ], [ "5", "True", "499", "batch_size: 32\nlearning_rate: 0.008413169003970163\ntrial_index: 5\nparam/batch_size: 32\nparam/learning_rate: 0.008413169003970163", "bef578f4", "2", "3.6379287242889404", "", "0.1875", "TERMINATED", "0.1875", "tensor(0.0723, device='cuda:0', requires_grad=True)", "0.1875" ], [ "6", "True", "528", "batch_size: 64\nlearning_rate: 0.06297447200613912\ntrial_index: 6\nparam/batch_size: 64\nparam/learning_rate: 0.06297447200613912", "bef5c584", "2", "3.711118221282959", "", "0.046875", "TERMINATED", "0.046875", "tensor(0.0381, device='cuda:0', requires_grad=True)", "0.046875" ], [ "7", "True", "557", "batch_size: 32\nlearning_rate: 0.04426479392014276\ntrial_index: 7\nparam/batch_size: 32\nparam/learning_rate: 0.04426479392014276", "bef60684", "2", "3.6971280574798584", "", "0.0625", "TERMINATED", "0.0625", "tensor(0.0778, device='cuda:0', requires_grad=True)", "0.0625" ] ]
}
} Status Codes
| Status Code | Description |
|---|---|
| 200 | ok |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot