Skip to content

Commit

Permalink
refactor, Export the evaluation CSV header function, so it can be reused
Browse files Browse the repository at this point in the history
Part of #205
  • Loading branch information
ruiAzevedo19 committed Jul 17, 2024
1 parent 25e8d81 commit 5a7fb63
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions evaluate/report/csv.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func NewEvaluationFile(writer io.Writer) (evaluationFile *EvaluationFile, err er

csv := csv.NewWriter(writer)

if err := csv.Write(evaluationHeader()); err != nil {
if err := csv.Write(EvaluationHeader()); err != nil {
return nil, pkgerrors.WithStack(err)
}
csv.Flush()
Expand Down Expand Up @@ -58,6 +58,6 @@ func (e *EvaluationFile) WriteEvaluationRecord(model model.Model, language langu
}

// evaluationHeader returns the CSV header for the evaluation CSV.
func evaluationHeader() (header []string) {
func EvaluationHeader() (header []string) {
return append([]string{"model-id", "language", "repository", "task", "score"}, metrics.AllAssessmentKeysStrings...)
}

0 comments on commit 5a7fb63

Please sign in to comment.