创建仿真任务
功能介绍
本接口用于创建仿真任务。
URI
POST https://{hostURL}/v2/{project_id}/sim/pm/batches
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
project_id |
是 |
String |
项目ID。 |
请求参数
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
name |
是 |
String |
任务名称。 |
|
description |
否 |
String |
描述的内容。 |
|
batch_config |
是 |
String |
任务配置信息。 |
|
algorithm_image |
否 |
String |
关联算法镜像,如果任务配置了算法,该字段必填。 |
响应参数
状态码:201
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
url |
String |
仿真任务的资源地址。 |
|
id |
Integer |
仿真任务ID。 |
|
created_at |
TimeStamp |
创建时间。 |
|
updated_at |
TimeStamp |
更新时间。 |
|
passing_score |
Integer |
融合评测通过分数。 |
|
algorithm_name |
String |
关联算法名称。 |
|
algorithm_image |
String |
关联算法镜像。 |
|
algorithm_image_version |
String |
关联算法镜像版本。 |
|
started_at |
Double |
任务开始时间。 |
|
ended_at |
Double |
任务结束时间。 |
|
success |
Integer |
子任务成功数量 |
|
fail |
Integer |
子任务失败数量 |
|
simulation_size |
Integer |
子任务数量 |
|
status |
Integer |
任务状态:
|
|
name |
String |
任务名称。 |
|
description |
String |
任务描述。 |
|
user_id |
String |
用户id。 |
|
designated_simulation_ids |
Array of objects |
用户指定重跑子任务ids |
|
batch_config |
String |
关联batch配置 |
请求示例
POST https://{endpoint}/v2/{project_id}/sim/pm/batches/
{
"name": "test_batches_create",
"description": "test_batches_create",
"algorithm_image": "/v2/my_project_id/sim/pm/algorithm-images/56/",
"batch_config": "/v2/my_project_id/sim/pm/batch-configs/257/"
}
响应示例
状态码:201
请求成功
{
"url": "/v2/my_project_id/sim/pm/batches/938/",
"id": 938,
"created_at": 1747035787.805102,
"updated_at": 1747035787.805121,
"passing_score": 60,
"algorithm_name": "kyber_to_simpro",
"algorithm_image": "/v2/my_project_id/sim/pm/algorithm-images/56/",
"algorithm_image_version": "1",
"started_at": null,
"ended_at": null,
"success": 0,
"fail": 0,
"simulation_size": 0,
"status": 100,
"name": "test_batches_create",
"description": "test_batches_create",
"user_id": "xxxx",
"designated_simulation_ids": null,
"batch_config": "/v2/my_project_id/sim/pm/batch-configs/257/"
}
状态码
|
状态码 |
描述 |
|---|---|
|
201 |
请求成功 |
错误码
请参见错误码。