创建仿真任务配置-CreateSimulationTaskConfiguration
功能介绍
创建仿真任务配置。
URI
POST /v2/{project_id}/sim/pm/batch-configs
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
project_id | 是 | String | 项目ID,获取方法请参见获取项目ID |
请求参数
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
Content-Type | 是 | String | 内容类型。填application/json |
X-Auth-Token | 是 | String | 用户Token,通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值) |
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
name | 是 | String | 仿真任务配置名称,最大长度64位,支持中文,字母,数字及下划线命名 |
description | 否 | String | 仿真任务配置描述,最大长度256位,支持中文,字母,数字及下划线命名 |
duration | 是 | String |
|
repeat_times | 是 | Integer |
|
record_mode | 是 | Integer | 录制模式,可从以下状态选择:
|
priority | 是 | Integer | 优先级,取值越大,优先级越高。可从如下范围中选择:
|
simulator_name | 是 | String | 仿真器名称,如:B |
builtins_evaluation | 是 | Boolean | 是否使用内置评测 true:使用内置评测 false:不使用内置评测 |
algorithm | 否 | String | 关联算法资源地址 |
datahub | 否 | Boolean | 是否使用datahub |
evaluations | 是 | Array of strings | 关联评测管理项目列表 |
custom_evaluation_image | 是 | String | 关联评测镜像资源地址 |
custom_simulator_image_id | 是 | Integer | 镜像管理中的仿真器镜像的版本id |
passing_score | 是 | Integer | 融合评测通过分数,默认60 |
scenario_type | 是 | Integer | 场景类型:
|
scenarios | 否 | scenarios object | 场景信息 |
scenario_set_id | 否 | Int | 场景集合 id |
simulator_command | 否 | String | 仿真器运行命令 |
modal_type | 否 | String | 模态类型,目前只支持相机类型 CAMERA |
model_id | 否 | String | 模型ID |
model_version | 否 | String | 模型版本 |
响应参数
状态码:201
参数 | 参数类型 | 描述 |
|---|---|---|
url | String | 仿真任务配置的资源地址 |
id | Integer | 仿真任务配置ID |
created_at | TimeStamp | 创建时间 |
updated_at | TimeStamp | 更新时间 |
algorithm | String | 关联算法资源地址 |
algorithm_name | String | 算法名称 |
builtins_evaluation | Boolean | 是否使用内置评测 |
custom_evaluation_image | String | 关联评测镜像资源地址 |
custom_simulator_image_id | Integer | 镜像管理中的仿真器镜像的版本id |
simulator_config | String | 仿真器配置信息 |
evaluation_info | 表6 object | 评测配置信息 |
batch_size | Integer | 任务数量 |
duration | String | 子任务最大运行时长 |
repeat_times | Integer | 重复运行次数 |
user_id | String | 用户id |
name | String | 仿真任务配置名称 |
description | String | 仿真任务配置描述 |
simulator_name | String | 仿真器名称,如:B |
record_mode | Integer | 录制模式
|
priority | Integer | 优先级,取值越大,优先级越高。可从如下范围中选择:
|
datahub | Boolean | 是否使用datahub |
passing_score | Integer | 融合评测通过分数,默认60 |
scenario_type | Integer | 场景类型:
|
triggerable | Boolean | 是否可通过流水线功能触发 |
evaluations | Array of strings | 关联评测管理项目 |
scenario_set_id | Int | 场景集合 id |
traffic | String | 交通流量 |
extensions | Array Of Strings | 扩展文件资源地址列表 |
请求示例
POST https://{endpoint}/v2/{project_id}/sim/pm/batch-configs
{
"name": "batch_config_xxx",
"description": "batch_config description",
"duration": 600,
"evaluations": [
"/v2/54d37c8f25axxxxxxxe9772687bf/sim/pm/evaluations/74/"
],
"priority": 60,
"scenarios": {
},
"algorithm": "/v2/54d37c8f25axxxxxxxe9772687bf/sim/pm/algorithms/64/",
"datahub": false,
"simulator_name": "B",
"repeat_times": 100000,
"builtins_evaluation": false,
"custom_evaluation_image": "/v2/54d37c8f25axxxxxxxe9772687bf/sim/pm/evaluation-images/11/",
"passing_score": 60,
"scenario_type": 0,
"scenario_set_id": 41,
"record_mode": 1,
"custom_simulator_image_id": 303973
} 响应示例
状态码:201
{
"url": "/v2/54d37c8f25axxxxxxxe9772687bf/sim/pm/batch-configs/357/",
"id": 357,
"created_at": 1747984785.434156,
"updated_at": 1747984785.434175,
"algorithm": "/v2/54d37c8f25axxxxxxxe9772687bf/sim/pm/algorithms/64/",
"algorithm_name": "algorithm_xxx",
"builtins_evaluation": false,
"custom_evaluation_image": "/v2/54d37c8f25axxxxxxxe9772687bf/sim/pm/evaluation-images/11/",
"custom_simulator_image_id": 303973,
"simulator_config": "",
"evaluation_info": {
"IMAGE": {
"id": 74,
"name": "eva_xxx",
"image_id": 11,
"image_version": "1"
}
},
"batch_size": 0,
"duration": "00:10:00",
"repeat_times": 100000,
"passing_score": 60,
"scenario_type": 0,
"extensions": [],
"user_id": "5ffa2cb7631xxxxxxx736284af7dc4",
"name": "batch_config_xxx",
"description": "batch_config description",
"simulator_name": "B",
"record_mode": 1,
"priority": 60,
"datahub": false,
"scenario_set_id": 41,
"triggerable": false,
"traffic": null,
"evaluations": [
"/v2/54d37c8f25axxxxxxxe9772687bf/sim/pm/evaluations/74/"
]
} 状态码
状态码 | 描述 |
|---|---|
201 | 创建成功 |
错误码
请参见错误码。

