AttributeError: ‘EvalPrediction’ object has no attribute ‘prediction’
Im trying to train Minilm using Hugging Face using the following 

Codes:
![image](https://github.com/huggingface/transformers/assets/92796786/945b681b-3eea-4b49-b710-8387f68227b1)

Error Message:
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ in <cell line: 1>:1                                                                              │
│                                                                                                  │
│ /usr/local/lib/python3.10/dist-packages/transformers/trainer.py:1664 in train                    │
│                                                                                                  │
│   1661 │   │   inner_training_loop = find_executable_batch_size(                                 │
│   1662 │   │   │   self._inner_training_loop, self._train_batch_size, args.auto_find_batch_size  │
│   1663 │   │   )                                                                                 │
│ ❱ 1664 │   │   return inner_training_loop(                                                       │
│   1665 │   │   │   args=args,                                                                    │
│   1666 │   │   │   resume_from_checkpoint=resume_from_checkpoint,                                │
│   1667 │   │   │   trial=trial,                                                                  │
│                                                                                                  │
│ /usr/local/lib/python3.10/dist-packages/transformers/trainer.py:2034 in _inner_training_loop     │
│                                                                                                  │
│   2031 │   │   │   │   self.control.should_training_stop = True                                  │
│   2032 │   │   │                                                                                 │
│   2033 │   │   │   self.control = self.callback_handler.on_epoch_end(args, self.state, self.con  │
│ ❱ 2034 │   │   │   self._maybe_log_save_evaluate(tr_loss, model, trial, epoch, ignore_keys_for_  │
│   2035 │   │   │                                                                                 │
│   2036 │   │   │   if DebugOption.TPU_METRICS_DEBUG in self.args.debug:                          │
│   2037 │   │   │   │   if is_torch_tpu_available():                                              │
│                                                                                                  │
│ /usr/local/lib/python3.10/dist-packages/transformers/trainer.py:2300 in _maybe_log_save_evaluate │
│                                                                                                  │
│   2297 │   │   │   │   │   )                                                                     │
│   2298 │   │   │   │   │   metrics.update(dataset_metrics)                                       │
│   2299 │   │   │   else:                                                                         │
│ ❱ 2300 │   │   │   │   metrics = self.evaluate(ignore_keys=ignore_keys_for_eval)                 │
│   2301 │   │   │   self._report_to_hp_search(trial, self.state.global_step, metrics)             │
│   2302 │   │   │                                                                                 │
│   2303 │   │   │   # Run delayed LR scheduler now that metrics are populated                     │
│                                                                                                  │
│ /usr/local/lib/python3.10/dist-packages/transformers/trainer.py:3029 in evaluate                 │
│                                                                                                  │
│   3026 │   │   start_time = time.time()                                                          │
│   3027 │   │                                                                                     │
│   3028 │   │   eval_loop = self.prediction_loop if self.args.use_legacy_prediction_loop else se  │
│ ❱ 3029 │   │   output = eval_loop(                                                               │
│   3030 │   │   │   eval_dataloader,                                                              │
│   3031 │   │   │   description="Evaluation",                                                     │
│   3032 │   │   │   # No point gathering the predictions if there are no metrics, otherwise we d  │
│                                                                                                  │
│ /usr/local/lib/python3.10/dist-packages/transformers/trainer.py:3318 in evaluation_loop          │
│                                                                                                  │
│   3315 │   │   │   │   │   EvalPrediction(predictions=all_preds, label_ids=all_labels, inputs=a  │
│   3316 │   │   │   │   )                                                                         │
│   3317 │   │   │   else:                                                                         │
│ ❱ 3318 │   │   │   │   metrics = self.compute_metrics(EvalPrediction(predictions=all_preds, lab  │
│   3319 │   │   else:                                                                             │
│   3320 │   │   │   metrics = {}                                                                  │
│   3321                                                                                           │
│ in compute_metrics:5                                                                             │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
AttributeError: 'EvalPrediction' object has no attribute 'prediction'


Any Assistance is welcomed. 

### Who can help?
Please Help :( @sgugger @ArthurZucker @gan


_No response_

### Information

- [X] The official example scripts
- [ ] My own modified scripts

### Tasks

- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [X] My own task or dataset (give details below)


### Reproduction

Replicated steps using the following Link: https://www.youtube.com/watch?v=u--UVvH-LIQ
Data Set Used: https://huggingface.co/datasets/ltkw98/Dataset/blob/main/dataset2_lionel.csv
Custom Dataset was used and Mapping was done appropriately.

### Expected behavior

A fine tuned model
Hey! Looking at your code, your `compute_metric` function is calling `pred.prediction` while it should be `pred.predictions`. <|||||>Much appreciated  tyvm for your help. 