Browse Source

Merge branch 'V20220228' into fix-1477

pull/1539/head
zhoupzh 3 years ago
parent
commit
9ae76a44bc
3 changed files with 10 additions and 7 deletions
  1. +2
    -1
      modules/modelarts/modelarts.go
  2. +1
    -1
      public/home/home.js
  3. +7
    -5
      routers/repo/modelarts.go

+ 2
- 1
modules/modelarts/modelarts.go View File

@@ -306,7 +306,7 @@ func GenerateNotebook2(ctx *context.Context, jobName, uuid, description, flavor,
Type: models.TypeCloudBrainTwo, Type: models.TypeCloudBrainTwo,
Uuid: uuid, Uuid: uuid,
ComputeResource: models.NPUResource, ComputeResource: models.NPUResource,
Image: imageName,
Image: imageName,
}) })


if err != nil { if err != nil {
@@ -594,6 +594,7 @@ func GenerateInferenceJob(ctx *context.Context, req *GenerateInferenceJobReq) (e
EngineName: req.EngineName, EngineName: req.EngineName,
LabelName: req.LabelName, LabelName: req.LabelName,
IsLatestVersion: req.IsLatestVersion, IsLatestVersion: req.IsLatestVersion,
ComputeResource: models.NPUResource,
VersionCount: req.VersionCount, VersionCount: req.VersionCount,
TotalVersionCount: req.TotalVersionCount, TotalVersionCount: req.TotalVersionCount,
ModelName: req.ModelName, ModelName: req.ModelName,


+ 1
- 1
public/home/home.js View File

@@ -125,7 +125,7 @@ socket.onmessage = function (e) {
else if(record.OpType == "2"){ else if(record.OpType == "2"){
actionName = actionName.replace("{oldRepoName}",record.Content); actionName = actionName.replace("{oldRepoName}",record.Content);
html += recordPrefix + actionName; html += recordPrefix + actionName;
html += " <a href=\"" + getRepoLink(record) + "\" rel=\"nofollow\">" + getRepoLink(record) + "</a>"
html += " <a href=\"" + getRepoLink(record) + "\" rel=\"nofollow\">" + getRepotext(record) + "</a>"
} }
else if(record.OpType == "24" || record.OpType == "25" || record.OpType == "26" || record.OpType == "27" || record.OpType == "28" || record.OpType == "29" || record.OpType == "30"){ else if(record.OpType == "24" || record.OpType == "25" || record.OpType == "26" || record.OpType == "27" || record.OpType == "28" || record.OpType == "29" || record.OpType == "30"){
html += recordPrefix + actionName; html += recordPrefix + actionName;


+ 7
- 5
routers/repo/modelarts.go View File

@@ -257,13 +257,15 @@ func NotebookShow(ctx *context.Context) {
} }


var datasetDownloadLink string var datasetDownloadLink string
if task.Uuid != "" && task.UserID == ctx.User.ID {
attachment, err := models.GetAttachmentByUUID(task.Uuid)
if err == nil {
datasetDownloadLink = attachment.S3DownloadURL()
if ctx.IsSigned {
if task.Uuid != "" && task.UserID == ctx.User.ID {
attachment, err := models.GetAttachmentByUUID(task.Uuid)
if err == nil {
datasetDownloadLink = attachment.S3DownloadURL()
}
} }
} }
ctx.Data["datasetDownloadLink"] = datasetDownloadLink ctx.Data["datasetDownloadLink"] = datasetDownloadLink
ctx.Data["task"] = task ctx.Data["task"] = task
ctx.Data["jobID"] = jobID ctx.Data["jobID"] = jobID


Loading…
Cancel
Save