Error when running a text classification task
Hello,I am running a simple text classification task in three classes. My dataset has the correct format for this task: two columns (text, target). Both are containing string format data. My dataset seems to be valid and I already performed this task few weeks ago and every thing was working well.Now I get this error:File “/app/env/lib/python3.10/site-packages/autotrain/preprocessor/text.py”, line 83, in preparetrain_df[:, “autotrain_label”] = train_df[“autotrain_label”].astype(str)File “/app/env/lib/python3.10/site-packages/pandas/core/frame.py”, line 4311, insetitemself._set_item(key, value)File “/app/env/lib/python3.10/site-packages/pandas/core/frame.py”, line 4527, in _set_itemkey in self.columnsFile “/app/env/lib/python3.10/site-packages/pandas/core/indexes/base.py”, line 5358, incontainshash(key)TypeError: unhashable type: ‘slice’I feed the Auto Train with a .csv file. I tried several times several days and all I get is this error. The data is like below:text,targetGlobal Stocks and Commodities Rally on First Trading Day of 2010,positiveDollar Slumps Amid Worldwide Manufacturing Improvement,indecisive…,…Thank your very much for any help!
2024-04-22T08:09:40Z
looks like your csv is not formatted properly. you can either format it properly (using pandas) or use jsonl format too.
2024-04-22T08:34:27Z
Thanks for your answer. I follow exactly the guidelines provided herehttps://huggingface.co/docs/autotrain/text_classification#columns.My dataset is containing two columns: text and target. Both are string type.It already worked few weeks ago with the exact same dataset. Can it be a huggingface library new version error?
2024-04-22T08:50:19Z
To provide more insights about the situation. When using the autotrain-advanced library the fine-tuning runs correctly. When using the web interface I get this error. It seems that it comes from a recent update on the huggingface’s side.
2024-04-22T09:01:44Z
can you share the dataset onautotrain@hf.co?
2024-04-22T11:56:04Z
I just sent it.
2024-04-22T14:48:40Z
Same error, I even published it a few days ago, some lib in the container seems to have broken the slice.
2024-04-23T07:50:24Z
fixed in v0.7.57+
2024-04-23T11:05:40Z
Where are the images from previous versions if I want to use them?
2024-04-23T11:21:45Z
I think you can directly specify the pip image your want.