primeqa.mrc.processors.postprocessors.eli5_fid.ELI5FiDPostProcessor#

class primeqa.mrc.processors.postprocessors.eli5_fid.ELI5FiDPostProcessor(*args, tokenizer: transformers.tokenization_utils_fast.PreTrainedTokenizerFast, **kwargs)#

Bases: primeqa.mrc.processors.postprocessors.abstract.AbstractPostProcessor

Post processor for the generative FiD model on the ELI5 dataset.

Methods

prepare_examples_as_references

Convert examples into references for use with metrics.

process

Convert data and model predictions into MRC answers.

process_references_and_predictions

Convert data and model predictions into MRC answers and references for use in metrics.

prepare_examples_as_references(examples: datasets.arrow_dataset.Dataset) List[Dict[str, Any]]#

Convert examples into references for use with metrics.

process(examples: datasets.arrow_dataset.Dataset, features: datasets.arrow_dataset.Dataset, predictions: tuple)#

Convert data and model predictions into MRC answers.

process_references_and_predictions(examples, features, predictions) primeqa.mrc.data_models.eval_prediction_with_processing.EvalPredictionWithProcessing#

Convert data and model predictions into MRC answers and references for use in metrics.