| @@ -847,6 +847,9 @@ func createForGPU(ctx *context.Context, jobName string) error { | |||||
| codePath := setting.JobPath + jobName + cloudbrain.CodeMountPath | codePath := setting.JobPath + jobName + cloudbrain.CodeMountPath | ||||
| os.RemoveAll(codePath) | os.RemoveAll(codePath) | ||||
| gitRepo, _ := git.OpenRepository(repo.RepoPath()) | |||||
| commitID, _ := gitRepo.GetBranchCommitID(cloudbrain.DefaultBranchName) | |||||
| if err := downloadCode(repo, codePath, cloudbrain.DefaultBranchName); err != nil { | if err := downloadCode(repo, codePath, cloudbrain.DefaultBranchName); err != nil { | ||||
| log.Error("downloadCode failed, %v", err, ctx.Data["MsgID"]) | log.Error("downloadCode failed, %v", err, ctx.Data["MsgID"]) | ||||
| return errors.New("system error") | return errors.New("system error") | ||||
| @@ -891,7 +894,7 @@ func createForGPU(ctx *context.Context, jobName string) error { | |||||
| BranchName: cloudbrain.DefaultBranchName, | BranchName: cloudbrain.DefaultBranchName, | ||||
| BootFile: BootFile, | BootFile: BootFile, | ||||
| Params: Params, | Params: Params, | ||||
| CommitID: "", | |||||
| CommitID: commitID, | |||||
| ModelName: modelName, | ModelName: modelName, | ||||
| ModelVersion: modelVersion, | ModelVersion: modelVersion, | ||||
| CkptName: CkptName, | CkptName: CkptName, | ||||