
ModelArts GA API 06052022 from R&D R&D has provided a right version of ModelArts GA API (06052022) Reviewed-by: Artem Goncharov <Artem.goncharov@gmail.com>
26 KiB
Querying a List of Training Job Configurations
Function
This API is used to query the created training job configurations that meet the search criteria.
URI
GET /v1/{project_id}/training-job-configs
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details about how to obtain the project ID, see Obtaining a Project ID. |
Request Body
Table 2 describes the request parameters.
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
per_page |
No |
Integer |
Number of job parameters displayed on each page. The value range is [1, 1000]. Default value: 10 |
page |
No |
Integer |
Index of the page to be queried. Default value: 1 |
sortBy |
No |
String |
Sorting mode of the query. The value can be config_name, config_desc, or create_time. The default value is config_name. create_time is not supported for sample sorting. |
order |
No |
String |
Sorting order. Options:
|
search_content |
No |
String |
Search content, for example, a parameter name. By default, this parameter is left blank. |
config_type |
No |
String |
Configuration type to be queried. Options:
|
Response Body
Parameter |
Type |
Description |
---|---|---|
is_success |
Boolean |
Whether the request is successful |
error_message |
String |
Error message of a failed API call. This parameter is not included when the API call succeeds. |
error_code |
String |
Error code of a failed API call. For details, see Error Codes. This parameter is not included when the API call succeeds. |
config_total_count |
Integer |
Total number of the queried training job configurations |
configs |
Array of ConfigResponse objects |
configs parameters |
Parameter |
Type |
Description |
---|---|---|
config_name |
String |
Name of a training job configuration |
config_desc |
String |
Description of a training job configuration |
create_time |
Long |
Time when a training job is created |
engine_type |
Integer |
Engine type of a training job |
engine_name |
String |
Name of the engine selected for a training job |
engine_id |
Long |
ID of the engine selected for a training job |
engine_version |
String |
Version of the engine selected for a training job |
user_image_url |
String |
SWR URL of a custom image used by a training job. Example value: 100.125.5.235:20202/jobmng/custom-cpu-base:1.0 |
user_command |
String |
Boot command used to start the container of a custom image of a training job. The format is bash /home/work/run_train.sh python /home/work/user-job-dir/app/train.py {python_file_parameter}. |
Samples
- Sample request
GET https://endpoint/v1/{project_id}/training-job-configs?per_page=10&page=1&sortBy=create_time&order=asc&search_content=configname
- Successful sample response
{ "is_success": true, "config_total_count": 3, "configs": [ { "config_name": "testConfig", "config_desc": "This is config", "create_time": 1524189990635, "engine_type": 1, "engine_name": "TensorFlow", "engine_id": 1, "engine_version": "TF-1.4.0-python2.7", "user_image_url": "100.125.5.235:20202/jobmng/custom-cpu-base:1.0", "user_command": "bash -x /home/work/run_train.sh python /home/work/user-job-dir/app/mnist/mnist_softmax.py --data_url /home/work/user-job-dir/app/mnist_data" } ] }
- Failed sample response
{ "is_success": false, "error_message": "Error string", "error_code": "ModelArts.0105" }
Status Code
For details about the status code, see Status Code.
Error Codes
See Error Codes.