API请求
URLs
PUT zstack/v1/model-evaluation-tasks/{uuid}Headers
Authorization: OAuth the-session-uuidBody
{
"updateModelEvaluationTask": {
"name": "update-to-new-name",
"description": "update-to-new-description"
},
"systemTags": [],
"userTags": []
}上述示例中systemTags、userTags字段可以省略。列出是为了表示body中可以包含这两个字段。
Curl示例
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X PUT -d '{"updateModelEvaluationTask":{"name":"update-to-new-name","description":"update-to-new-description"}}' \
http://localhost:8080/zstack/v1/model-evaluation-tasks/3d5ca93bd7c03fddbf48cea9ff234e19参数列表
| 名字 | 类型 | 位置 | 描述 | 可选值 | 起始版本 |
|---|---|---|---|---|---|
| uuid | String | url | 资源的UUID,唯一标示该资源 | 5.3.20 | |
| name (可选) | String | body(包含在updateModelEvaluationTask结构中) | 资源名称 | 5.3.20 | |
| description (可选) | String | body(包含在updateModelEvaluationTask结构中) | 资源的详细描述 | 5.3.20 | |
| systemTags (可选) | List | body | 系统标签 | 5.3.20 | |
| userTags (可选) | List | body | 用户标签 | 5.3.20 |
API返回
返回示例
{
"inventory": {
"uuid": "taskUuid",
"name": "eval-task",
"status": "Running"
}
}返回字段
| 名字 | 类型 | 描述 | 起始版本 |
|---|---|---|---|
| success | Boolean | 操作是否成功 | 5.1.8 |
| error | ErrorCode | 错误码,操作成功时该字段为null | 5.1.8 |
| inventory | ModelEvaluationTaskInventory | 模型评测任务清单 | 5.1.8 |
#inventory
| 名字 | 类型 | 描述 | 起始版本 |
|---|---|---|---|
| uuid | String | 资源的UUID,唯一标识该资源 | 5.1.8 |
| name | String | 任务名称 | 5.1.8 |
| type | String | 任务类型 | 5.1.8 |
| description | String | 任务描述 | 5.1.8 |
| percentage | Integer | 任务进度百分比 | 5.1.8 |
| opaque | String | 扩展信息 | 5.1.8 |
| status | String | 任务状态 | 5.1.8 |
| modelServiceGroupUuid | String | 模型服务实例组UUID | 5.1.8 |
| evaluatedServiceGroupUuid | String | 被评测服务实例组UUID | 5.1.8 |
| datasetUuid | String | 数据集UUID | 5.1.8 |
| limits | Integer | 限制数量 | 5.1.8 |
| maxNewTokens | Integer | 最大新生成Token数量 | 5.1.8 |
| topK | Integer | Top K参数 | 5.1.8 |
| temperature | Float | 温度参数 | 5.1.8 |
| topP | Float | Top P参数 | 5.1.8 |
| prompt | String | 提示词 | 5.1.8 |
| repetitionPenalty | Float | 重复惩罚参数 | 5.1.8 |
| maxLength | Integer | 最大长度 | 5.1.8 |
| model | String | 模型名称 | 5.1.8 |
| url | String | 服务URL | 5.1.8 |
| parallel | Integer | 并发数 | 5.1.8 |
| logEveryQuery | Integer | 查询日志间隔 | 5.1.8 |
| api | String | API类型 | 5.1.8 |
| requestHeaders | Map | 请求头 | 5.1.8 |
| connectTimeout | Integer | 连接超时时间 | 5.1.8 |
| readTimeout | Integer | 读取超时时间 | 5.1.8 |
| totalScore | Double | 总分 | 5.1.8 |
| endTime | Timestamp | 结束时间 | 5.1.8 |
| createDate | Timestamp | 创建时间 | 5.1.8 |
| lastOpDate | Timestamp | 最后一次修改时间 | 5.1.8 |
SDK示例
Java
SDK
UpdateModelEvaluationTaskAction action = new UpdateModelEvaluationTaskAction();
action.uuid = "3d5ca93bd7c03fddbf48cea9ff234e19";
action.name = "update-to-new-name";
action.description = "update-to-new-description";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
UpdateModelEvaluationTaskAction.Result res = action.call();Python
SDK
UpdateModelEvaluationTaskAction action = UpdateModelEvaluationTaskAction()
action.uuid = "3d5ca93bd7c03fddbf48cea9ff234e19"
action.name = "update-to-new-name"
action.description = "update-to-new-description"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
UpdateModelEvaluationTaskAction.Result res = action.call()