TypeError: CPMTrainer.training_step() takes 3 positional arguments but 4 were given
[rank0]: Traceback (most recent call last):
[rank0]: File "/opt/MiniCPM-V-main/finetune/finetune.py", line 299, in
[rank0]: train()
[rank0]: File "/opt/MiniCPM-V-main/finetune/finetune.py", line 289, in train
[rank0]: trainer.train()
[rank0]: File "/root/miniconda3/envs/transformers/lib/python3.10/site-packages/transformers/trainer.py", line 2164, in train
[rank0]: return inner_training_loop(
[rank0]: File "/root/miniconda3/envs/transformers/lib/python3.10/site-packages/transformers/trainer.py", line 2524, in _inner_training_loop
[rank0]: tr_loss_step = self.training_step(model, inputs, num_items_in_batch)
[rank0]: TypeError: CPMTrainer.training_step() takes 3 positional arguments but 4 were given
I got this error when I tried to finetune the model, anyone knows how to solve it?