|
|
|
@@ -903,10 +903,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) |
|
|
|
|