primeqa.mrc.metrics.nq_f1.eval_utils.read_prediction_json_from_file#

primeqa.mrc.metrics.nq_f1.eval_utils.read_prediction_json_from_file(predictions_path, examples_to_filter_for=None)#

Read the prediction json with scores.

Parameters
  • predictions_path – the path for the prediction json.

  • examples_to_filter_for – a set of examples to filter for (can be None, in which case all examples are kept)

Returns

A dictionary with key = example_id, value = NQInstancePrediction.