Outputting the predicted soft labels (likelihood/probability) in run_image_classification.py

Dear authors,

Thanks for your amazing work.

I am running the AutoModelForImageClassification using PyTorch from here. As of now, the outputted eval metrics are:

epoch = 15.0
eval_accuracy = 0.6
eval_loss = 1.1796
eval_runtime = 0:00:02.68
eval_samples_per_second = 7.447
eval_steps_per_second = 0.745

My question is how can I output the soft labels for each of the predictions in the validation set?
For instance in a csv file.

I guess I need to change the source code (run_image_classification.py?) but since I am a beginner I would appreciate some help.

Thanks a lot!