Skip to content

Commit

Permalink
add simple evaluator by default
Browse files Browse the repository at this point in the history
  • Loading branch information
semio committed Aug 29, 2024
1 parent 3586e65 commit 16ec673
Showing 1 changed file with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ def str_presenter(dumper, data):
latest_experiment_path = current_script_path / "../experiment_latest.yaml"


def get_evaluators(ai_eval_sheet: AiEvalData, evaluator_model="gpt4"):
def get_evaluators(
ai_eval_sheet: AiEvalData, evaluator_model="gpt4"
) -> List[Dict[str, Any]]:
metrics = get_metrics(ai_eval_sheet)
res = list()

Expand Down Expand Up @@ -113,6 +115,15 @@ def main(evaluator_model):

# metrics
config["evaluators"] = get_evaluators(sheet, evaluator_model=evaluator_model)

# also append a simple evaluator
simple_evaluator = {
"evaluator_type": "individual",
"metric_calculators": [{"method": "AVERAGE"}],
"name": "simple_evaluator",
}
config["evaluators"].append(simple_evaluator)

# model configs and prompt variations
model_configs = get_model_configs(sheet)
model_ids = {model.model_id for model, model_config in model_configs}
Expand Down

0 comments on commit 16ec673

Please sign in to comment.