Open ybagoury opened 1 year ago
eval_preds is an object of type EvalPredictions. This is what's happening: https://github.com/huggingface/transformers/blob/080a97119c0dabfd0fb5c3e26a872ad2958e4f77/src/transformers/trainer.py#L3237C1-L3243C3
Also I belive such questions are better to be asked on hugging face forum as it is related to transformers package, so the whole community will benefit from discussion :)
The compute_metrics function takes as a parameter
eval_preds
which is unpacked intopreds
andlabels
. Here's the line mentioned:preds, labels = eval_preds
What I'm trying to figure out is what exactly
eval_preds
is . When it is called in the Trainer, it doesn't contain any arguments.If my understanding is correct it's a dictionary that contains the
labels
we already have intokenized_dataset["train"]["labels"]
and the predictions of labels that are going to be compared to using the rouge score. So where are these labels coming from?Thanks.