
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>
18 KiB
Querying Training Job Logs
Function
This API is used to query detailed information about training job logs by row.
URI
GET /v1/{project_id}/training-jobs/{job_id}/versions/{version_id}/aom-log
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details about how to obtain the project ID, see Obtaining a Project ID. |
job_id |
Yes |
Long |
ID of a training job |
version_id |
Yes |
Long |
Version ID of a training job |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
base_line |
No |
String |
Base line of the log, which is obtained from an API response. If the value is empty, the latest log is obtained. |
lines |
No |
Integer |
Length of the obtained log. The default value is 50 lines. The value range is [0, 500]. |
log_file |
Yes |
String |
Name of the log file to be viewed. For details about how to obtain the log file name, see Obtaining the Name of a Training Job Log File. |
order |
No |
String |
Log query direction
|
Request Body
None
Response Body
Parameter |
Type |
Description |
---|---|---|
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. |
content |
String |
Content of the requested log |
lines |
Integer |
Lines of the obtained logs |
start_line |
String |
Start position of the obtained log |
end_line |
String |
End position of the obtained log |
is_success |
Boolean |
Whether the request is successful |
Samples
The following shows how to query the logs contained in log1.log of the job whose job_id is 10 and version_id is 10.
- Sample request
GET https://endpoint/v1/{project_id}/training-jobs/10/versions/10/aom-log?log_file=log1.log&base_line= 1551252759254000002&lines=50&order=desc
- Successful sample response
{ "is_success": true, "start_line":1551252759254000002, "content": "Log string", "end_line": "1551252759254000003", "lines": "1" }
- 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.