ensure_evaluator#

composer.core.ensure_evaluator(evaluator, default_metric_names)[source]#

Ensure that evaluator is an Evaluator.

Parameters
  • evaluator (Evaluator | DataSpec | Iterable | Dict[str, Any]) โ€“ A dataloader, DataSpec instance, dictionary of DataSpec kwargs, or existing evaluator.

  • default_metric_names (List[str]) โ€“ The names of the metrics for the evaluator, if a dataloader was specified.

Returns

Evaluator โ€“ An evaluator.