Getting "Error 500" while trying to use AutoTrain for Token Classification
I’m gettingError: 500while trying to use AutoTrain for Token Classification. I’m guessing it has to do something with my CSV file, but then again it’s5xxerror meaning it’s not my fault?This is my CSV file:Cell A1: tokens,tagsCell A2: “[‘Good’, ‘time’, ‘to’, ‘invest’, ‘in’, ‘gold’, ‘?’]”,“[‘O’, ‘O’, ‘O’, ‘O’, ‘O’, ‘B-COM’, ‘O’]”Cell A3: “[‘XAUUSD’]”,“[‘B-COM’]”This is the error:INFO    hardware: LocalINFO    Running jobs:INFO    Task: text_token_classificationINFO    Column mapping: {‘text’: ‘tokens’, ‘label’: ‘tags’}INFO    Dataset: autotrain-xxxxx-xxxxx (text_token_classification)Train data: [<tempfile.SpooledTemporaryFile object at 0x7f501d5275b0>]Valid data:Column mapping: {‘text’: ‘tokens’, ‘label’: ‘tags’}INFO:     10.16.41.118:48387 - “POST /create_project HTTP/1.1” 500 Internal Server ErrorERROR:    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/sessions.py”, line 86, incallawait self.app(scope, receive, send_wrapper)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 445, in handle_formdata_path = dset.prepare()File “/app/env/lib/python3.10/site-packages/autotrain/dataset.py”, line 289, in preparereturn preprocessor.prepare()File “/app/env/lib/python3.10/site-packages/autotrain/preprocessor/text.py”, line 155, in preparetrain_df.loc[:, “autotrain_text”] = train_df[“autotrain_label”].apply(lambda x: ast.literal_eval(x))File “/app/env/lib/python3.10/site-packages/pandas/core/series.py”, line 4904, in apply).apply()File “/app/env/lib/python3.10/site-packages/pandas/core/apply.py”, line 1427, in applyreturn self.apply_standard()File “/app/env/lib/python3.10/site-packages/pandas/core/apply.py”, line 1507, in apply_standardmapped = obj._map_values(File “/app/env/lib/python3.10/site-packages/pandas/core/base.py”, line 921, in _map_valuesreturn algorithms.map_array(arr, mapper, na_action=na_action, convert=convert)File “/app/env/lib/python3.10/site-packages/pandas/core/algorithms.py”, line 1743, in map_arrayreturn lib.map_infer(values, mapper, convert=convert)File “lib.pyx”, line 2972, in pandas._libs.lib.map_inferFile “/app/env/lib/python3.10/site-packages/autotrain/preprocessor/text.py”, line 155, intrain_df.loc[:, “autotrain_text”] = train_df[“autotrain_label”].apply(lambda x: ast.literal_eval(x))File “/app/env/lib/python3.10/ast.py”, line 110, in literal_evalreturn _convert(node_or_string)File “/app/env/lib/python3.10/ast.py”, line 109, in _convertreturn _convert_signed_num(node)File “/app/env/lib/python3.10/ast.py”, line 83, in _convert_signed_numreturn _convert_num(node)File “/app/env/lib/python3.10/ast.py”, line 74, in _convert_num_raise_malformed_node(node)File “/app/env/lib/python3.10/ast.py”, line 71, in _raise_malformed_noderaise ValueError(msg + f’: {node!r}')ValueError: malformed node or string: nanINFO:     10.16.41.118:10170 - “GET /accelerators HTTP/1.1” 200 OKINFO    Running jobs:INFO:     10.16.6.1:49711 - “GET /is_model_training HTTP/1.1” 200 OKINFO:     10.16.6.1:49711 - “GET /accelerators HTTP/1.1” 200 OK@abhishekI would be happy if you could help me, as I see you did in similar cases.