Browse Source

Merge branch 'gpu-inference' of https://git.openi.org.cn/OpenI/aiforge into gpu-inference

pull/2458/head
zhoupzh 2 years ago
parent
commit
b748b9a08e
3 changed files with 13 additions and 6 deletions
  1. +4
    -1
      options/locale/locale_en-US.ini
  2. +5
    -1
      options/locale/locale_zh-CN.ini
  3. +4
    -4
      routers/repo/cloudbrain.go

+ 4
- 1
options/locale/locale_en-US.ini View File

@@ -3122,7 +3122,10 @@ INFERENCE = INFERENCE
BENCHMARK = BENCHMARK BENCHMARK = BENCHMARK
brain_area = Brain Area brain_area = Brain Area


Delete_failed=Fail to delete, please try again later.
Delete_failed=Fail to delete the job, please try again later.
Not_Stopped=The job is not stopped, can not be deleted. Not_Stopped=The job is not stopped, can not be deleted.
Already_stopped=The job is already stopped.
Stopped_failed=Fail to stop the job, please try again later.
Stopped_success_update_status_fail=Succeed in stopping th job, but failed to update the job status and duration time.


error.dataset_select = dataset select error:the count exceed the limit or has same name error.dataset_select = dataset select error:the count exceed the limit or has same name

+ 5
- 1
options/locale/locale_zh-CN.ini View File

@@ -3136,7 +3136,11 @@ INFERENCE = 推理任务
BENCHMARK = 评测任务 BENCHMARK = 评测任务
brain_area = 脑区 brain_area = 脑区


Delete_failed=删除失败,请稍后再试。
Delete_failed=任务删除失败,请稍后再试。
Not_Stopped=任务还未终止,不能删除。 Not_Stopped=任务还未终止,不能删除。
Already_stopped=任务已停止。
Stopped_failed=任务停止失败,请稍后再试。
Stopped_success_update_status_fail=任务停止成功,状态及运行时间更新失败。



error.dataset_select = 数据集选择错误:数量超过限制或者有同名数据集 error.dataset_select = 数据集选择错误:数量超过限制或者有同名数据集

+ 4
- 4
routers/repo/cloudbrain.go View File

@@ -1069,7 +1069,7 @@ func CloudBrainStop(ctx *context.Context) {
if task.Status == string(models.JobStopped) || task.Status == string(models.JobFailed) || task.Status == string(models.JobSucceeded) { if task.Status == string(models.JobStopped) || task.Status == string(models.JobFailed) || task.Status == string(models.JobSucceeded) {
log.Error("the job(%s) has been stopped", task.JobName, ctx.Data["msgID"]) log.Error("the job(%s) has been stopped", task.JobName, ctx.Data["msgID"])
resultCode = "-1" resultCode = "-1"
errorMsg = "system error"
errorMsg = "cloudbrain.Already_stopped"
break break
} }


@@ -1077,7 +1077,7 @@ func CloudBrainStop(ctx *context.Context) {
if err != nil { if err != nil {
log.Error("StopJob(%s) failed:%v", task.JobName, err, ctx.Data["msgID"]) log.Error("StopJob(%s) failed:%v", task.JobName, err, ctx.Data["msgID"])
resultCode = "-1" resultCode = "-1"
errorMsg = "system error"
errorMsg = "cloudbrain.Stopped_failed"
break break
} }


@@ -1090,7 +1090,7 @@ func CloudBrainStop(ctx *context.Context) {
if err != nil { if err != nil {
log.Error("UpdateJob(%s) failed:%v", task.JobName, err, ctx.Data["msgID"]) log.Error("UpdateJob(%s) failed:%v", task.JobName, err, ctx.Data["msgID"])
resultCode = "-1" resultCode = "-1"
errorMsg = "system error"
errorMsg = "cloudbrain.Stopped_success_update_status_fail"
break break
} }


@@ -1100,7 +1100,7 @@ func CloudBrainStop(ctx *context.Context) {


ctx.JSON(200, map[string]interface{}{ ctx.JSON(200, map[string]interface{}{
"result_code": resultCode, "result_code": resultCode,
"error_msg": errorMsg,
"error_msg": ctx.Tr(errorMsg),
"status": status, "status": status,
"id": ID, "id": ID,
"StatusOK": 0, "StatusOK": 0,


Loading…
Cancel
Save