Module Contents

class flambe.learn.eval.Evaluator(dataset: Dataset, model: Module, metric_fn: Metric, eval_sampler: Optional[Sampler] = None, eval_data: str = 'test', device: Optional[str] = None)[source]

Bases: flambe.compile.Component

Implement an Evaluator block.

An Evaluator takes as input data, and a model and executes the evaluation. This is a single step Component object.

run(self, block_name: str = None)[source]

Run the evaluation.

Returns:Whether the component should continue running.
Return type:bool

Override this method to enable scheduling.

Returns:The metric to compare computable varients
Return type:float