Documentation
¶
Index ¶
- func GenerateCSV(formatter CSVFormatter) (csvData string, err error)
- type AssessmentPerLanguagePerModel
- type AssessmentPerModel
- type AssessmentPerModelPerLanguagePerRepository
- func (a AssessmentPerModelPerLanguagePerRepository) CollapseByLanguage() AssessmentPerLanguagePerModel
- func (a AssessmentPerModelPerLanguagePerRepository) CollapseByModel() AssessmentPerModel
- func (a AssessmentPerModelPerLanguagePerRepository) Header() (header []string)
- func (a AssessmentPerModelPerLanguagePerRepository) Rows() (rows [][]string)
- func (a AssessmentPerModelPerLanguagePerRepository) Walk(...) (err error)
- type CSVFormatter
- type Markdown
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateCSV ¶
func GenerateCSV(formatter CSVFormatter) (csvData string, err error)
GenerateCSV returns the whole CSV as string.
Types ¶
type AssessmentPerLanguagePerModel ¶
type AssessmentPerLanguagePerModel map[language.Language]AssessmentPerModel
AssessmentPerLanguagePerModel holds a collection of assessments per language and model.
type AssessmentPerModel ¶
type AssessmentPerModel map[model.Model]metrics.Assessments
AssessmentPerModel holds a collection of assessments per model.
func (AssessmentPerModel) Header ¶
func (a AssessmentPerModel) Header() (header []string)
Header returns the header description as a CSV row.
func (AssessmentPerModel) Rows ¶
func (a AssessmentPerModel) Rows() (rows [][]string)
Rows returns all data as CSV rows.
func (AssessmentPerModel) WalkByScore ¶
func (a AssessmentPerModel) WalkByScore(function func(model model.Model, assessment metrics.Assessments, score uint64) error) (err error)
WalkByScore walks the given assessment metrics by their score.
type AssessmentPerModelPerLanguagePerRepository ¶
type AssessmentPerModelPerLanguagePerRepository map[model.Model]map[language.Language]map[string]metrics.Assessments
AssessmentPerModelPerLanguagePerRepository holds a collection of assessments per model per language and per repository.
func NewAssessmentPerModelPerLanguagePerRepository ¶
func NewAssessmentPerModelPerLanguagePerRepository(models []model.Model, languages []language.Language, repositories []string) (assessments AssessmentPerModelPerLanguagePerRepository)
NewAssessmentPerModelPerLanguagePerRepository returns a new AssessmentPerModelPerLanguagePerRepository initialized with an empty assessment for each combination.
func (AssessmentPerModelPerLanguagePerRepository) CollapseByLanguage ¶
func (a AssessmentPerModelPerLanguagePerRepository) CollapseByLanguage() AssessmentPerLanguagePerModel
CollapseByLanguage returns all assessments aggregated per language and model.
func (AssessmentPerModelPerLanguagePerRepository) CollapseByModel ¶
func (a AssessmentPerModelPerLanguagePerRepository) CollapseByModel() AssessmentPerModel
CollapseByModel returns all assessments aggregated per model ID.
func (AssessmentPerModelPerLanguagePerRepository) Header ¶
func (a AssessmentPerModelPerLanguagePerRepository) Header() (header []string)
Header returns the header description as a CSV row.
func (AssessmentPerModelPerLanguagePerRepository) Rows ¶
func (a AssessmentPerModelPerLanguagePerRepository) Rows() (rows [][]string)
Rows returns all data as CSV rows.
type CSVFormatter ¶
type CSVFormatter interface {
// Header returns the header description as a CSV row.
Header() (header []string)
// Rows returns all data as CSV rows.
Rows() (rows [][]string)
}
CSVFormatter defines a formatter for CSV data.
type Markdown ¶
type Markdown struct {
// DateTime holds the timestamp of the evaluation.
DateTime time.Time
// Version holds the version of the evaluation tool.
Version string
// CSVPath holds the path of detailed CSV results.
CSVPath string
// LogPath holds the path of detailed logs.
LogPath string
// ModelLogsPath holds the path of the model logs.
ModelLogsPath string
// SVGPath holds the path of the charted results.
SVGPath string
// AssessmentPerModel holds a collection of assessments per model.
AssessmentPerModel AssessmentPerModel
// TotalScore holds the total reachable score per task.
TotalScore uint64
}
Markdown holds the values for exporting a Markdown report.
func (Markdown) WriteToFile ¶
WriteToFile renders the Markdown to the given file.