From c16a2812393b7e3fab49e45dee256f019833f23c Mon Sep 17 00:00:00 2001 From: Gitea Date: Thu, 21 Jul 2022 11:08:02 +0800 Subject: [PATCH 1/4] fix issue --- web_src/js/features/cloudbrainShow.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/web_src/js/features/cloudbrainShow.js b/web_src/js/features/cloudbrainShow.js index 5e9833616..ab51bf6b5 100644 --- a/web_src/js/features/cloudbrainShow.js +++ b/web_src/js/features/cloudbrainShow.js @@ -189,7 +189,7 @@ export default async function initCloudrainSow() { htmlBread += "
/
"; $(`#file_breadcrumb${version_name}`).append(htmlBread); } else { - renderBrend(path, version_name, parents, filename, init, downloadFlag); + renderBrend(path, version_name, parents, filename, init, downloadFlag,gpuFlag); } }).fail(function (err) { console.log(err, version_name); @@ -223,7 +223,8 @@ export default async function initCloudrainSow() { parents, filename, init, - downloadFlag + downloadFlag, + gpuFlag ) { if (init == "folder") { let htmlBrend = ""; @@ -234,11 +235,11 @@ export default async function initCloudrainSow() { let filename1 = $(`input[name=modelback${version_name}]`).val(); if (parents1 === "") { $(`#file_breadcrumb${version_name} .active.section`).replaceWith( - `${sectionName}` + `${sectionName}` ); } else { $(`#file_breadcrumb${version_name} .active.section`).replaceWith( - `${sectionName}` + `${sectionName}` ); } @@ -279,7 +280,7 @@ export default async function initCloudrainSow() { html += ""; html += ""; if (data.Dirs[i].IsDir) { - html += ``; + html += ``; html += "" + data.Dirs[i].FileName + From 45bc5d11d5852cd52674edb772f1a8f6297bacda Mon Sep 17 00:00:00 2001 From: Gitea Date: Thu, 21 Jul 2022 11:39:24 +0800 Subject: [PATCH 2/4] fix issue --- templates/repo/cloudbrain/inference/new.tmpl | 2 +- templates/repo/modelarts/inferencejob/new.tmpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/repo/cloudbrain/inference/new.tmpl b/templates/repo/cloudbrain/inference/new.tmpl index 223fcfe1c..d36744ad2 100644 --- a/templates/repo/cloudbrain/inference/new.tmpl +++ b/templates/repo/cloudbrain/inference/new.tmpl @@ -322,7 +322,7 @@ loadCheckpointList(dataID).then((res)=>{ res.forEach(element => { const ckptSuffix = element.FileName.split(".") - const loadCheckpointFile = ['ckpt','pb','h5','json','pkl','pth','t7'] + const loadCheckpointFile = ['ckpt','pb','h5','json','pkl','pth','t7','pdparams','onnx','pbtxt','keras','mlmodel','cfg','pt'] if(!element.IsDir && loadCheckpointFile.includes(ckptSuffix[ckptSuffix.length-1])){ html += `
${element.FileName}
` } diff --git a/templates/repo/modelarts/inferencejob/new.tmpl b/templates/repo/modelarts/inferencejob/new.tmpl index 89f4180c0..6917eb43f 100644 --- a/templates/repo/modelarts/inferencejob/new.tmpl +++ b/templates/repo/modelarts/inferencejob/new.tmpl @@ -339,7 +339,7 @@ loadCheckpointList(dataID).then((res)=>{ res.forEach(element => { const ckptSuffix = element.FileName.split(".") - const loadCheckpointFile = ['ckpt','pb','h5','json','pkl','pth','t7'] + const loadCheckpointFile = ['ckpt','pb','h5','json','pkl','pth','t7','pdparams','onnx','pbtxt','keras','mlmodel','cfg','pt'] if(!element.IsDir && loadCheckpointFile.includes(ckptSuffix[ckptSuffix.length-1])){ html += `
${element.FileName}
` } From c2488397fc2aff65e7d3e7f4626e90bd5dbe8a80 Mon Sep 17 00:00:00 2001 From: Gitea Date: Thu, 21 Jul 2022 14:49:55 +0800 Subject: [PATCH 3/4] fix issue --- web_src/js/features/cloudbrainShow.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web_src/js/features/cloudbrainShow.js b/web_src/js/features/cloudbrainShow.js index ab51bf6b5..12e0b71a4 100644 --- a/web_src/js/features/cloudbrainShow.js +++ b/web_src/js/features/cloudbrainShow.js @@ -175,7 +175,9 @@ export default async function initCloudrainSow() { let url = `/api/v1/repos${path}?version_name=${version_name}&parentDir=${parents}`; $.get(url, (data) => { $(`#dir_list${version_name}`).empty(); - renderDir(path, data, version_name, downloadFlag, gpuFlag); + if(data.Dirs){ + renderDir(path, data, version_name, downloadFlag, gpuFlag); + } if (init === "init") { $(`input[name=model${version_name}]`).val(""); $(`input[name=modelback${version_name}]`).val(version_name); From 52eac4422dc177775e6fcf62ccf73a0cc7be35bd Mon Sep 17 00:00:00 2001 From: zouap Date: Thu, 21 Jul 2022 15:32:46 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E8=A7=A3=E5=86=B3GPU=E6=A8=A1=E5=9E=8B?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=B8=A6=E5=A4=9A=E7=BA=A7=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- modules/storage/minio_ext.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/modules/storage/minio_ext.go b/modules/storage/minio_ext.go index 4ad83da82..4c0cbac55 100755 --- a/modules/storage/minio_ext.go +++ b/modules/storage/minio_ext.go @@ -187,9 +187,6 @@ func GetOneLevelAllObjectUnderDirMinio(bucket string, prefixRootPath string, rel if val.Key == Prefix { continue } - if strings.Contains(val.Key[prefixLen:len(val.Key)-1], "/") { - continue - } if strings.HasSuffix(val.Key, "/") { isDir = true fileName = val.Key[prefixLen : len(val.Key)-1]