| @@ -36,8 +36,9 @@ const ( | |||||
| Success = "S000" | Success = "S000" | ||||
| GPU_PYTORCH_IMAGE = "dockerhub.pcl.ac.cn:5000/user-images/openi:tensorRT_7_zouap" | 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" | ConvertRepoPath = "https://git.openi.org.cn/zouap/npu_test" | ||||
| @@ -184,8 +185,10 @@ func createNpuTrainJob(modelConvert *models.AiModelConvert, ctx *context.Context | |||||
| var engineId int64 | var engineId int64 | ||||
| engineId = int64(NPU_MINDSPORE_IMAGE_ID) | engineId = int64(NPU_MINDSPORE_IMAGE_ID) | ||||
| bootfile := MindsporeBootFile | |||||
| if modelConvert.SrcEngine == TENSORFLOW_ENGINE { | if modelConvert.SrcEngine == TENSORFLOW_ENGINE { | ||||
| engineId = int64(NPU_TENSORFLOW_IMAGE_ID) | engineId = int64(NPU_TENSORFLOW_IMAGE_ID) | ||||
| bootfile = TensorFlowBootFile | |||||
| } | } | ||||
| req := &modelarts.GenerateTrainJobReq{ | req := &modelarts.GenerateTrainJobReq{ | ||||
| JobName: modelConvert.ID, | JobName: modelConvert.ID, | ||||
| @@ -193,8 +196,8 @@ func createNpuTrainJob(modelConvert *models.AiModelConvert, ctx *context.Context | |||||
| DataUrl: dataPath, | DataUrl: dataPath, | ||||
| Description: modelConvert.Description, | Description: modelConvert.Description, | ||||
| CodeObsPath: codeObsPath, | CodeObsPath: codeObsPath, | ||||
| BootFileUrl: codeObsPath + MindsporeBootFile, | |||||
| BootFile: MindsporeBootFile, | |||||
| BootFileUrl: codeObsPath + bootfile, | |||||
| BootFile: bootfile, | |||||
| TrainUrl: outputObsPath, | TrainUrl: outputObsPath, | ||||
| FlavorCode: NPU_FlavorCode, | FlavorCode: NPU_FlavorCode, | ||||
| WorkServerNumber: 1, | WorkServerNumber: 1, | ||||