rxn.onmt_models.prediction_utils.load_predictions

rxn.onmt_models.prediction_utils.load_predictions(src_file, pred_file, tgt_file=None, multiplier=None)[source]
Parameters
  • src_file (Union[str, PathLike]) – File with the src.

  • pred_file (Union[str, PathLike]) – File with the predictions.

  • tgt_file (Union[str, PathLike, None], default: None) – File with the tgt (ground truth).

  • multiplier (Optional[int], default: None) – how many predictions are made per src item. If None, this will be determined automatically.

Return type

Iterator[MultiPrediction]

Returns

Iterator over MultiPrediction objects.