diff --git a/evaluate/evaluate.go b/evaluate/evaluate.go index ad094a8a..1d8d69ba 100644 --- a/evaluate/evaluate.go +++ b/evaluate/evaluate.go @@ -135,7 +135,6 @@ func Evaluate(ctx *Context) (assessments *report.AssessmentStore, totalScore uin Logger: ctx.Log, } assessment, ps, err := task.Run(taskContext) - assessments.AddAssessmentPerTask(model, language, repositoryPath, assessment) if err != nil { ps = append(ps, err) } @@ -145,6 +144,7 @@ func Evaluate(ctx *Context) (assessments *report.AssessmentStore, totalScore uin } else { modelSucceededBasicChecksOfLanguage[model][language] = true } + assessments.AddAssessmentPerTask(model, language, repositoryPath, assessment) } }) } @@ -244,11 +244,11 @@ func Evaluate(ctx *Context) (assessments *report.AssessmentStore, totalScore uin Logger: ctx.Log, } assessment, ps, err := task.Run(taskContext) - assessments.AddAssessmentPerTask(model, language, repositoryPath, assessment) problemsPerModel[modelID] = append(problemsPerModel[modelID], ps...) if err != nil { ctx.Log.Printf("ERROR: Model %q encountered a hard error for language %q, repository %q: %+v", modelID, languageID, repositoryPath, err) } + assessments.AddAssessmentPerTask(model, language, repositoryPath, assessment) } }) } diff --git a/model/llm/llm.go b/model/llm/llm.go index 0b8e8d66..fa2caeb9 100644 --- a/model/llm/llm.go +++ b/model/llm/llm.go @@ -178,10 +178,6 @@ func (m *Model) WriteTests(ctx model.Context) (assessment metrics.Assessments, e assessment[metrics.AssessmentKeyResponseCharacterCount] = uint64(len(response)) assessment[metrics.AssessmentKeyGenerateTestsForFileCharacterCount] = uint64(len(testContent)) - if err != nil { - return nil, pkgerrors.WithStack(err) - } - testFilePath := ctx.Language.TestFilePath(ctx.RepositoryPath, ctx.FilePath) if err := os.MkdirAll(filepath.Join(ctx.RepositoryPath, filepath.Dir(testFilePath)), 0755); err != nil { return nil, pkgerrors.WithStack(err)