This commit is contained in:
William Fu-Hinthorn
2023-07-28 18:27:40 -07:00
parent 8f602ee7ef
commit 72ca44768c
2 changed files with 4 additions and 4 deletions

View File

@@ -81,7 +81,7 @@ def get_prompt_template(
}
if strategy not in strat_map:
raise ValueError(
f"Unrecognized evalution strategy {strategy}"
f"Unrecognized evaluation strategy {strategy}"
f"\nMust be one of {list(strat_map.keys())}"
)
template = _LABELED_TEMPLATE if requires_references else _TEMPLATE

View File

@@ -1053,12 +1053,12 @@ def _run_on_examples(
llm_or_chain_factory, examples, evaluation, data_type
)
examples = _validate_example_inputs(examples, llm_or_chain_factory, input_mapper)
evalution_handler = EvaluatorCallbackHandler(
evaluation_handler = EvaluatorCallbackHandler(
evaluators=run_evaluators or [],
client=client,
project_name=evaluator_project_name,
)
callbacks: List[BaseCallbackHandler] = [tracer, evalution_handler]
callbacks: List[BaseCallbackHandler] = [tracer, evaluation_handler]
for i, example in enumerate(examples):
result = _run_llm_or_chain(
example,
@@ -1072,7 +1072,7 @@ def _run_on_examples(
print(f"{i+1} processed", flush=True, end="\r")
results[str(example.id)] = result
tracer.wait_for_futures()
evalution_handler.wait_for_futures()
evaluation_handler.wait_for_futures()
return results