|
|
@@ -370,6 +370,7 @@ func trainJobNewDataPrepare(ctx *context.Context) error { |
|
|
|
ctx.Data["Branches"] = Branches |
|
|
|
ctx.Data["BranchesCount"] = len(Branches) |
|
|
|
ctx.Data["params"] = "" |
|
|
|
ctx.Data["BranchName"] = ctx.Repo.BranchName |
|
|
|
|
|
|
|
configList, err := getConfigList(modelarts.PerPage, 1, modelarts.SortByCreateTime, "desc", "", modelarts.ConfigTypeCustom) |
|
|
|
if err != nil { |
|
|
@@ -903,10 +904,11 @@ func TrainJobCreateVersion(ctx *context.Context, form auth.CreateModelArtsTrainJ |
|
|
|
// } |
|
|
|
|
|
|
|
//todo: del the codeLocalPath |
|
|
|
_, err = ioutil.ReadDir(codeLocalPath) |
|
|
|
if err == nil { |
|
|
|
os.RemoveAll(codeLocalPath) |
|
|
|
} |
|
|
|
// _, err = ioutil.ReadDir(codeLocalPath) |
|
|
|
// if err == nil { |
|
|
|
// os.RemoveAll(codeLocalPath) |
|
|
|
// } |
|
|
|
os.RemoveAll(codeLocalPath) |
|
|
|
|
|
|
|
gitRepo, _ := git.OpenRepository(repo.RepoPath()) |
|
|
|
commitID, _ := gitRepo.GetBranchCommitID(branch_name) |
|
|
|