AutoTrain csv data format
I have a question about AutoTrain csv data format.Documentaion says:LLM finetuning accepts data in CSV format.

Data Format For SFT / Generic Trainer
For SFT / Generic Trainer, the data should be in the following format:

| text | | This is the first sentence. | | This is the second sentence. |I am not sure what this| text | | This is the first sentence. | | This is the second sentence. |means when UI only allows 1 column as input.I lave looked atexample datasetand tried to structure my csv as there:text“### Human: question text ### Assistant: answer text”“### Human: question text ### Assistant: answer text”but this gives me errors about: ValueError: 3 columns passed, passed data had 0 columnsAny advice?PS: I was trying to trainmeta-llama/Llama-2-13b-chat-hf
2023-11-23T15:52:57Z
The CSV should have one column namedtextand all the data under it. The doc had formatting issue, ive fixed it and changes will reflect in 10-15mins.
2024-03-01T14:36:25Z
Did you solved it?
2024-03-08T06:17:33Z
I just cant bring this autotrain advanced to work even with the example data, its always error 500, ERROR:    Exception in ASGI applicationLooks like autotrain advanced as a no code solution is a dead project for hugging face. No one seems to care from what i can find everywhere
2024-03-08T06:37:49Z
lol. use github issues and explain with errors. then someone will help. help us to help you. just saying 500 doesnt help me. autotrain is active and will always be amd is training thousands of models everyday.
2024-03-08T06:57:51Z
@abhishekIf i understand it correctly you are very important here, therefore i will start with an apology: Not wanting to insult anyone in case that happened, i am just a little frustrated. I gladly will explain what I tried to do: From my understanding, the setup on hugging face is meant to be a no code solution for beginners (which i certainly am). I created a space on hugging face and got this ui here:huggingfaceautotrain1270×884 138 KBFrom the documentation hereLLM Finetuningi downloaded the linked example data set (timdettmers/openassistant-guanaco · Datasets at Hugging Face) and pressed start. That did not work with above mentioned error. I tried to create a csv file with a text column and added some texts from the above dataset. Did not work either. I made a csv file with the little example on the documentation itself. Same issue.The error message i provided above is the one from the log tab.If the whole tracestack helps, here it is:ERROR:    Exception in ASGI applicationTraceback (most recent call last):File “/app/env/lib/python3.10/site-packages/uvicorn/protocols/http/h11_impl.py”, line 428, in run_asgiresult = await app(  # type: ignore[func-returns-value]File “/app/env/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py”, line 78, incallreturn await self.app(scope, receive, send)File “/app/env/lib/python3.10/site-packages/fastapi/applications.py”, line 1106, incallawait super().call(scope, receive, send)File “/app/env/lib/python3.10/site-packages/starlette/applications.py”, line 122, incallawait self.middleware_stack(scope, receive, send)File “/app/env/lib/python3.10/site-packages/starlette/middleware/errors.py”, line 184, incallraise excFile “/app/env/lib/python3.10/site-packages/starlette/middleware/errors.py”, line 162, incallawait self.app(scope, receive, _send)File “/app/env/lib/python3.10/site-packages/starlette/middleware/exceptions.py”, line 79, incallraise excFile “/app/env/lib/python3.10/site-packages/starlette/middleware/exceptions.py”, line 68, incallawait self.app(scope, receive, sender)File “/app/env/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py”, line 20, incallraise eFile “/app/env/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py”, line 17, incallawait self.app(scope, receive, send)File “/app/env/lib/python3.10/site-packages/starlette/routing.py”, line 718, incallawait route.handle(scope, receive, send)File “/app/env/lib/python3.10/site-packages/starlette/routing.py”, line 276, in handleawait self.app(scope, receive, send)File “/app/env/lib/python3.10/site-packages/starlette/routing.py”, line 66, in appresponse = await func(request)File “/app/env/lib/python3.10/site-packages/fastapi/routing.py”, line 274, in appraw_response = await run_endpoint_function(File “/app/env/lib/python3.10/site-packages/fastapi/routing.py”, line 191, in run_endpoint_functionreturn await dependant.call(**values)File “/app/env/lib/python3.10/site-packages/autotrain/app.py”, line 459, in handle_formdset = AutoTrainDataset(**dset_args)File “”, line 13, ininitFile “/app/env/lib/python3.10/site-packages/autotrain/dataset.py”, line 204, inpost_initself.train_df, self.valid_df = self._preprocess_data()File “/app/env/lib/python3.10/site-packages/autotrain/dataset.py”, line 213, in _preprocess_datatrain_df.append(pd.read_csv(file))File “/app/env/lib/python3.10/site-packages/pandas/io/parsers/readers.py”, line 1026, in read_csvreturn _read(filepath_or_buffer, kwds)File “/app/env/lib/python3.10/site-packages/pandas/io/parsers/readers.py”, line 626, in _readreturn parser.read(nrows)File “/app/env/lib/python3.10/site-packages/pandas/io/parsers/readers.py”, line 1923, in read) = self._engine.read(  # type: ignore[attr-defined]File “/app/env/lib/python3.10/site-packages/pandas/io/parsers/c_parser_wrapper.py”, line 234, in readchunks = self._reader.read_low_memory(nrows)File “parsers.pyx”, line 838, in pandas._libs.parsers.TextReader.read_low_memoryFile “parsers.pyx”, line 905, in pandas._libs.parsers.TextReader._read_rowsFile “parsers.pyx”, line 874, in pandas._libs.parsers.TextReader._tokenize_rowsFile “parsers.pyx”, line 891, in pandas._libs.parsers.TextReader._check_tokenize_statusFile “parsers.pyx”, line 2061, in pandas._libs.parsers.raise_parser_errorI also tried factory rebuilds and set up the space three times. Always the same issue. I tried different models and both LLM Generic and SFT. I tried to play around with the parameters which i honestly do not understand at all and the link in the label (find params to copy paste here) does not work.When i tried to get help outside the documentation and official material itself I find out that there seems to be a better product a few months ago which worked like what i had expected to encounter. The whole UI seemed easier and more intuitive while people in youtube videos just made them work. I have found no material online with the ui i encountered. The few things i find are basically frustrated people like me.The out of the box experience for beginners like me is unfortunately very unpleasant due to me having hoped to get a first start here in training models. For me nothing seems to work and while i absolutely am sure that it probably works if you know a little more about how it supposed to work or atleast python - for an advertised easy to use product its pretty frustrating.
2024-03-08T07:17:14Z
It seems like a data formatting issue. the problem is the example dataset needs to be converted to csv. Here, im providing a correctly formatted csv for llm sft/generic task that you can use. please try it and let me know if it worked for you. from the screenshot, it seems like you are not adding any gpu to the space, this might cause issues and failures too as LLM tasks need GPU to run properly.example csv:autotrain-example-datasets/alpaca1k.csv at main · huggingface/autotrain-example-datasets · GitHubPS: we are always willing to help but we also need details in order to figure out what might have gone wrong. with your response it seems like documentation is also not good enough. so, ill work on improving it too this weekend.
2024-03-08T07:26:47Z
Thanks! It works - now i can look into the file compare it with my own and see what i did wrong and work with that. Really appreciate it. Have a great day!If i may suggest something for a documentation: A simple step by step explanation with working example configuration already formatted example data that runs out of the box. This file is a great beginning.
2024-03-08T07:53:01Z
If i may suggest something for a documentation: A simple step by step explanation with working example configuration already formatted example data that runs out of the box. This file is a great beginning.will be done by this weekend.
2024-03-21T19:28:26Z
Is this the file that you made?huggingface.coLLM FinetuningWe’re on a journey to advance and democratize artificial intelligence through open source and open science.It took me a very long time to find (after I had similar issues to the OP). It would be helpful if it were also referenced in this tutorial page, since this tutorial does not cover data formatting at all:huggingface.coFine-tune a pretrained modelWe’re on a journey to advance and democratize artificial intelligence through open source and open science.