获取训练记录。返回结果按开始时间降序排序。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
opensearch:DescribeFunction |
get |
*FunctionTask
|
无 | 无 |
请求语法
GET /v4/openapi/app-groups/{appGroupIdentity}/functions/{functionName}/instances/{instanceName}/tasks HTTP/1.1
路径参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| appGroupIdentity |
string |
是 |
应用名称 |
app_group_name |
| functionName |
string |
是 |
功能名称 |
ctr |
| instanceName |
string |
是 |
实例名称 |
test_model_2 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| status |
string |
否 |
任务状态:
|
success |
| startTime |
integer |
否 |
起始时间大于设定时间,单位毫秒 |
1582214400 |
| endTime |
integer |
否 |
结束时间小于设定时间,单位毫秒 |
1582646399 |
| pageNumber |
integer |
否 |
页码(默认为 1) |
1 |
| pageSize |
integer |
否 |
每页大小(默认为 1) |
10 |
示例
GET /v4/openapi/app-groups/my-app/functions/ctr/instances/ctr_test/tasks
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
响应体 |
{ "status": "OK", "requestId": "", "httpCode": 200, "code": "", "message": "", "latency": 123, "totalCount": 1, "result": [ { "functionName": "ctr", "progress": 100, "status": "success", "startTime": 100010, "endTime": 200020, "extendInfo": "{\"recall\":91,\"errors\":[]}", "runId": "trigger__2021-03-05T12:18:41" } ] } |
|
| Status |
string |
状态码 |
200 |
| HttpCode |
integer |
HTTP 状态码。 |
200 |
| TotalCount |
integer |
符合要求的总记录数 |
2 |
| RequestId |
string |
请求 id |
1638157479281 |
| Message |
string |
请求返回信息 |
fail |
| Code |
string |
HTTP 状态码 |
200 |
| Result |
array<object> |
返回结果。 |
[ { "functionName": "ctr", "progress": 100, "status": "success", "startTime": 100010, "endTime": 200020, "extendInfo": "{\"recall\":91,\"errors\":[]}", "runId": "trigger__2021-03-05T12:18:41" } ] |
|
object |
结果体 |
{ "functionName": "ctr", "progress": 100, "status": "success", "startTime": 100010, "endTime": 200020, "extendInfo": "{\"recall\":91,\"errors\":[]}", "runId": "trigger__2021-03-05T12:18:41" } |
|
| EndTime |
integer |
结束时间,单位毫秒,0 表示未结束 |
100010 |
| ExtendInfo |
string |
json string,包含模型评价信息、训练错误信息等。 |
{\"recall\":91,\"errors\":[]} |
| FunctionName |
string |
功能名称 |
ctr |
| Progress |
integer |
进度,90 表示 90% |
90 |
| RunId |
string |
任务 ID |
trigger__2021-03-05T12:18:41 |
| StartTime |
integer |
起始时间,单位毫秒 |
100010 |
| Status |
string |
任务状态
|
success |
| Generation |
string |
第几次迭代 |
2 |
| Latency |
integer |
请求耗时(单位毫秒) |
123 |
正常返回示例
{
"status": "OK",
"requestId": "",
"httpCode": 200,
"code": "",
"message": "",
"latency": 123,
"totalCount": 1,
"result": [
{
"functionName": "ctr",
"progress": 100,
"status": "success",
"startTime": 100010,
"endTime": 200020,
"extendInfo": "{\"recall\":91,\"errors\":[]}",
"runId": "trigger__2021-03-05T12:18:41",
"generation": "3"
}
]
}
示例
正常返回示例
JSON格式
{
"Status": "200",
"HttpCode": 200,
"TotalCount": 2,
"RequestId": "1638157479281",
"Message": "fail",
"Code": "200",
"Result": [
{
"EndTime": 100010,
"ExtendInfo": "{\\\"recall\\\":91,\\\"errors\\\":[]}",
"FunctionName": "ctr",
"Progress": 90,
"RunId": "trigger__2021-03-05T12:18:41",
"StartTime": 100010,
"Status": "success",
"Generation": "2"
}
],
"Latency": 123
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。