    def __call__(
        self,
        model: Model,
        data_loader: DataLoader,
        batch_weight_key: str = None,
        metrics_output_file: Union[str, PathLike] = None,
        predictions_output_file: Union[str, PathLike] = None,
    ) -> Dict[str, Any]:
        """
        Evaluate a single data source.

        # Parameters

        model : `Model`
            The model to evaluate
        data_loader : `DataLoader`
            The `DataLoader` that will iterate over the evaluation data (data loaders already contain
            their data).
        batch_weight_key : `str`, optional (default=`None`)
            If given, this is a key in the output dictionary for each batch that specifies how to weight
            the loss for that batch.  If this is not given, we use a weight of 1 for every batch.
        metrics_output_file : `Union[str, PathLike]`, optional (default=`None`)
            Optional path to write the final metrics to.

        predictions_output_file : `Union[str, PathLike]`, optional (default=`None`)
            Optional path to write the predictions to. If passed the
            postprocessor will be called and its output will be written as lines.


        # Returns

        metrics: `Dict[str, Any]`
            The metrics from evaluating the file.
        """
        raise NotImplementedError("__call__")
Evaluate a single data source.

# Parameters

model : `Model`
The model to evaluate
data_loader : `DataLoader`
The `DataLoader` that will iterate over the evaluation data (data loaders already contain
their data).
batch_weight_key : `str`, optional (default=`None`)
If given, this is a key in the output dictionary for each batch that specifies how to weight
the loss for that batch.  If this is not given, we use a weight of 1 for every batch.
metrics_output_file : `Union[str, PathLike]`, optional (default=`None`)
Optional path to write the final metrics to.

predictions_output_file : `Union[str, PathLike]`, optional (default=`None`)
Optional path to write the predictions to. If passed the
postprocessor will be called and its output will be written as lines.


# Returns

metrics: `Dict[str, Any]`
The metrics from evaluating the file.
allennlp/evaluation/evaluator.py