def read_candidates_from_one_split(input_path):
  """Read candidates from a single jsonl file."""
  candidates_dict = {}
  with gzip.GzipFile(fileobj=tf.gfile.Open(input_path, "rb")) as input_file:
    tf.logging.info("Reading examples from: %s", input_path)
    for line in input_file:
      e = json.loads(line)
      candidates_dict[e["example_id"]] = e["long_answer_candidates"]
  return candidates_dict
Read candidates from a single jsonl file.
language/question_answering/bert_joint/run_nq.py