Obtaining the Content of the YAML Template of an Auto Search Job
Function
This API is used to obtain the YAML configuration file details of an auto search job.
This API is used when you need to create or modify an auto search job. You can use this API to obtain the YAML template details to configure and modify job parameters. Before using this API, ensure that you have the required permission to view the auto search job template. The response message body of the API contains the YAML template details. If you do not have the permission to perform operations, 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, no identity policy-based permission required for calling this API.
URI
GET /v2/{project_id}/training-jobs/autosearch/yaml-templates/{algorithm_type}/{algorithm_name}
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| algorithm_type | Yes | String | Definition: Search algorithm type. Constraints: N/A Range: N/A Default Value: N/A |
| algorithm_name | Yes | String | Definition: Search algorithm name. Constraints: N/A Range: N/A Default Value: N/A |
| 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 |
Request Parameters
None
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| file_name | String | Definition: YAML file name. Range: N/A |
| content | String | Definition: YAML file content. Range: N/A |
Example Requests
The following shows how to query the content of the YAML configuration file whose algorithm_type is hpo and algorithm_name is Bayes.
GET https://{endpoint}/v2/{project_id}/training-jobs/autosearch/yaml-templates/hpo/Bayes Example Responses
Status code: 200
ok
{
"file_name" : "Bayes.yaml",
"content" : "general:\n instance_per_trial: 1\n gpu_per_instance: 1\n cpu_per_instance: 1\n\nsearch_space:\n - params: # only support continuous params\n - type: continuous_param\n name : lr\n start: 0.001\n stop: 0.1\n\nsearch_algorithm:\n type: bayes_opt_search\n max_concurrent: 4\n reward_attr: accuracy\n num_samples: 8\n kind : ucb\n save_model_count : 3\n mode: max\n\nscheduler:\n type: FIFOScheduler"
} 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