opto.trainer.evaluators¶
evaluate ¶
evaluate(
agent,
guide,
inputs,
infos,
min_score=None,
num_samples=1,
num_threads=None,
description=None,
)
Evaluate the agent on the inputs and return the scores
Args: agent: The agent to evaluate guide: The guide to use for evaluation inputs: List of inputs to evaluate on infos: List of additional information for each input min_score: Minimum score to return when an exception occurs num_samples: Number of samples to use to evaluate each input num_threads: Maximum number of threads to use for parallel evaluation description: Description to display in the progress bar