diff --git a/modules/cloudbrain/cloudbrain.go b/modules/cloudbrain/cloudbrain.go
index 36c83e7fb..1b0bef64a 100755
--- a/modules/cloudbrain/cloudbrain.go
+++ b/modules/cloudbrain/cloudbrain.go
@@ -306,7 +306,7 @@ func GenerateTask(ctx *context.Context, displayJobName, jobName, image, command,
if string(models.JobTypeBenchmark) == jobType {
notification.NotifyOtherTask(ctx.User, ctx.Repo.Repository, stringId, displayJobName, models.ActionCreateBenchMarkTask)
} else if string(models.JobTypeTrain) == jobType {
- notification.NotifyOtherTask(ctx.User, ctx.Repo.Repository, stringId, displayJobName, models.ActionCreateGPUTrainTask)
+ notification.NotifyOtherTask(ctx.User, ctx.Repo.Repository, jobID, displayJobName, models.ActionCreateGPUTrainTask)
} else {
notification.NotifyOtherTask(ctx.User, ctx.Repo.Repository, stringId, displayJobName, models.ActionCreateDebugGPUTask)
}
diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini
index 93b34963f..34f8ec3c7 100755
--- a/options/locale/locale_en-US.ini
+++ b/options/locale/locale_en-US.ini
@@ -2747,10 +2747,11 @@ reject_pull_request = `suggested changes for %s#%[2]s`
upload_dataset=`upload dataset %s`
task_gpudebugjob=`created CPU/GPU type debugging task%s`
task_npudebugjob=`created NPU type debugging task %s`
-task_trainjob=`created training task%s`
+task_nputrainjob=`created NPU training task%s`
task_inferencejob=`created reasoning task %s`
task_benchmark=`created profiling task %s`
task_createmodel=`created new model %s`
+task_gputrainjob=`created CPU/GPU training task%s`
[tool]
ago = %s ago
diff --git a/options/locale/locale_zh-CN.ini b/options/locale/locale_zh-CN.ini
index 8f1adc400..d0f246b4a 100755
--- a/options/locale/locale_zh-CN.ini
+++ b/options/locale/locale_zh-CN.ini
@@ -2755,7 +2755,7 @@ task_nputrainjob=`创建了NPU类型训练任务 %s`
task_benchmark=`创建了评测任务 %s`
task_createmodel=`导入了新模型 %s`
-task_gputrainjob=`创建了CPU/GPU类型训练任务 %s`
+task_gputrainjob=`创建了CPU/GPU类型训练任务 %s`
[tool]
ago=%s前
diff --git a/public/home/home.js b/public/home/home.js
index 237ede3e7..478c70f21 100755
--- a/public/home/home.js
+++ b/public/home/home.js
@@ -175,6 +175,8 @@ function getTaskLink(record){
re = re + "/cloudbrain/benchmark/" + record.Content;
}else if(record.OpType == 30){
re = re + "/modelmanage/show_model_info?name=" + record.RefName;
+ }else if(record.OpType == 31){
+ re = re + "/cloudbrain/train-job/" + record.Content;
}
re = encodeURI(re);
return re;
diff --git a/routers/repo/modelarts.go b/routers/repo/modelarts.go
index 47f160e06..ed7cfbe98 100755
--- a/routers/repo/modelarts.go
+++ b/routers/repo/modelarts.go
@@ -485,6 +485,9 @@ func TrainJobIndex(ctx *context.Context) {
}
listType := ctx.Query("listType")
+ if len(listType) == 0 {
+ listType = models.AllResource
+ }
ctx.Data["ListType"] = listType
typeCloudBrain := models.TypeCloudBrainAll
@@ -531,6 +534,7 @@ func TrainJobIndex(ctx *context.Context) {
pager := context.NewPagination(int(count), setting.UI.IssuePagingNum, page, 5)
pager.SetDefaultParams(ctx)
+ pager.AddParam(ctx, "listType", "ListType")
ctx.Data["Page"] = pager
ctx.Data["PageIsCloudBrain"] = true
@@ -1567,6 +1571,7 @@ func trainJobGetLog(jobID string) (*models.GetTrainJobLogFileNamesResult, *model
func TrainJobDel(ctx *context.Context) {
var jobID = ctx.Params(":jobid")
+ var listType = ctx.Query("listType")
repo := ctx.Repo.Repository
var jobTypes []string
@@ -1608,12 +1613,13 @@ func TrainJobDel(ctx *context.Context) {
if ctx.IsUserSiteAdmin() && isAdminPage == "true" {
ctx.Redirect(setting.AppSubURL + "/admin" + "/cloudbrains")
} else {
- ctx.Redirect(setting.AppSubURL + ctx.Repo.RepoLink + "/modelarts/train-job")
+ ctx.Redirect(setting.AppSubURL + ctx.Repo.RepoLink + "/modelarts/train-job?listType=" + listType)
}
}
func TrainJobStop(ctx *context.Context) {
var jobID = ctx.Params(":jobid")
+ var listType = ctx.Query("listType")
task := ctx.Cloudbrain
_, err := modelarts.StopTrainJob(jobID, strconv.FormatInt(task.VersionID, 10))
@@ -1623,7 +1629,7 @@ func TrainJobStop(ctx *context.Context) {
return
}
- ctx.Redirect(setting.AppSubURL + ctx.Repo.RepoLink + "/modelarts/train-job")
+ ctx.Redirect(setting.AppSubURL + ctx.Repo.RepoLink + "/modelarts/train-job?listType=" + listType)
}
func canUserCreateTrainJob(uid int64) (bool, error) {
diff --git a/templates/repo/cloudbrain/trainjob/new.tmpl b/templates/repo/cloudbrain/trainjob/new.tmpl
index d1faebc98..5bd689911 100755
--- a/templates/repo/cloudbrain/trainjob/new.tmpl
+++ b/templates/repo/cloudbrain/trainjob/new.tmpl
@@ -227,7 +227,7 @@
- {{.i18n.Tr "repo.cloudbrain.cancel"}}
+ {{.i18n.Tr "repo.cloudbrain.cancel"}}
@@ -239,8 +239,8 @@
{{template "base/footer" .}}