KeyError: 0 in data_collator.py

Iā€™m trying to fine-tune the model from AutoModelForSeq2SeqLM.from_pretrained(ā€œSEBIS/code_trans_t5_base_code_comment_generation_java_transfer_learning_finetuneā€)

I have a custom dataset containing two columns. Containing Kotlin functions and their documentation.

Pleae look at the link on stackover flow for the complete code. Earlier i was getting RuntimeError: Coulsd not infer dtype of dict. But I renamed labels to labels_ids and not getting Key Error