Hello,
can someone help me to understand the Column Mapping field.
Created a new space, selected base model as meta-llama/CodeLlama-7b-hf (Custom)
I have a training dataset as “prompt”,“completion” in CSV format. The csv is having specil trainings with snowflake sql.
Selected the training dataset (for now I am trying with 60 till the error resolves).
When I click on Start training, its giving me 500 error with following logs.
any help would be appreciated. !!!
Logs:=====
KeyError: ‘{“text”: “prompt”, “label”: “completion”}’
raise KeyError(key) from err
File “/app/env/lib/python3.10/site-packages/pandas/core/indexes/base.py”, line 3812, in get_loc
indexer = self.columns.get_loc(key)
File “/app/env/lib/python3.10/site-packages/pandas/core/frame.py”, line 4102, in getitem
train_df.loc[:, “autotrain_text”] = train_df[self.text_column]
File “/app/env/lib/python3.10/site-packages/autotrain/preprocessor/text.py”, line 399, in prepare_columns
train_df, valid_df = self.prepare_columns(train_df, valid_df)
File “/app/env/lib/python3.10/site-packages/autotrain/preprocessor/text.py”, line 417, in prepare
return preprocessor.prepare()
File “/app/env/lib/python3.10/site-packages/autotrain/dataset.py”, line 677, in prepare
data_path = dset.prepare()
File “/app/env/lib/python3.10/site-packages/autotrain/app/ui_routes.py”, line 673, in handle_form
return await dependant.call(**values)
File “/app/env/lib/python3.10/site-packages/fastapi/routing.py”, line 212, in run_endpoint_function
raw_response = await run_endpoint_function(
File “/app/env/lib/python3.10/site-packages/fastapi/routing.py”, line 301, in app
response = await f(request)
File “/app/env/lib/python3.10/site-packages/starlette/routing.py”, line 73, in app
await app(scope, receive, sender)
File “/app/env/lib/python3.10/site-packages/starlette/_exception_handler.py”, line 42, in wrapped_app
raise exc
File “/app/env/lib/python3.10/site-packages/starlette/_exception_handler.py”, line 53, in wrapped_app
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
File “/app/env/lib/python3.10/site-packages/starlette/routing.py”, line 76, in app
await self.app(scope, receive, send)
File “/app/env/lib/python3.10/site-packages/starlette/routing.py”, line 288, in handle
await route.handle(scope, receive, send)
File “/app/env/lib/python3.10/site-packages/starlette/routing.py”, line 735, in app
await self.middleware_stack(scope, receive, send)
File “/app/env/lib/python3.10/site-packages/starlette/routing.py”, line 715, in call
await app(scope, receive, sender)
File “/app/env/lib/python3.10/site-packages/starlette/_exception_handler.py”, line 42, in wrapped_app
raise exc
File “/app/env/lib/python3.10/site-packages/starlette/_exception_handler.py”, line 53, in wrapped_app
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
File “/app/env/lib/python3.10/site-packages/starlette/middleware/exceptions.py”, line 62, in call
await self.app(scope, receive, send_wrapper)
File “/app/env/lib/python3.10/site-packages/starlette/middleware/sessions.py”, line 85, in call
await self.app(scope, receive, _send)
File “/app/env/lib/python3.10/site-packages/starlette/middleware/errors.py”, line 165, in call
raise exc
File “/app/env/lib/python3.10/site-packages/starlette/middleware/errors.py”, line 187, in call
await self.middleware_stack(scope, receive, send)
File “/app/env/lib/python3.10/site-packages/starlette/applications.py”, line 113, in call
await super().call(scope, receive, send)
File “/app/env/lib/python3.10/site-packages/fastapi/applications.py”, line 1054, in call
return await self.app(scope, receive, send)
File “/app/env/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py”, line 60, in call
result = await app( # type: ignore[func-returns-value]
File “/app/env/lib/python3.10/site-packages/uvicorn/protocols/http/h11_impl.py”, line 403, in run_asgi
Traceback (most recent call last):
The above exception was the direct cause of the following exception:
KeyError: ‘{“text”: “prompt”, “label”: “completion”}’
File “pandas/_libs/hashtable_class_helper.pxi”, line 7089, in pandas._libs.hashtable.PyObjectHashTable.get_item
File “pandas/_libs/hashtable_class_helper.pxi”, line 7081, in pandas._libs.hashtable.PyObjectHashTable.get_item
File “index.pyx”, line 196, in pandas._libs.index.IndexEngine.get_loc
File “index.pyx”, line 167, in pandas._libs.index.IndexEngine.get_loc
return self._engine.get_loc(casted_key)
File “/app/env/lib/python3.10/site-packages/pandas/core/indexes/base.py”, line 3805, in get_loc
Traceback (most recent call last):
ERROR: Exception in ASGI application
INFO | 2025-04-10 09:40:56 | autotrain.app.ui_routes:handle_form:657 - Column mapping: {‘text’: ‘{“text”: “prompt”, “label”: “completion”}’}
INFO | 2025-04-10 09:40:56 | autotrain.app.ui_routes:handle_form:656 - Task: lm_training
INFO | 2025-04-10 09:40:55 | autotrain.app.ui_routes:handle_form:540 - hardware: local-ui
INFO | 2025-04-10 09:38:47 | autotrain.app.ui_routes:fetch_params:415 - Task: llm:sft
INFO: 10.16.39.194:8520 - “GET / HTTP/1.1” 307 Temporary Redirect
INFO: 10.16.39.194:8520 - “GET /auth?code=fpUZnHXFMhiMrFxj&state=WDcu9dn7fUrvKpoO55yf0EGFza5REh HTTP/1.1” 307 Temporary Redirect
INFO: 10.16.10.93:40761 - “GET /login/huggingface?__sign=eyJhbGciOiJFZERTQSJ9.eyJyZWFkIjp0cnVlLCJwZXJtaXNzaW9ucyI6eyJyZXBvLmNvbnRlbnQucmVhZCI6dHJ1ZX0sIm9uQmVoYWxmT2YiOnsia2luZCI6InVzZXIiLCJfaWQiOiI2N2RhODdkYjE1YjVjMjUyMmFlNWUwYmEiLCJ1c2VyIjoibml0aW5tYWhhd2FkaXdhciJ9LCJpYXQiOjE3NDQyNzc5MTAsInN1YiI6Ii9zcGFjZXMvbml0aW5tYWhhd2FkaXdhci9hdXRvdHJhaW5lZC1jb2RlbGxhbWE3YiIsImV4cCI6MTc0NDM2NDMxMCwiaXNzIjoiaHR0cHM6Ly9odWdnaW5nZmFjZS5jbyJ9.3C8BCuYZU4XIQzaW4qXSRDoUrUqauB9_1YcUFkKV__9fUHj6OVpS_xkECJ4F-ihZNMHTnn19oWFgNTRv-dKCAw HTTP/1.1” 302 Found
ERROR | 2025-04-10 09:38:32 | autotrain.app
INFO | 2025-04-10 09:38:47 | autotrain.app.ui_routes:fetch_params:415 - Task: llm:sft
INFO: 10.16.39.194:8520 - “GET / HTTP/1.1” 307 Temporary Redirect
INFO: 10.16.39.194:8520 - “GET /auth?code=fpUZnHXFMhiMrFxj&state=WDcu9dn7fUrvKpoO55yf0EGFza5REh HTTP/1.1” 307 Temporary Redirect
INFO: 10.16.10.93:40761 - “GET /login/huggingface?__sign=eyJhbGciOiJFZERTQSJ9.eyJyZWFkIjp0cnVlLCJwZXJtaXNzaW9ucyI6eyJyZXBvLmNvbnRlbnQucmVhZCI6dHJ1ZX0sIm9uQmVoYWxmT2YiOnsia2luZCI6InVzZXIiLCJfaWQiOiI2N2RhODdkYjE1YjVjMjUyMmFlNWUwYmEiLCJ1c2VyIjoibml0aW5tYWhhd2FkaXdhciJ9LCJpYXQiOjE3NDQyNzc5MTAsInN1YiI6Ii9zcGFjZXMvbml0aW5tYWhhd2FkaXdhci9hdXRvdHJhaW5lZC1jb2RlbGxhbWE3YiIsImV4cCI6MTc0NDM2NDMxMCwiaXNzIjoiaHR0cHM6Ly9odWdnaW5nZmFjZS5jbyJ9.3C8BCuYZU4XIQzaW4qXSRDoUrUqauB9_1YcUFkKV__9fUHj6OVpS_xkECJ4F-ihZNMHTnn19oWFgNTRv-dKCAw HTTP/1.1” 302 Found
ERROR | 2025-04-10 09:38:32 | autotrain.app.ui_routes:load_index:381 - Failed to get user and orgs: object of type ‘_TemplateResponse’ has no len()
INFO: 10.16.10.93:31173 - “GET /?__sign=eyJhbGciOiJFZERTQSJ9.eyJyZWFkIjp0cnVlLCJwZXJtaXNzaW9ucyI6eyJyZXBvLmNvbnRlbnQucmVhZCI6dHJ1ZX0sIm9uQmVoYWxmT2YiOnsia2luZCI6InVzZXIiLCJfaWQiOiI2N2RhODdkYjE1YjVjMjUyMmFlNWUwYmEiLCJ1c2VyIjoibml0aW5tYWhhd2FkaXdhciJ9LCJpYXQiOjE3NDQyNzc5MTAsInN1YiI6Ii9zcGFjZXMvbml0aW5tYWhhd2FkaXdhci9hdXRvdHJhaW5lZC1jb2RlbGxhbWE3YiIsImV4cCI6MTc0NDM2NDMxMCwiaXNzIjoiaHR0cHM6Ly9odWdnaW5nZmFjZS5jbyJ9.3C8BCuYZU4XIQzaW4qXSRDoUrUqauB9_1YcUFkKV__9fUHj6OVpS_xkECJ4F-ihZNMHTnn19oWFgNTRv-dKCAw HTTP/1.1” 307 Temporary Redirect
INFO: Uvicorn running on http://0.0.0.0:7860 (Press CTRL+C to quit)
INFO: Application startup complete.
INFO: Waiting for application startup.
INFO: Started server process [61]