diff --git a/README.md b/README.md
index b6e7892c9..061ece70c 100644
--- a/README.md
+++ b/README.md
@@ -46,3 +46,6 @@
- 点击[这里](https://git.openi.org.cn/OpenI/aiforge/issues)在线提交问题(点击页面右上角绿色按钮**创建任务**)
- 加入微信群实时交流,获得进一步的支持
+
+## 启智社区小白训练营:
+- 结合案例给大家详细讲解如何使用社区平台,帮助无技术背景的小白成长为启智社区达人 (https://git.openi.org.cn/zeizei/OpenI_Learning)
diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini
index 3a65d974d..35f0a98bf 100644
--- a/options/locale/locale_en-US.ini
+++ b/options/locale/locale_en-US.ini
@@ -903,6 +903,8 @@ model.manage.F1 = F1
model.manage.Precision = Precision
model.manage.Recall = Recall
model.manage.sava_model = Sava Model
+model.manage.model_manage = ModelManage
+model.manage.model_accuracy = Model Accuracy
template.items = Template Items
template.git_content = Git Content (Default Branch)
diff --git a/options/locale/locale_zh-CN.ini b/options/locale/locale_zh-CN.ini
index ee7ca709a..0389471c2 100755
--- a/options/locale/locale_zh-CN.ini
+++ b/options/locale/locale_zh-CN.ini
@@ -913,6 +913,8 @@ model.manage.F1 = F1值
model.manage.Precision = 精确率
model.manage.Recall = 召回率
model.manage.sava_model = 保存模型
+model.manage.model_manage = 模型管理
+model.manage.model_accuracy = 模型精度
template.items=模板选项
template.git_content=Git数据(默认分支)
diff --git a/routers/api/v1/repo/modelarts.go b/routers/api/v1/repo/modelarts.go
index 676097465..283696007 100755
--- a/routers/api/v1/repo/modelarts.go
+++ b/routers/api/v1/repo/modelarts.go
@@ -7,7 +7,6 @@ package repo
import (
"net/http"
- "os"
"strconv"
"strings"
@@ -15,8 +14,8 @@ import (
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/modelarts"
- "code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/storage"
+ routerRepo "code.gitea.io/gitea/routers/repo"
)
func GetModelArtsNotebook(ctx *context.APIContext) {
@@ -258,7 +257,7 @@ func DelTrainJobVersion(ctx *context.APIContext) {
}
}
} else { //已删除该任务下的所有版本
- deleteJobStorage(task.JobName)
+ routerRepo.DeleteJobStorage(task.JobName)
}
ctx.JSON(http.StatusOK, map[string]interface{}{
@@ -325,21 +324,3 @@ func ModelList(ctx *context.APIContext) {
"PageIsCloudBrain": true,
})
}
-
-func deleteJobStorage(jobName string) error {
- //delete local
- localJobPath := setting.JobPath + jobName
- err := os.RemoveAll(localJobPath)
- if err != nil {
- log.Error("RemoveAll(%s) failed:%v", localJobPath, err)
- }
-
- //delete oss
- dirPath := setting.CodePathPrefix + jobName + "/"
- err = storage.ObsRemoveObject(setting.Bucket, dirPath)
- if err != nil {
- log.Error("ObsRemoveObject(%s) failed:%v", localJobPath, err)
- }
-
- return nil
-}
diff --git a/routers/repo/cloudbrain.go b/routers/repo/cloudbrain.go
index 382d61f61..ab3303408 100755
--- a/routers/repo/cloudbrain.go
+++ b/routers/repo/cloudbrain.go
@@ -294,7 +294,7 @@ func CloudBrainRestart(ctx *context.Context) {
if count >= 1 {
log.Error("the user already has running or waiting task", ctx.Data["MsgID"])
resultCode = "-1"
- errorMsg = "the user already has running or waiting task"
+ errorMsg = "you have already a running or waiting task, can not create more"
break
}
}
diff --git a/routers/repo/modelarts.go b/routers/repo/modelarts.go
index c292f0d31..31b0b196b 100755
--- a/routers/repo/modelarts.go
+++ b/routers/repo/modelarts.go
@@ -11,11 +11,10 @@ import (
"strings"
"time"
- "code.gitea.io/gitea/modules/cloudbrain"
-
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/auth"
"code.gitea.io/gitea/modules/base"
+ "code.gitea.io/gitea/modules/cloudbrain"
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/git"
"code.gitea.io/gitea/modules/log"
@@ -249,7 +248,7 @@ func NotebookManage(ctx *context.Context) {
break
}
- if !ctx.IsSigned || (ctx.User.ID != task.UserID && !ctx.IsUserSiteAdmin() && !ctx.IsUserRepoOwner()){
+ if !ctx.IsSigned || (ctx.User.ID != task.UserID && !ctx.IsUserSiteAdmin() && !ctx.IsUserRepoOwner()) {
log.Error("the user has no right ro stop the job", task.JobName, ctx.Data["MsgID"])
resultCode = "-1"
errorMsg = "you have no right to stop the job"
@@ -263,7 +262,7 @@ func NotebookManage(ctx *context.Context) {
break
}
- if !ctx.IsSigned || (ctx.User.ID != task.UserID && !ctx.IsUserSiteAdmin()){
+ if !ctx.IsSigned || (ctx.User.ID != task.UserID && !ctx.IsUserSiteAdmin()) {
log.Error("the user has no right ro restart the job", task.JobName, ctx.Data["MsgID"])
resultCode = "-1"
errorMsg = "you have no right to restart the job"
@@ -1413,6 +1412,11 @@ func TrainJobDel(ctx *context.Context) {
}
}
+ //删除存储
+ if len(VersionListTasks) > 0 {
+ DeleteJobStorage(VersionListTasks[0].JobName)
+ }
+
ctx.Redirect(setting.AppSubURL + ctx.Repo.RepoLink + "/modelarts/train-job")
}
@@ -1538,3 +1542,21 @@ func ModelDownload(ctx *context.Context) {
}
http.Redirect(ctx.Resp, ctx.Req.Request, url, http.StatusMovedPermanently)
}
+
+func DeleteJobStorage(jobName string) error {
+ //delete local
+ localJobPath := setting.JobPath + jobName
+ err := os.RemoveAll(localJobPath)
+ if err != nil {
+ log.Error("RemoveAll(%s) failed:%v", localJobPath, err)
+ }
+
+ //delete oss
+ dirPath := setting.CodePathPrefix + jobName + "/"
+ err = storage.ObsRemoveObject(setting.Bucket, dirPath)
+ if err != nil {
+ log.Error("ObsRemoveObject(%s) failed:%v", localJobPath, err)
+ }
+
+ return nil
+}
diff --git a/templates/repo/debugjob/index.tmpl b/templates/repo/debugjob/index.tmpl
index 7e6cbdd82..698a29ecb 100755
--- a/templates/repo/debugjob/index.tmpl
+++ b/templates/repo/debugjob/index.tmpl
@@ -334,10 +334,15 @@
{{end}}
{{else}}
-
-
- {{$.i18n.Tr "repo.debug_again"}}
-
+ {{if eq .Status "RUNNING"}}
+
+ {{$.i18n.Tr "repo.debug"}}
+
+ {{else}}
+
+ {{$.i18n.Tr "repo.debug_again"}}
+
+ {{end}}
{{end}}
diff --git a/templates/repo/issue/list.tmpl b/templates/repo/issue/list.tmpl
index 96d4c0ab5..1e29b6512 100644
--- a/templates/repo/issue/list.tmpl
+++ b/templates/repo/issue/list.tmpl
@@ -4,6 +4,7 @@
}
.ovfl{
overflow-y:hidden !important;
+ min-width: 140px!important;
}
{{template "base/head" .}}
diff --git a/templates/repo/modelmanage/showinfo.tmpl b/templates/repo/modelmanage/showinfo.tmpl
index 8cdb08a32..a6b35500a 100644
--- a/templates/repo/modelmanage/showinfo.tmpl
+++ b/templates/repo/modelmanage/showinfo.tmpl
@@ -69,7 +69,7 @@
准确率 | +{{$.i18n.Tr "repo.model.manage.Accuracy"}} | |
精确率 | +{{$.i18n.Tr "repo.model.manage.Precision"}} | |
召回率 | +{{$.i18n.Tr "repo.model.manage.Recall"}} |