pyarrow.lib.ArrowTypeError: ("Expected bytes, got a 'list' object", 'Conversion failed for column context with type object')
Closed this issue · 1 comments
<class 'pandas.core.frame.DataFrame'>
Traceback (most recent call last):
File "inference.py", line 316, in
main()
File "inference.py", line 98, in main
datasets = run_sparse_retrieval(
File "inference.py", line 157, in run_sparse_retrieval
datasets = DatasetDict({"validation": Dataset.from_pandas(df, features=f)})
File "/opt/conda/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 393, in from_pandas
pa_table: pa.Table = pa.Table.from_pandas(
File "pyarrow/table.pxi", line 1561, in pyarrow.lib.Table.from_pandas
File "/opt/conda/lib/python3.8/site-packages/pyarrow/pandas_compat.py", line 607, in dataframe_to_arrays
arrays[i] = maybe_fut.result()
File "/opt/conda/lib/python3.8/concurrent/futures/_base.py", line 432, in result
return self.__get_result()
File "/opt/conda/lib/python3.8/concurrent/futures/_base.py", line 388, in __get_result
raise self.exception
File "/opt/conda/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/opt/conda/lib/python3.8/site-packages/pyarrow/pandas_compat.py", line 581, in convert_column
raise e
File "/opt/conda/lib/python3.8/site-packages/pyarrow/pandas_compat.py", line 575, in convert_column
result = pa.array(col, type=type, from_pandas=True, safe=safe)
File "pyarrow/array.pxi", line 302, in pyarrow.lib.array
File "pyarrow/array.pxi", line 83, in pyarrow.lib._ndarray_to_array
File "pyarrow/error.pxi", line 122, in pyarrow.lib.check_status
pyarrow.lib.ArrowTypeError: ("Expected bytes, got a 'list' object", 'Conversion failed for column context with type object')