Hi folks. I have the following problem. I am gett...
# ask-the-community
p
Hi folks. I have the following problem. I am getting this error while I run it with pyflyte run --remote train.py training_workflow command. When I run the script locally (on my machine without pyflyte) everything works perfectly. I'd appreciate any help. Cheers. Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/flytekit/exceptions/scopes.py", line 206, in user_entry_point return wrapped(*args, **kwargs) File "/root/flyteWorkFlow/train.py", line 69, in get_data all_docs['class_int'] = pd.Categorical(all_docs['class']).codes File "/usr/local/lib/python3.10/site-packages/pandas/core/frame.py", line 3807, in getitem indexer = self.columns.get_loc(key) File "/usr/local/lib/python3.10/site-packages/pandas/core/indexes/base.py", line 3804, in get_loc raise KeyError(key) from err Message: 'class' User error.
k
This seems like a user code error
p
No idea what caused that. It runs on my machine. It fails on Flyte. Any ideas how to solve it?
k
Is the data the same
p
What you mean the data is the same? I did not get you. The data consist of: first row - text, second row - class name and third one - class number. Total ~ 5k records.
Any feedback on that?
k
I don’t know how to help with this, the failure is when you try to index into the dataframe