Problems loading csv dataset in examples `run_summarization.py`
Hi,

the following lines in `run_summarization.py` have some issues.

https://github.com/huggingface/transformers/blob/2c2a31ffbcfe03339b1721348781aac4fc05bc5e/examples/pytorch/summarization/run_summarization.py#L344-L346

According to the datasets documentation a csv dataset is loaded by providing `data_files`. See https://huggingface.co/docs/datasets/loading.html#csv

This is not done here. AFAIK the code is not able to load a local dataset at all.

Furthermore, the dataset is always automatically loaded as a "train" dataset (which is default). 
So it is not possible to specify a validation or test dataset.
Hi @PhilipMay 

This part of code https://github.com/huggingface/transformers/blob/a63bd3675f3fa1a6154c8bf1d085c66eaea67e56/examples/pytorch/summarization/run_summarization.py#L347-L358

handles loading `csv` or `json` files. It also handles train and valid and test splits. Have you tried passing the `train_file` , `validation_file` options to the script ? <|||||>Yes. That is right. I have confused the two if branches. Sorry.