| @@ -694,8 +694,12 @@ var ( | |||||
| GPU_PYTORCH_IMAGE string | GPU_PYTORCH_IMAGE string | ||||
| GpuQueue string | GpuQueue string | ||||
| GPU_TENSORFLOW_IMAGE string | GPU_TENSORFLOW_IMAGE string | ||||
| GPU_PADDLE_IMAGE string | |||||
| GPU_MXNET_IMAGE string | |||||
| NPU_MINDSPORE_16_IMAGE string | NPU_MINDSPORE_16_IMAGE string | ||||
| PytorchOnnxBootFile string | PytorchOnnxBootFile string | ||||
| PaddleOnnxBootFile string | |||||
| MXnetOnnxBootFile string | |||||
| PytorchTrTBootFile string | PytorchTrTBootFile string | ||||
| MindsporeBootFile string | MindsporeBootFile string | ||||
| TensorFlowNpuBootFile string | TensorFlowNpuBootFile string | ||||
| @@ -1576,6 +1580,10 @@ func getModelConvertConfig() { | |||||
| ModelConvert.NPU_PoolID = sec.Key("NPU_PoolID").MustString("pool7908321a") | ModelConvert.NPU_PoolID = sec.Key("NPU_PoolID").MustString("pool7908321a") | ||||
| ModelConvert.NPU_MINDSPORE_IMAGE_ID = sec.Key("NPU_MINDSPORE_IMAGE_ID").MustInt(121) | ModelConvert.NPU_MINDSPORE_IMAGE_ID = sec.Key("NPU_MINDSPORE_IMAGE_ID").MustInt(121) | ||||
| ModelConvert.NPU_TENSORFLOW_IMAGE_ID = sec.Key("NPU_TENSORFLOW_IMAGE_ID").MustInt(35) | ModelConvert.NPU_TENSORFLOW_IMAGE_ID = sec.Key("NPU_TENSORFLOW_IMAGE_ID").MustInt(35) | ||||
| ModelConvert.GPU_PADDLE_IMAGE = sec.Key("GPU_PADDLE_IMAGE").MustString("dockerhub.pcl.ac.cn:5000/user-images/openi:paddle2.3.0_gpu_cuda11.2_cudnn8") | |||||
| ModelConvert.GPU_MXNET_IMAGE = sec.Key("GPU_MXNET_IMAGE").MustString("dockerhub.pcl.ac.cn:5000/user-images/openi:mxnet191cu_cuda102_py37") | |||||
| ModelConvert.PaddleOnnxBootFile = sec.Key("PaddleOnnxBootFile").MustString("convert_paddle.py") | |||||
| ModelConvert.MXnetOnnxBootFile = sec.Key("MXnetOnnxBootFile").MustString("convert_mxnet.py") | |||||
| } | } | ||||
| func getModelAppConfig() { | func getModelAppConfig() { | ||||
| @@ -29,7 +29,9 @@ const ( | |||||
| tplModelConvertInfo = "repo/modelmanage/convertshowinfo" | tplModelConvertInfo = "repo/modelmanage/convertshowinfo" | ||||
| PYTORCH_ENGINE = 0 | PYTORCH_ENGINE = 0 | ||||
| TENSORFLOW_ENGINE = 1 | TENSORFLOW_ENGINE = 1 | ||||
| MINDSPORE_ENGIN = 2 | |||||
| MINDSPORE_ENGINE = 2 | |||||
| PADDLE_ENGINE = 4 | |||||
| MXNET_ENGINE = 6 | |||||
| ModelMountPath = "/model" | ModelMountPath = "/model" | ||||
| CodeMountPath = "/code" | CodeMountPath = "/code" | ||||
| DataSetMountPath = "/dataset" | DataSetMountPath = "/dataset" | ||||
| @@ -395,6 +397,20 @@ func createGpuTrainJob(modelConvert *models.AiModelConvert, ctx *context.Context | |||||
| deleteLocalDir(relatetiveModelPath) | deleteLocalDir(relatetiveModelPath) | ||||
| dataActualPath = setting.Attachment.Minio.RealPath + setting.Attachment.Minio.Bucket + "/" + setting.CBCodePathPrefix + modelConvert.ID + "/dataset" | dataActualPath = setting.Attachment.Minio.RealPath + setting.Attachment.Minio.Bucket + "/" + setting.CBCodePathPrefix + modelConvert.ID + "/dataset" | ||||
| } | } | ||||
| } else if modelConvert.SrcEngine == PADDLE_ENGINE { | |||||
| IMAGE_URL = setting.ModelConvert.GPU_PADDLE_IMAGE | |||||
| if modelConvert.DestFormat == CONVERT_FORMAT_ONNX { | |||||
| command = getGpuModelConvertCommand(modelConvert.ID, modelConvert.ModelPath, modelConvert, setting.ModelConvert.PaddleOnnxBootFile) | |||||
| } else { | |||||
| return errors.New("Not support the format.") | |||||
| } | |||||
| } else if modelConvert.SrcEngine == MXNET_ENGINE { | |||||
| IMAGE_URL = setting.ModelConvert.GPU_MXNET_IMAGE | |||||
| if modelConvert.DestFormat == CONVERT_FORMAT_ONNX { | |||||
| command = getGpuModelConvertCommand(modelConvert.ID, modelConvert.ModelPath, modelConvert, setting.ModelConvert.MXnetOnnxBootFile) | |||||
| } else { | |||||
| return errors.New("Not support the format.") | |||||
| } | |||||
| } | } | ||||
| log.Info("dataActualPath=" + dataActualPath) | log.Info("dataActualPath=" + dataActualPath) | ||||
| @@ -103,7 +103,7 @@ | |||||
| </span> | </span> | ||||
| </div> | </div> | ||||
| <div class="two wide column center padding0"> | <div class="two wide column center padding0"> | ||||
| <span style="font-size: 12px;">{{if eq .SrcEngine 0}}PyTorch {{else if eq .SrcEngine 1}}TensorFlow{{else if eq .SrcEngine 2}}MindSpore {{end}}</span> | |||||
| <span style="font-size: 12px;">{{if eq .SrcEngine 0}}PyTorch {{else if eq .SrcEngine 1}}TensorFlow {{else if eq .SrcEngine 2}}MindSpore {{else if eq .SrcEngine 4}}PaddlePaddle {{else if eq .SrcEngine 6}}MXNet {{end}}</span> | |||||
| </div> | </div> | ||||
| <div class="two wide column center padding0"> | <div class="two wide column center padding0"> | ||||
| <span style="font-size: 12px;">{{if eq .DestFormat 0}}ONNX {{else if eq .DestFormat 1}}TensorRT {{end}}</span> | <span style="font-size: 12px;">{{if eq .DestFormat 0}}ONNX {{else if eq .DestFormat 1}}TensorRT {{end}}</span> | ||||
| @@ -532,7 +532,7 @@ | |||||
| } | } | ||||
| } | } | ||||
| function isModel(filename){ | function isModel(filename){ | ||||
| var postfix=[".pth",".pkl",".onnx",".mindir",".ckpt",".pb"]; | |||||
| var postfix=[".pth",".pkl",".onnx",".mindir",".ckpt",".pb",".pdmodel","pdparams",".params",".json"]; | |||||
| for(var i =0; i<postfix.length;i++){ | for(var i =0; i<postfix.length;i++){ | ||||
| if(filename.substring(filename.length-postfix[i].length)==postfix[i]){ | if(filename.substring(filename.length-postfix[i].length)==postfix[i]){ | ||||
| return true; | return true; | ||||
| @@ -568,6 +568,8 @@ | |||||
| html +="<option name=\"PyTorch\" " + getSelected(0,value) + " value=\"0\">PyTorch</option>"; | html +="<option name=\"PyTorch\" " + getSelected(0,value) + " value=\"0\">PyTorch</option>"; | ||||
| html +="<option name=\"TensorFlow\" " + getSelected(1,value) + " value=\"1\">TensorFlow</option>"; | html +="<option name=\"TensorFlow\" " + getSelected(1,value) + " value=\"1\">TensorFlow</option>"; | ||||
| html +="<option name=\"MindSpore\" " + getSelected(2,value) + " value=\"2\">MindSpore</option>"; | html +="<option name=\"MindSpore\" " + getSelected(2,value) + " value=\"2\">MindSpore</option>"; | ||||
| html +="<option name=\"PaddlePaddle\" " + getSelected(4,value) + " value=\"4\">PaddlePaddle</option>"; | |||||
| html +="<option name=\"MXNet\" " + getSelected(6,value) + " value=\"6\">MXNet</option>"; | |||||
| $('#SrcEngine').html(html); | $('#SrcEngine').html(html); | ||||
| srcEngineChanged(); | srcEngineChanged(); | ||||
| } | } | ||||