|
|
|
@@ -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, |
|
|
|
|