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