Error because of .map in _prepare_non_packed_dataset in sft_trainer.py
Hello, I would like to finetune falcon 40b using the SFTTrainer. I have a custom dataset (which is a pandas Dataframe with two columns: prompts and labels). Now, I would like to use the SFTTrainer without packing, so I have added a formatting_prompts_function (analogue to here: https://github.com/lvwerra/trl/pull/444). The .map function in line 307 in sft_trainer.py seems to cause an issue, since DataFrame does not have a .map attribute. I have tried changing the datatype to dict, list and a custom dataset class that inherits from torch.utils.data.Dataset, but nothing has worked so far.
I would really appreciate, if anyone could tell me, what datatype is expected here ? Thank you very much! :)
Okay, so I realized that the function would like to have a Huggingface Dataset, now it works!