diff --git a/modules/cloudbrain/resty.go b/modules/cloudbrain/resty.go index d9db3bbb5..8387d481a 100755 --- a/modules/cloudbrain/resty.go +++ b/modules/cloudbrain/resty.go @@ -81,7 +81,8 @@ func GetQueuesDetail() (*map[string]int, error) { var jobResult models.QueueDetailResult var result = make(map[string]int, 0) - + retry := 0 +sendjob: res, err := client.R(). SetHeader("Content-Type", "application/json"). SetAuthToken(TOKEN). @@ -92,6 +93,12 @@ func GetQueuesDetail() (*map[string]int, error) { return nil, fmt.Errorf("resty get queues detail failed: %s", err) } + if jobResult.Code == errInvalidToken && retry < 1 { + retry++ + _ = loginCloudbrain() + goto sendjob + } + if jobResult.Code != Success { return nil, fmt.Errorf("jobResult err: %s", res.String()) } diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 606152a71..03ab37143 100755 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -1209,7 +1209,7 @@ modelarts.infer_job_model_file = Model File modelarts.infer_job = Inference Job modelarts.infer_job.model_version = Model/Version modelarts.infer_job.select_model = Select Model -modelarts.infer_job.boot_file_helper=The startup file is the entry file for your program execution and must end in.py.Such as inference.py, main.py, example/inference. Py, case/main.py. +modelarts.infer_job.boot_file_helper=The startup file is the entry file for your program execution and must end in.py.Such as inference.py, main.py, example/inference.py, case/main.py. modelarts.infer_job.tooltip = The model has been deleted and cannot be viewed. modelarts.download_log=Download log file @@ -1232,7 +1232,7 @@ model.manage.version = Version model.manage.label = Label model.manage.size = Size model.manage.create_time = Create Time -model.manage.Description = Description +model.manage.description = Description model.manage.Accuracy = Accuracy model.manage.F1 = F1 model.manage.Precision = Precision @@ -1244,6 +1244,49 @@ model.convert=Model Transformation model.list=Model List model.manage.create_new_convert_task=Create Model Transformation Task +model.manage.notcreatemodel=No model has been created. +model.manage.init1=Code version: You have not initialized the code repository, please +model.manage.init2=initialized first ; +model.manage.createtrainjob_tip=Training task: you haven't created a training task, please create it first +model.manage.createtrainjob=Training task +model.manage.delete=Delete Model +model.manage.delete_confirm=Are you sure to delete this model? Once this model is deleted, it cannot be restored. +model.manage.select.trainjob=Select train task +model.manage.select.version=Select version +model.manage.engine=Model engine +model.manage.select.engine=Select model engine +model.manage.modelfile=Model file +model.manage.modellabel=Model label +model.manage.modeldesc=Model description +model.manage.baseinfo=Base Information +modelconvert.notcreate=No model conversion task has been created. +modelconvert.importfirst1=Please import first +modelconvert.importfirst2=download model +modelconvert.importfirst3=, then converts it. +modelconvert.download=Download +modelconvert.taskname=Task name +modelconvert.modelname=Model name +modelconvert.selectmodel=Select model +modelconvert.modelversion=Model version +modelconvert.selectversion=Select version +modelconvert.selectmodelfile=Select model file +modelconvert.taskstatus=Status +modelconvert.srcengine=Source model engine +modelconvert.outputformat=Output format +modelconvert.createtime=Created time +modelconvert.inputdataformat=Input data format +modelconvert.inputshape=Input tensor shape +modelconvert.inputshapetip=For example: 1,1,32,32, corresponding to the input data format. +modelconvert.netoutputdata=Network output data type +modelconvert.taskdesc=Task description +modelconvert.newtask=New +modelconvert.createtask=Create model transformation task +modelconvert.taskurlname=Model transformation task +log_scroll_start=Scroll to top +log_scroll_end=Scroll to bottom +modelconvert.tasknameempty=Please enter a task name. +modelconvert.inputshapeerror=Format input error, please input such as: 1,1,32,32, corresponding to the input data format. + modelconvert.manage.create_error1=A model transformation task with the same name already exists. modelconvert.manage.create_error2=Only one running model transformation task can be created. modelconvert.manage.model_not_exist=The model does not exist. diff --git a/options/locale/locale_zh-CN.ini b/options/locale/locale_zh-CN.ini index d460e717b..355c2aa33 100755 --- a/options/locale/locale_zh-CN.ini +++ b/options/locale/locale_zh-CN.ini @@ -1257,6 +1257,50 @@ model.convert=模型转换任务 model.list=模型列表 model.manage.create_new_convert_task=创建模型转换任务 +model.manage.notcreatemodel=未创建过模型 +model.manage.init1=代码版本:您还没有初始化代码仓库,请先 +model.manage.init2=创建代码版本; +model.manage.createtrainjob_tip=训练任务:您还没创建过训练任务,请先创建 +model.manage.createtrainjob=训练任务 +model.manage.delete=删除模型 +model.manage.delete_confirm=你确认删除该模型么?此模型一旦删除不可恢复。 +model.manage.select.trainjob=选择训练任务 +model.manage.select.version=选择版本 +model.manage.engine=模型框架 +model.manage.select.engine=选择模型框架 +model.manage.modelfile=模型文件 +model.manage.modellabel=模型标签 +model.manage.modeldesc=模型描述 +model.manage.baseinfo=基本信息 +modelconvert.notcreate=未创建过模型转换任务 +modelconvert.importfirst1=请您先导入 +modelconvert.importfirst2=模型下载 +modelconvert.importfirst3=,然后再对其进行转换。 +modelconvert.download=下载 +modelconvert.taskname=任务名称 +modelconvert.modelname=模型名称 +modelconvert.selectmodel=选择模型 +modelconvert.modelversion=模型版本 +modelconvert.selectversion=选择版本 +modelconvert.selectmodelfile=选择模型文件 +modelconvert.taskstatus=状态 +modelconvert.srcengine=原模型框架 +modelconvert.outputformat=转换后格式 +modelconvert.createtime=创建时间 +modelconvert.inputdataformat=输入数据格式 +modelconvert.inputshape=输入张量形状 +modelconvert.inputshapetip=如:1,1,32,32,与输入数据格式对应。 +modelconvert.netoutputdata=网络输出数据类型 +modelconvert.taskdesc=任务描述 +modelconvert.newtask=新建任务 +modelconvert.createtask=创建模型转换任务 + +modelconvert.taskurlname=模型转换任务 +log_scroll_start=滚动到顶部 +log_scroll_end=滚动到底部 +modelconvert.tasknameempty=请输入任务名称。 +modelconvert.inputshapeerror=格式输入错误,请输入如:1,1,32,32,与输入数据格式对应。 + modelconvert.manage.create_error1=相同的名称模型转换任务已经存在。 modelconvert.manage.create_error2=只能创建一个正在运行的模型转换任务。 modelconvert.manage.model_not_exist=选择的模型不存在。 diff --git a/templates/repo/cloudbrain/benchmark/new.tmpl b/templates/repo/cloudbrain/benchmark/new.tmpl index a60f32853..32e715ab7 100755 --- a/templates/repo/cloudbrain/benchmark/new.tmpl +++ b/templates/repo/cloudbrain/benchmark/new.tmpl @@ -134,7 +134,7 @@ {{else}} -