| @@ -15,8 +15,8 @@ type CreateGrampusTrainJobForm struct { | |||||
| Params string `form:"run_para_list" binding:"Required"` | Params string `form:"run_para_list" binding:"Required"` | ||||
| Description string `form:"description"` | Description string `form:"description"` | ||||
| BranchName string `form:"branch_name" binding:"Required"` | BranchName string `form:"branch_name" binding:"Required"` | ||||
| FlavorName string `form:"flaver_names" binding:"Required"` | |||||
| EngineName string `form:"engine_names" binding:"Required"` | |||||
| FlavorName string `form:"flavor_name" binding:"Required"` | |||||
| EngineName string `form:"engine_name" binding:"Required"` | |||||
| WorkServerNumber int `form:"work_server_number" binding:"Required"` | WorkServerNumber int `form:"work_server_number" binding:"Required"` | ||||
| } | } | ||||
| @@ -15,7 +15,7 @@ const ( | |||||
| ProcessorTypeNPU = "npu.huawei.com/NPU" | ProcessorTypeNPU = "npu.huawei.com/NPU" | ||||
| ProcessorTypeGPU = "nvidia.com/gpu" | ProcessorTypeGPU = "nvidia.com/gpu" | ||||
| CommandPrepareScript = "cd /tmp;mkdir -p output;mkdir -p code;mkdir -p dataset;wget -q https://git.openi.org.cn/lewis/script_for_grampus/archive/master.zip;unzip -q master.zip;cd script_for_grampus;chmod 777 sync_for_arm uploader_for_grampus;" | |||||
| CommandPrepareScript = "pwd;cd /tmp;mkdir -p output;mkdir -p code;mkdir -p dataset;wget -q https://git.openi.org.cn/lewis/script_for_grampus/archive/master.zip;unzip -q master.zip;cd script_for_grampus;chmod 777 sync_for_arm uploader_for_grampus;" | |||||
| CodeArchiveName = "master.zip" | CodeArchiveName = "master.zip" | ||||
| ) | ) | ||||
| @@ -187,7 +187,7 @@ func cloudBrainNewDataPrepare(ctx *context.Context) error { | |||||
| ctx.Data["brainscore_path"] = cloudbrain.BrainScoreMountPath | ctx.Data["brainscore_path"] = cloudbrain.BrainScoreMountPath | ||||
| ctx.Data["is_brainscore_enabled"] = setting.IsBrainScoreEnabled | ctx.Data["is_brainscore_enabled"] = setting.IsBrainScoreEnabled | ||||
| ctx.Data["cloudbraintype"] = models.TypeCloudBrainOne | |||||
| ctx.Data["datasetType"] = models.TypeCloudBrainOne | |||||
| ctx.Data["benchmarkMode"] = ctx.Query("benchmarkMode") | ctx.Data["benchmarkMode"] = ctx.Query("benchmarkMode") | ||||
| @@ -37,7 +37,7 @@ const ( | |||||
| ) | ) | ||||
| func GrampusTrainJobGPUNew(ctx *context.Context) { | func GrampusTrainJobGPUNew(ctx *context.Context) { | ||||
| ctx.Data["cloudbraintype"] = models.TypeCloudBrainOne | |||||
| ctx.Data["datasetType"] = models.TypeCloudBrainOne | |||||
| err := grampusTrainJobNewDataPrepare(ctx, grampus.ProcessorTypeGPU) | err := grampusTrainJobNewDataPrepare(ctx, grampus.ProcessorTypeGPU) | ||||
| if err != nil { | if err != nil { | ||||
| ctx.ServerError("get new train-job info failed", err) | ctx.ServerError("get new train-job info failed", err) | ||||
| @@ -47,7 +47,7 @@ func GrampusTrainJobGPUNew(ctx *context.Context) { | |||||
| } | } | ||||
| func GrampusTrainJobNPUNew(ctx *context.Context) { | func GrampusTrainJobNPUNew(ctx *context.Context) { | ||||
| ctx.Data["cloudbraintype"] = models.TypeCloudBrainTwo | |||||
| ctx.Data["datasetType"] = models.TypeCloudBrainTwo | |||||
| err := grampusTrainJobNewDataPrepare(ctx, grampus.ProcessorTypeNPU) | err := grampusTrainJobNewDataPrepare(ctx, grampus.ProcessorTypeNPU) | ||||
| if err != nil { | if err != nil { | ||||
| ctx.ServerError("get new train-job info failed", err) | ctx.ServerError("get new train-job info failed", err) | ||||
| @@ -146,7 +146,7 @@ func notebookNewDataPrepare(ctx *context.Context) error { | |||||
| } | } | ||||
| ctx.Data["flavors"] = modelarts.FlavorInfos.FlavorInfo | ctx.Data["flavors"] = modelarts.FlavorInfos.FlavorInfo | ||||
| ctx.Data["cloudbraintype"] = models.TypeCloudBrainTwo | |||||
| ctx.Data["datasetType"] = models.TypeCloudBrainTwo | |||||
| return nil | return nil | ||||
| } | } | ||||
| @@ -673,7 +673,7 @@ func trainJobNewDataPrepare(ctx *context.Context) error { | |||||
| return err | return err | ||||
| } | } | ||||
| ctx.Data["config_list"] = configList.ParaConfigs | ctx.Data["config_list"] = configList.ParaConfigs | ||||
| ctx.Data["cloudbraintype"] = models.TypeCloudBrainTwo | |||||
| ctx.Data["datasetType"] = models.TypeCloudBrainTwo | |||||
| return nil | return nil | ||||
| } | } | ||||
| @@ -747,7 +747,7 @@ func trainJobErrorNewDataPrepare(ctx *context.Context, form auth.CreateModelArts | |||||
| ctx.Data["bootFile"] = form.BootFile | ctx.Data["bootFile"] = form.BootFile | ||||
| ctx.Data["uuid"] = form.Attachment | ctx.Data["uuid"] = form.Attachment | ||||
| ctx.Data["branch_name"] = form.BranchName | ctx.Data["branch_name"] = form.BranchName | ||||
| ctx.Data["cloudbraintype"] = models.TypeCloudBrainTwo | |||||
| ctx.Data["datasetType"] = models.TypeCloudBrainTwo | |||||
| return nil | return nil | ||||
| } | } | ||||
| @@ -841,7 +841,7 @@ func trainJobNewVersionDataPrepare(ctx *context.Context) error { | |||||
| ctx.Data["uuid"] = task.Uuid | ctx.Data["uuid"] = task.Uuid | ||||
| ctx.Data["flavor_code"] = task.FlavorCode | ctx.Data["flavor_code"] = task.FlavorCode | ||||
| ctx.Data["engine_id"] = task.EngineID | ctx.Data["engine_id"] = task.EngineID | ||||
| ctx.Data["cloudbraintype"] = models.TypeCloudBrainTwo | |||||
| ctx.Data["datasetType"] = models.TypeCloudBrainTwo | |||||
| configList, err := getConfigList(modelarts.PerPage, 1, modelarts.SortByCreateTime, "desc", "", modelarts.ConfigTypeCustom) | configList, err := getConfigList(modelarts.PerPage, 1, modelarts.SortByCreateTime, "desc", "", modelarts.ConfigTypeCustom) | ||||
| if err != nil { | if err != nil { | ||||
| @@ -938,7 +938,7 @@ func versionErrorDataPrepare(ctx *context.Context, form auth.CreateModelArtsTrai | |||||
| return err | return err | ||||
| } | } | ||||
| ctx.Data["config_list"] = configList.ParaConfigs | ctx.Data["config_list"] = configList.ParaConfigs | ||||
| ctx.Data["cloudbraintype"] = models.TypeCloudBrainTwo | |||||
| ctx.Data["datasetType"] = models.TypeCloudBrainTwo | |||||
| return nil | return nil | ||||
| } | } | ||||
| @@ -2094,7 +2094,7 @@ func inferenceJobNewDataPrepare(ctx *context.Context) error { | |||||
| New: MODEL_LATEST, | New: MODEL_LATEST, | ||||
| }) | }) | ||||
| ctx.Data["MODEL_COUNT"] = model_count | ctx.Data["MODEL_COUNT"] = model_count | ||||
| ctx.Data["cloudbraintype"] = models.TypeCloudBrainTwo | |||||
| ctx.Data["datasetType"] = models.TypeCloudBrainTwo | |||||
| return nil | return nil | ||||
| } | } | ||||
| @@ -2160,7 +2160,7 @@ func inferenceJobErrorNewDataPrepare(ctx *context.Context, form auth.CreateModel | |||||
| ctx.Data["model_version"] = form.ModelVersion | ctx.Data["model_version"] = form.ModelVersion | ||||
| ctx.Data["ckpt_name"] = form.CkptName | ctx.Data["ckpt_name"] = form.CkptName | ||||
| ctx.Data["train_url"] = form.TrainUrl | ctx.Data["train_url"] = form.TrainUrl | ||||
| ctx.Data["cloudbraintype"] = models.TypeCloudBrainTwo | |||||
| ctx.Data["datasetType"] = models.TypeCloudBrainTwo | |||||
| return nil | return nil | ||||
| } | } | ||||
| @@ -75,8 +75,8 @@ | |||||
| <form class="ui form" action="{{.Link}}" method="post"> | <form class="ui form" action="{{.Link}}" method="post"> | ||||
| {{.CsrfTokenHtml}} | {{.CsrfTokenHtml}} | ||||
| <input type="hidden" name="action" value="update"> | <input type="hidden" name="action" value="update"> | ||||
| <input type="hidden" id="ai_engine_name" name="engine_names" value=""> | |||||
| <input type="hidden" id="ai_flaver_name" name="flaver_names" value=""> | |||||
| <input type="hidden" id="ai_engine_name" name="engine_name" value=""> | |||||
| <input type="hidden" id="ai_flavor_name" name="flavor_name" value=""> | |||||
| <h4 class="unite title ui header ">{{.i18n.Tr "repo.modelarts.train_job.basic_info"}}:</h4> | <h4 class="unite title ui header ">{{.i18n.Tr "repo.modelarts.train_job.basic_info"}}:</h4> | ||||
| <div class="required unite min_title inline field"> | <div class="required unite min_title inline field"> | ||||
| <label style="font-weight: normal;">{{.i18n.Tr "cloudbrain.resource_cluster"}}</label> | <label style="font-weight: normal;">{{.i18n.Tr "cloudbrain.resource_cluster"}}</label> | ||||
| @@ -145,7 +145,7 @@ | |||||
| </select> | </select> | ||||
| </div> | </div> | ||||
| <div class="required unite min_title inline field"> | |||||
| <div class="required unite min_title inline field" id="engine_name"> | |||||
| <label style="font-weight: normal;">{{.i18n.Tr "cloudbrain.mirror"}}</label> | <label style="font-weight: normal;">{{.i18n.Tr "cloudbrain.mirror"}}</label> | ||||
| <select class="ui dropdown width81" id="trainjob_images" name="image_id"> | <select class="ui dropdown width81" id="trainjob_images" name="image_id"> | ||||
| {{range .images}} | {{range .images}} | ||||
| @@ -177,7 +177,7 @@ | |||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| <div class="required unite min_title inline field" id="flaver_name"> | |||||
| <div class="required unite min_title inline field" id="flavor_name"> | |||||
| <label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.standard"}}</label> | <label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.standard"}}</label> | ||||
| <select class="ui dropdown width81" id="trainjob-flavor" style='width:385px' name="flavor"> | <select class="ui dropdown width81" id="trainjob-flavor" style='width:385px' name="flavor"> | ||||
| {{range .flavor_infos}} | {{range .flavor_infos}} | ||||
| @@ -414,9 +414,9 @@ | |||||
| } | } | ||||
| function get_name(){ | function get_name(){ | ||||
| let name1=$("#engine_name .text").text() | let name1=$("#engine_name .text").text() | ||||
| let name2=$("#flaver_name .text").text() | |||||
| let name2=$("#flavor_name .text").text() | |||||
| $("input#ai_engine_name").val(name1) | $("input#ai_engine_name").val(name1) | ||||
| $("input#ai_flaver_name").val(name2) | |||||
| $("input#ai_flavor_name").val(name2) | |||||
| let val_server_num_select = $("#trainjob_work_server_num_select .text").text() | let val_server_num_select = $("#trainjob_work_server_num_select .text").text() | ||||
| // console.log("val_server_num_select:",val_server_num_select) | // console.log("val_server_num_select:",val_server_num_select) | ||||