From baad7eee6bae433f9f7307047439b80dda8e0431 Mon Sep 17 00:00:00 2001 From: zouap Date: Thu, 9 Jun 2022 09:09:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- routers/repo/ai_model_convert.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/routers/repo/ai_model_convert.go b/routers/repo/ai_model_convert.go index 8a6e89d80..72dffc1e4 100644 --- a/routers/repo/ai_model_convert.go +++ b/routers/repo/ai_model_convert.go @@ -36,8 +36,9 @@ const ( Success = "S000" GPU_PYTORCH_IMAGE = "dockerhub.pcl.ac.cn:5000/user-images/openi:tensorRT_7_zouap" - PytorchBootFile = "convert_pytorch.py" - MindsporeBootFile = "convert_mindspore.py" + PytorchBootFile = "convert_pytorch.py" + MindsporeBootFile = "convert_mindspore.py" + TensorFlowBootFile = "convert_tensorflow.py" ConvertRepoPath = "https://git.openi.org.cn/zouap/npu_test" @@ -184,8 +185,10 @@ func createNpuTrainJob(modelConvert *models.AiModelConvert, ctx *context.Context var engineId int64 engineId = int64(NPU_MINDSPORE_IMAGE_ID) + bootfile := MindsporeBootFile if modelConvert.SrcEngine == TENSORFLOW_ENGINE { engineId = int64(NPU_TENSORFLOW_IMAGE_ID) + bootfile = TensorFlowBootFile } req := &modelarts.GenerateTrainJobReq{ JobName: modelConvert.ID, @@ -193,8 +196,8 @@ func createNpuTrainJob(modelConvert *models.AiModelConvert, ctx *context.Context DataUrl: dataPath, Description: modelConvert.Description, CodeObsPath: codeObsPath, - BootFileUrl: codeObsPath + MindsporeBootFile, - BootFile: MindsporeBootFile, + BootFileUrl: codeObsPath + bootfile, + BootFile: bootfile, TrainUrl: outputObsPath, FlavorCode: NPU_FlavorCode, WorkServerNumber: 1,