Skip to content

Commit

Permalink
Merge pull request #243 from symflower/237-early-merger
Browse files Browse the repository at this point in the history
Early merger for "Dump the assessments to the evaluation CSV right after running a task"
  • Loading branch information
ruiAzevedo19 authored Jul 5, 2024
2 parents 7612dbd + 8a753c9 commit 62f9feb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 2 additions & 2 deletions evaluate/evaluate.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand All @@ -145,6 +144,7 @@ func Evaluate(ctx *Context) (assessments *report.AssessmentStore, totalScore uin
} else {
modelSucceededBasicChecksOfLanguage[model][language] = true
}
assessments.AddAssessmentPerTask(model, language, repositoryPath, assessment)
}
})
}
Expand Down Expand Up @@ -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)
}
})
}
Expand Down
4 changes: 0 additions & 4 deletions model/llm/llm.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 62f9feb

Please sign in to comment.