EricFillion / happy-transformer

Happy Transformer makes it easy to fine-tune and perform inference with NLP Transformer models.
http://happytransformer.com
Apache License 2.0
516 stars 66 forks source link

TypeError: TextEncodeInput must be Union[TextInputSequence, Tuple[InputSequence, InputSequence]] #323

Open adeljebali opened 1 year ago

adeljebali commented 1 year ago

I am training T5 using this tutorial (https://www.vennify.ai/fine-tune-grammar-correction/). When I run the code before_result = happy_tt.eval("eval.csv") I got no errors. But with happy_tt.train("train.csv", args=args) I got the error shown in the title. My train.csv file has data like the one shown below: grammar: Marie je la donne le livre.,"Marie, je lui donne le livre." This errors occurs at 53% of the mapping process when the train data is processessed. I tried to change the size of the train/eval split, but thatdoes not seem to make a change. I also checked my files for any no string data and there is not any.

bmuzuraimov commented 5 months ago

Please try filling empty values in the "input" or "target" columns of your train.csv file with an empty string ''. This will ensure that there are no blank entries in the data, which may be causing the error during the training process.