johnsmith0031 / alpaca_lora_4bit

MIT License
533 stars 84 forks source link

TypeError: object of type 'NoneType' has no len() #130

Closed athenawisdoms closed 1 year ago

athenawisdoms commented 1 year ago

I get the error TypeError: object of type 'NoneType' has no len() when running finetune.py using a text file for my dataset.

This error is raised because data.val_data is None. Looking into TrainTxt class, it notice it does not set self.val_data in TrainTxt.prepare_data.

Do not know how to fix this myself, hope to get some help!

johnsmith0031 commented 1 year ago

If not using validation set, you should pass --val_set_size=0