Reviewed-on: https://git.openi.org.cn/OpenI/aiforge/pulls/3085 Reviewed-by: ychao_1983 <ychao_1983@sina.com>pull/3162/head
@@ -265,7 +265,7 @@ page_dev_yunlao_desc3=China computing power network (C²NET) phase I can realize | |||||
page_dev_yunlao_desc4=Developers can freely select the corresponding computing resources according to the use needs, and can test the adaptability, performance, stability, etc. of the model in different hardware environments. | page_dev_yunlao_desc4=Developers can freely select the corresponding computing resources according to the use needs, and can test the adaptability, performance, stability, etc. of the model in different hardware environments. | ||||
page_dev_yunlao_desc5=If your model requires more computing resources, you can also apply for it separately. | page_dev_yunlao_desc5=If your model requires more computing resources, you can also apply for it separately. | ||||
page_dev_yunlao_apply=Apply Separately | page_dev_yunlao_apply=Apply Separately | ||||
c2net_title=China Computing Network | |||||
c2net_title=China Computing NET(C²NET) | |||||
c2net_desc=Extensive access to intelligent computing centers and supercomputing centers across the country to provide users with free computing resources. | c2net_desc=Extensive access to intelligent computing centers and supercomputing centers across the country to provide users with free computing resources. | ||||
c2net_center=Center | c2net_center=Center | ||||
search=Search | search=Search | ||||
@@ -289,6 +289,7 @@ provide_resoure = Computing resources of CPU/GPU/NPU are provided freely for var | |||||
activity = Activity | activity = Activity | ||||
no_events = There are no events related | no_events = There are no events related | ||||
or_t = or | or_t = or | ||||
powerdby=Powered_by Pengcheng CloudBrain、China Computing NET(C²NET)、 | |||||
[explore] | [explore] | ||||
repos = Repositories | repos = Repositories | ||||
@@ -267,7 +267,7 @@ page_dev_yunlao_desc3=中国算力网(C²NET)一期可实现不同人工智 | |||||
page_dev_yunlao_desc4=开发者可以根据使用需求,自由选择相应计算资源,可以测试模型在不同硬件环境下的适配能力、性能、稳定性等。 | page_dev_yunlao_desc4=开发者可以根据使用需求,自由选择相应计算资源,可以测试模型在不同硬件环境下的适配能力、性能、稳定性等。 | ||||
page_dev_yunlao_desc5=如果您的模型需要更多的计算资源,也可以单独申请。 | page_dev_yunlao_desc5=如果您的模型需要更多的计算资源,也可以单独申请。 | ||||
page_dev_yunlao_apply=单独申请 | page_dev_yunlao_apply=单独申请 | ||||
c2net_title=中国算力网 | |||||
c2net_title=中国算力网(C²NET) | |||||
c2net_desc=广泛接入全国各地智算中心、超算中心,为用户提供免费算力资源 | c2net_desc=广泛接入全国各地智算中心、超算中心,为用户提供免费算力资源 | ||||
c2net_center=中心 | c2net_center=中心 | ||||
search=搜索 | search=搜索 | ||||
@@ -292,6 +292,7 @@ create_pro = 创建项目 | |||||
activity = 活动 | activity = 活动 | ||||
no_events = 还没有与您相关的活动 | no_events = 还没有与您相关的活动 | ||||
or_t = 或 | or_t = 或 | ||||
powerdby=Powered_by 鹏城实验室云脑、中国算力网(C²NET)、 | |||||
[explore] | [explore] | ||||
@@ -572,6 +572,11 @@ func CloudbrainGetLog(ctx *context.APIContext) { | |||||
startLine = 0 | startLine = 0 | ||||
} | } | ||||
} | } | ||||
} else { | |||||
if startLine > 0 { | |||||
startLine += 1 | |||||
endLine += 1 | |||||
} | |||||
} | } | ||||
result = getLogFromModelDir(job.JobName, startLine, endLine, resultPath) | result = getLogFromModelDir(job.JobName, startLine, endLine, resultPath) | ||||
if result == nil { | if result == nil { | ||||
@@ -723,6 +728,7 @@ func getLogFromModelDir(jobName string, startLine int, endLine int, resultPath s | |||||
re = re + line | re = re + line | ||||
count++ | count++ | ||||
} | } | ||||
fileEndLine = i + 1 | |||||
log.Info("read file completed.") | log.Info("read file completed.") | ||||
break | break | ||||
} | } | ||||
@@ -732,13 +738,12 @@ func getLogFromModelDir(jobName string, startLine int, endLine int, resultPath s | |||||
} | } | ||||
if error == nil { | if error == nil { | ||||
if i >= startLine { | if i >= startLine { | ||||
fileEndLine = i | |||||
fileEndLine = i + 1 | |||||
re = re + line | re = re + line | ||||
count++ | count++ | ||||
} | } | ||||
} | } | ||||
} | } | ||||
fileEndLine = fileEndLine + 1 | |||||
} else { | } else { | ||||
log.Info("error:" + err.Error()) | log.Info("error:" + err.Error()) | ||||
} | } | ||||
@@ -291,6 +291,7 @@ func queryTaskStatusFromCloudbrain(job *models.Cloudbrain) { | |||||
} else { | } else { | ||||
// | // | ||||
job.Status = string(models.ModelSafetyTesting) | job.Status = string(models.ModelSafetyTesting) | ||||
job.EndTime = 0 | |||||
err = models.UpdateJob(job) | err = models.UpdateJob(job) | ||||
if err != nil { | if err != nil { | ||||
log.Error("UpdateJob failed:", err) | log.Error("UpdateJob failed:", err) | ||||
@@ -307,6 +308,9 @@ func queryTaskStatusFromModelSafetyTestServer(job *models.Cloudbrain) { | |||||
if result.Data.Status == 1 { | if result.Data.Status == 1 { | ||||
log.Info("The task is running....") | log.Info("The task is running....") | ||||
} else { | } else { | ||||
job.EndTime = timeutil.TimeStampNow() | |||||
job.Duration = (job.EndTime.AsTime().Unix() - job.StartTime.AsTime().Unix()) / 1000 | |||||
job.TrainJobDuration = models.ConvertDurationToStr(job.Duration) | |||||
if result.Data.Code == 0 { | if result.Data.Code == 0 { | ||||
job.ResultJson = result.Data.StandardJson | job.ResultJson = result.Data.StandardJson | ||||
job.Status = string(models.JobSucceeded) | job.Status = string(models.JobSucceeded) | ||||
@@ -440,6 +444,9 @@ func updateJobFailed(job *models.Cloudbrain, msg string) { | |||||
//update task failed. | //update task failed. | ||||
job.Status = string(models.ModelArtsTrainJobFailed) | job.Status = string(models.ModelArtsTrainJobFailed) | ||||
job.ResultJson = msg | job.ResultJson = msg | ||||
job.EndTime = timeutil.TimeStampNow() | |||||
job.Duration = (job.EndTime.AsTime().Unix() - job.StartTime.AsTime().Unix()) / 1000 | |||||
job.TrainJobDuration = models.ConvertDurationToStr(job.Duration) | |||||
err := models.UpdateJob(job) | err := models.UpdateJob(job) | ||||
if err != nil { | if err != nil { | ||||
log.Error("UpdateJob failed:", err) | log.Error("UpdateJob failed:", err) | ||||
@@ -45,7 +45,7 @@ | |||||
<div class="sixteen wide mobile eight wide tablet eight wide computer column" style=" margin:2.0rem 0"> | <div class="sixteen wide mobile eight wide tablet eight wide computer column" style=" margin:2.0rem 0"> | ||||
{{.i18n.Tr "custom.foot.copyright"}} <a href="http://beian.miit.gov.cn/" target="_blank">京ICP备18004880号</a> | {{.i18n.Tr "custom.foot.copyright"}} <a href="http://beian.miit.gov.cn/" target="_blank">京ICP备18004880号</a> | ||||
<br> | <br> | ||||
{{.i18n.Tr "Powered_by 鹏城实验室云脑、"}}<a href="https://www.trustie.net/" target="_blank">Trustie确实</a>{{.i18n.Tr "、gitea"}} | |||||
{{.i18n.Tr "home.powerdby"}}<a href="https://www.trustie.net/" target="_blank">Trustie确实</a>{{.i18n.Tr "、Gitea"}} | |||||
<br> | <br> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -565,4 +565,5 @@ | |||||
$("#choice_Engine").removeClass('disabled'); | $("#choice_Engine").removeClass('disabled'); | ||||
} | } | ||||
} | } | ||||
</script> | </script> |
@@ -285,7 +285,7 @@ function transObj(data){ | |||||
DatasetName:TrainTaskInfo.DatasetName || '--', | DatasetName:TrainTaskInfo.DatasetName || '--', | ||||
Parameters:TrainTaskInfo.Parameters || '--', | Parameters:TrainTaskInfo.Parameters || '--', | ||||
FlavorName:TrainTaskInfo.FlavorName || '--', | FlavorName:TrainTaskInfo.FlavorName || '--', | ||||
WorkServerNumber:TrainTaskInfo.WorkServerNumber || '--', | |||||
WorkServerNumber:TrainTaskInfo.WorkServerNumber || '1', | |||||
Parameters:Parameters, | Parameters:Parameters, | ||||
EngineName:EngineName, | EngineName:EngineName, | ||||
DisplayJobName:TrainTaskInfo.DisplayJobName || '--', | DisplayJobName:TrainTaskInfo.DisplayJobName || '--', | ||||