1250 lines
39 KiB
JSON
1250 lines
39 KiB
JSON
{
|
||
"schemes": [
|
||
"http",
|
||
"https"
|
||
],
|
||
"swagger": "2.0",
|
||
"info": {
|
||
"description": "推理任务执行服务 API 文档",
|
||
"title": "Remote Task Executor API",
|
||
"termsOfService": "http://swagger.io/terms/",
|
||
"contact": {
|
||
"name": "API Support",
|
||
"url": "http://www.example.com/support",
|
||
"email": "support@example.com"
|
||
},
|
||
"license": {
|
||
"name": "Apache 2.0",
|
||
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
|
||
},
|
||
"version": "1.0"
|
||
},
|
||
"host": "localhost:8080",
|
||
"basePath": "/api/v1",
|
||
"paths": {
|
||
"/api/v1/getInferenceTaskAsync": {
|
||
"post": {
|
||
"description": "查询异步推理任务的处理状态、进度和最终结果",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"任务查询"
|
||
],
|
||
"summary": "查询异步任务状态",
|
||
"parameters": [
|
||
{
|
||
"description": "查询参数",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/models.InferenceAsyncTaskStatusRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.InferenceAsyncTaskStatusResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/handler.Response"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/handler.Response"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/getTaskStatus": {
|
||
"post": {
|
||
"description": "查询推理任务的执行状态和推理URL",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"任务查询"
|
||
],
|
||
"summary": "查询任务状态",
|
||
"parameters": [
|
||
{
|
||
"description": "查询参数",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/models.InferenceTaskStatusRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.InferenceTaskStatusResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/handler.Response"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/handler.Response"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/stopInferenceTask": {
|
||
"post": {
|
||
"description": "停止正在运行的推理任务",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"任务控制"
|
||
],
|
||
"summary": "停止推理任务",
|
||
"parameters": [
|
||
{
|
||
"description": "停止任务参数",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/models.StopInferenceTaskRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.StopInferenceTaskResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/handler.Response"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/handler.Response"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/submitInferenceTaskAsync": {
|
||
"post": {
|
||
"description": "异步提交推理任务,立即返回 task_id,任务在后台处理",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"任务管理"
|
||
],
|
||
"summary": "异步提交推理任务",
|
||
"parameters": [
|
||
{
|
||
"description": "推理任务配置",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/models.InferenceSubmitTaskRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.InferenceAsyncSubmitResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/handler.Response"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/handler.Response"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/submitTask": {
|
||
"post": {
|
||
"description": "同步提交推理任务,包含代码、模型、增量模型的准备步骤,等待完成后返回结果",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"任务管理"
|
||
],
|
||
"summary": "提交推理任务(同步)",
|
||
"parameters": [
|
||
{
|
||
"description": "推理任务配置",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/models.InferenceSubmitTaskRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.InferenceSubmitTaskResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/handler.Response"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/handler.Response"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/uploadCode": {
|
||
"post": {
|
||
"description": "上传代码资源到远程存储",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"资源上传"
|
||
],
|
||
"summary": "上传代码资源",
|
||
"parameters": [
|
||
{
|
||
"description": "代码配置",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/models.UploadCodeRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/handler.Response"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"type": "object",
|
||
"properties": {
|
||
"codeID": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/handler.Response"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/handler.Response"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/uploadModel": {
|
||
"post": {
|
||
"description": "上传模型资源到远程存储",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"资源上传"
|
||
],
|
||
"summary": "上传模型资源",
|
||
"parameters": [
|
||
{
|
||
"description": "模型配置",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/models.DataResourceConfig"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/handler.Response"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"type": "object",
|
||
"properties": {
|
||
"modelID": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/handler.Response"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/handler.Response"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/health": {
|
||
"get": {
|
||
"description": "检查服务健康状态",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"系统"
|
||
],
|
||
"summary": "健康检查",
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/handler.Response"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"type": "object",
|
||
"properties": {
|
||
"status": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"definitions": {
|
||
"handler.Response": {
|
||
"type": "object",
|
||
"properties": {
|
||
"code": {
|
||
"description": "状态码",
|
||
"type": "integer"
|
||
},
|
||
"data": {
|
||
"description": "数据对象"
|
||
},
|
||
"message": {
|
||
"description": "错误信息",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.BaseResourceSpec": {
|
||
"type": "object",
|
||
"properties": {
|
||
"availableUnit": {
|
||
"type": "string"
|
||
},
|
||
"availableValue": {
|
||
"type": "integer"
|
||
},
|
||
"createTime": {
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"type": "integer"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"resourceSpecId": {
|
||
"type": "integer"
|
||
},
|
||
"totalUnit": {
|
||
"type": "string"
|
||
},
|
||
"totalValue": {
|
||
"type": "integer"
|
||
},
|
||
"type": {
|
||
"type": "string"
|
||
},
|
||
"updateTime": {
|
||
"type": "string"
|
||
},
|
||
"userId": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.Card": {
|
||
"type": "object",
|
||
"properties": {
|
||
"card": {
|
||
"type": "string"
|
||
},
|
||
"originImageID": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.Cluster": {
|
||
"type": "object",
|
||
"properties": {
|
||
"clusterID": {
|
||
"type": "string"
|
||
},
|
||
"code": {
|
||
"$ref": "#/definitions/models.CodeInfo"
|
||
},
|
||
"resources": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/models.ResourcesItem"
|
||
}
|
||
},
|
||
"runtime": {
|
||
"$ref": "#/definitions/models.Runtime"
|
||
}
|
||
}
|
||
},
|
||
"models.ClusterImage": {
|
||
"type": "object",
|
||
"properties": {
|
||
"cards": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/models.Card"
|
||
}
|
||
},
|
||
"clusterID": {
|
||
"type": "string"
|
||
},
|
||
"imageID": {
|
||
"type": "integer"
|
||
},
|
||
"originImageID": {
|
||
"type": "string"
|
||
},
|
||
"originImageName": {
|
||
"type": "string"
|
||
},
|
||
"originImageType": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.CodeConfig": {
|
||
"type": "object",
|
||
"required": [
|
||
"code_repo_name",
|
||
"git_branch",
|
||
"git_url",
|
||
"id",
|
||
"mount_path"
|
||
],
|
||
"properties": {
|
||
"code_repo_name": {
|
||
"type": "string"
|
||
},
|
||
"code_repo_vis": {
|
||
"type": "integer"
|
||
},
|
||
"git_branch": {
|
||
"type": "string"
|
||
},
|
||
"git_password": {
|
||
"type": "string"
|
||
},
|
||
"git_url": {
|
||
"type": "string"
|
||
},
|
||
"git_user_name": {
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"type": "integer"
|
||
},
|
||
"is_public": {
|
||
"type": "boolean"
|
||
},
|
||
"mount_path": {
|
||
"type": "string"
|
||
},
|
||
"ssh_key": {
|
||
"type": "string"
|
||
},
|
||
"verify_mode": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.CodeInfo": {
|
||
"type": "object",
|
||
"properties": {
|
||
"bindingID": {
|
||
"type": "integer"
|
||
},
|
||
"type": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.DataResourceConfig": {
|
||
"type": "object",
|
||
"required": [
|
||
"id",
|
||
"identifier",
|
||
"mount_path",
|
||
"name",
|
||
"owner",
|
||
"path",
|
||
"version"
|
||
],
|
||
"properties": {
|
||
"id": {
|
||
"type": "integer"
|
||
},
|
||
"identifier": {
|
||
"type": "string"
|
||
},
|
||
"mount_path": {
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"owner": {
|
||
"type": "string"
|
||
},
|
||
"path": {
|
||
"type": "string"
|
||
},
|
||
"version": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.FileBinding": {
|
||
"type": "object",
|
||
"properties": {
|
||
"bindingID": {
|
||
"type": "integer"
|
||
},
|
||
"type": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.ImageBinding": {
|
||
"type": "object",
|
||
"properties": {
|
||
"imageID": {
|
||
"type": "integer"
|
||
},
|
||
"type": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.ImageInfo": {
|
||
"type": "object",
|
||
"properties": {
|
||
"clusterImages": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/models.ClusterImage"
|
||
}
|
||
},
|
||
"createTime": {
|
||
"type": "string"
|
||
},
|
||
"imageID": {
|
||
"type": "integer"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.InferenceAsyncSubmitRespData": {
|
||
"type": "object",
|
||
"properties": {
|
||
"task_id": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.InferenceAsyncSubmitResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"code": {
|
||
"type": "integer"
|
||
},
|
||
"data": {
|
||
"$ref": "#/definitions/models.InferenceAsyncSubmitRespData"
|
||
},
|
||
"msg": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.InferenceAsyncTaskStatusData": {
|
||
"type": "object",
|
||
"properties": {
|
||
"error": {
|
||
"type": "string"
|
||
},
|
||
"job_set_id": {
|
||
"type": "string"
|
||
},
|
||
"progress": {
|
||
"description": "进度描述",
|
||
"type": "string"
|
||
},
|
||
"result": {
|
||
"description": "任务完成后的结果",
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/models.InferenceSubmitTaskResponse"
|
||
}
|
||
]
|
||
},
|
||
"status": {
|
||
"description": "PENDING/RUNNING/SUBMITTING/COMPLETED/FAILED",
|
||
"type": "string"
|
||
},
|
||
"task_id": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.InferenceAsyncTaskStatusRequest": {
|
||
"type": "object",
|
||
"required": [
|
||
"task_id"
|
||
],
|
||
"properties": {
|
||
"task_id": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.InferenceAsyncTaskStatusResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"code": {
|
||
"type": "integer"
|
||
},
|
||
"data": {
|
||
"$ref": "#/definitions/models.InferenceAsyncTaskStatusData"
|
||
},
|
||
"msg": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.InferenceResultInfo": {
|
||
"type": "object",
|
||
"properties": {
|
||
"jobSetID": {
|
||
"description": "任务集ID",
|
||
"type": "string"
|
||
},
|
||
"localJobID": {
|
||
"description": "本地任务ID",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.InferenceSubmitTaskRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"code_config": {
|
||
"description": "代码配置",
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/models.CodeConfig"
|
||
}
|
||
]
|
||
},
|
||
"command": {
|
||
"description": "启动命令",
|
||
"type": "string"
|
||
},
|
||
"description": {
|
||
"description": "描述",
|
||
"type": "string"
|
||
},
|
||
"image": {
|
||
"description": "镜像信息",
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/models.ImageInfo"
|
||
}
|
||
]
|
||
},
|
||
"model": {
|
||
"description": "模型信息",
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/models.DataResourceConfig"
|
||
}
|
||
]
|
||
},
|
||
"resource": {
|
||
"description": "资源配置",
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/models.RemoteSourceConfig"
|
||
}
|
||
]
|
||
},
|
||
"resource_type": {
|
||
"description": "资源类型",
|
||
"type": "string"
|
||
},
|
||
"sub_model": {
|
||
"description": "增量模型信息(可选)",
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/models.DataResourceConfig"
|
||
}
|
||
]
|
||
},
|
||
"version": {
|
||
"description": "版本",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.InferenceSubmitTaskResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"code": {
|
||
"description": "状态码",
|
||
"type": "integer"
|
||
},
|
||
"data": {
|
||
"description": "响应数据",
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/models.InferenceSubmitTaskResponseData"
|
||
}
|
||
]
|
||
},
|
||
"msg": {
|
||
"description": "消息",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.InferenceSubmitTaskResponseData": {
|
||
"type": "object",
|
||
"properties": {
|
||
"resultInfo": {
|
||
"description": "结果信息",
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/models.InferenceResultInfo"
|
||
}
|
||
]
|
||
},
|
||
"taskInfo": {
|
||
"description": "任务信息",
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/models.SubtaskRequest"
|
||
}
|
||
]
|
||
}
|
||
}
|
||
},
|
||
"models.InferenceTaskStatusData": {
|
||
"type": "object",
|
||
"properties": {
|
||
"status": {
|
||
"description": "任务状态",
|
||
"type": "string"
|
||
},
|
||
"url": {
|
||
"description": "推理URL",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.InferenceTaskStatusRequest": {
|
||
"type": "object",
|
||
"required": [
|
||
"jobSetID",
|
||
"localJobID"
|
||
],
|
||
"properties": {
|
||
"jobSetID": {
|
||
"description": "任务集ID",
|
||
"type": "string"
|
||
},
|
||
"localJobID": {
|
||
"description": "本地任务ID",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.InferenceTaskStatusResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"code": {
|
||
"description": "状态码",
|
||
"type": "integer"
|
||
},
|
||
"data": {
|
||
"description": "任务状态数据",
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/models.InferenceTaskStatusData"
|
||
}
|
||
]
|
||
},
|
||
"msg": {
|
||
"description": "消息",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.InputParams": {
|
||
"type": "object",
|
||
"properties": {
|
||
"ClusterID": {
|
||
"type": "string"
|
||
},
|
||
"Output": {
|
||
"type": "string"
|
||
},
|
||
"PackageName": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.Job": {
|
||
"type": "object",
|
||
"properties": {
|
||
"description": {
|
||
"type": "string"
|
||
},
|
||
"files": {
|
||
"$ref": "#/definitions/models.JobFiles"
|
||
},
|
||
"jobResources": {
|
||
"$ref": "#/definitions/models.JobResources"
|
||
},
|
||
"jobSetID": {
|
||
"description": "停止任务时需要",
|
||
"type": "string"
|
||
},
|
||
"localJobID": {
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"onlyCreate": {
|
||
"type": "boolean"
|
||
},
|
||
"targetJob": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/models.TargetJob"
|
||
}
|
||
},
|
||
"type": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.JobFiles": {
|
||
"type": "object",
|
||
"properties": {
|
||
"dataset": {
|
||
"$ref": "#/definitions/models.FileBinding"
|
||
},
|
||
"image": {
|
||
"$ref": "#/definitions/models.ImageBinding"
|
||
},
|
||
"model": {
|
||
"$ref": "#/definitions/models.FileBinding"
|
||
},
|
||
"sub_model": {
|
||
"$ref": "#/definitions/models.FileBinding"
|
||
}
|
||
}
|
||
},
|
||
"models.JobResources": {
|
||
"type": "object",
|
||
"properties": {
|
||
"clusters": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/models.Cluster"
|
||
}
|
||
},
|
||
"scheduleStrategy": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.JobSetInfo": {
|
||
"type": "object",
|
||
"properties": {
|
||
"jobs": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/models.Job"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"models.RemoteSourceConfig": {
|
||
"type": "object",
|
||
"properties": {
|
||
"availableCount": {
|
||
"type": "integer"
|
||
},
|
||
"baseResourceSpecs": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/models.BaseResourceSpec"
|
||
}
|
||
},
|
||
"changeType": {
|
||
"type": "integer"
|
||
},
|
||
"clusterId": {
|
||
"type": "string"
|
||
},
|
||
"costPerUnit": {
|
||
"type": "integer"
|
||
},
|
||
"costType": {
|
||
"type": "string"
|
||
},
|
||
"createTime": {
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"type": "integer"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"region": {
|
||
"type": "string"
|
||
},
|
||
"sourceKey": {
|
||
"type": "string"
|
||
},
|
||
"status": {
|
||
"type": "integer"
|
||
},
|
||
"tag": {
|
||
"type": "string"
|
||
},
|
||
"totalCount": {
|
||
"type": "integer"
|
||
},
|
||
"type": {
|
||
"type": "string"
|
||
},
|
||
"updateTime": {
|
||
"type": "string"
|
||
},
|
||
"userId": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.ResourceConfig": {
|
||
"type": "object",
|
||
"required": [
|
||
"clusterID"
|
||
],
|
||
"properties": {
|
||
"availableCount": {
|
||
"type": "integer"
|
||
},
|
||
"clusterID": {
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"resources": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/models.ResourcesItem"
|
||
}
|
||
},
|
||
"totalCount": {
|
||
"type": "integer"
|
||
},
|
||
"type": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.ResourcesItem": {
|
||
"type": "object",
|
||
"required": [
|
||
"availableValue",
|
||
"name",
|
||
"type"
|
||
],
|
||
"properties": {
|
||
"availableValue": {
|
||
"type": "integer"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"number": {
|
||
"type": "integer"
|
||
},
|
||
"type": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.RunConfig": {
|
||
"type": "object",
|
||
"properties": {
|
||
"code_config": {
|
||
"$ref": "#/definitions/models.CodeConfig"
|
||
},
|
||
"command": {
|
||
"type": "string"
|
||
},
|
||
"dataset": {
|
||
"$ref": "#/definitions/models.DataResourceConfig"
|
||
},
|
||
"image": {
|
||
"type": "integer"
|
||
},
|
||
"model_name": {
|
||
"$ref": "#/definitions/models.DataResourceConfig"
|
||
},
|
||
"resource": {
|
||
"$ref": "#/definitions/models.ResourceConfig"
|
||
},
|
||
"run_args": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"task_output": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.Runtime": {
|
||
"type": "object",
|
||
"properties": {
|
||
"envs": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"params": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"models.StopInferenceTaskRequest": {
|
||
"type": "object",
|
||
"required": [
|
||
"jobSetID",
|
||
"localJobID"
|
||
],
|
||
"properties": {
|
||
"jobSetID": {
|
||
"description": "任务集ID",
|
||
"type": "string"
|
||
},
|
||
"localJobID": {
|
||
"description": "本地任务ID",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.StopInferenceTaskResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"code": {
|
||
"description": "状态码",
|
||
"type": "integer"
|
||
},
|
||
"message": {
|
||
"description": "消息",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.SubmitTaskRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"code_id": {
|
||
"description": "上传代码返回的ID",
|
||
"type": "integer"
|
||
},
|
||
"dataset_id": {
|
||
"description": "数据集ID(可选)",
|
||
"type": "integer"
|
||
},
|
||
"model_id": {
|
||
"description": "上传模型返回的ID",
|
||
"type": "integer"
|
||
},
|
||
"run_config": {
|
||
"description": "运行配置",
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/models.RunConfig"
|
||
}
|
||
]
|
||
}
|
||
}
|
||
},
|
||
"models.SubtaskRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"jobSetInfo": {
|
||
"$ref": "#/definitions/models.JobSetInfo"
|
||
},
|
||
"userID": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"models.TargetJob": {
|
||
"type": "object",
|
||
"properties": {
|
||
"inputParams": {
|
||
"$ref": "#/definitions/models.InputParams"
|
||
},
|
||
"targetJobID": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.UploadCodeRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"run_config": {
|
||
"description": "运行配置",
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/models.RunConfig"
|
||
}
|
||
]
|
||
}
|
||
}
|
||
}
|
||
}
|
||
} |