garak.report

Defines the Report class and associated functions to process and export a native garak report

class garak.report.Report(report_location, records=None, metadata=None, evaluations=None, scores=None)

Bases: object

A class defining a generic report object to store information in a garak report (typically named garak.<uuid4>.report.jsonl).

Parameters:
  • report_location (str) – location where the file is stored.

  • records (List[dict]) – list of raw json records in the report file

  • metadata (dict) – report metadata, storing information about scanned model

  • evaluations (pd.DataFrame) – evaluation information at probe level

  • scores (pd.DataFrame) – average pass percentage per probe

  • write_location (str) – location where the output is written out.

export()

Writes out output in a specified format.

get_evaluations()

Extracts evaluation information from a garak report.

load()

Loads a garak report.