Skip to main content

BaseBenchmark

Base class for benchmarks. Parameters:
  • name (str): Name of the benchmark.
  • data_dir (str): Path to the data directory.
  • save_to (str): Path to save the results.
  • processes (int): Number of processes to use for parallel processing. :(default: :obj:1)

init

Initialize the benchmark. Parameters:
  • name (str): Name of the benchmark.
  • data_dir (str): Path to the data directory.
  • save_to (str): Path to save the results.
  • processes (int): Number of processes to use for parallel processing. :(default: :obj:1)

download

Returns: BaseBenchmark: The benchmark instance.

load

Load the benchmark data. Parameters:
  • force_download (bool): Whether to force download the data.
Returns: BaseBenchmark: The benchmark instance.

train

Returns: List[Dict[str, Any]]: The training data.

valid

Returns: List[Dict[str, Any]]: The validation data.

test

Returns: List[Dict[str, Any]]: The test data.

run

Run the benchmark. Parameters:
  • agent (ChatAgent): The chat agent.
  • on (str): The data split to run the benchmark on.
  • randomize (bool): Whether to randomize the data.
  • subset (int): The subset of the data to run the benchmark on.
Returns: BaseBenchmark: The benchmark instance.

results

Returns: List[Dict[str, Any]]: The results.