ArrowInvalid: ('cannot mix struct and non-struct, non-null values', 'Conversion failed for column statement with type object')
Traceback:
File "C:\anaconda_setup\envs\SDG-goal\lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 534, in _run_script
exec(code, module.dict)
File "C:\anaconda_setup\envs\SDG-goal\Lib\site-packages\trulens_eval\pages\Evaluations.py", line 369, in
display_feedback_call(feedback_calls)
File "C:\anaconda_setup\envs\SDG-goal\Lib\site-packages\trulens_eval\pages\Evaluations.py", line 358, in display_feedback_call
st.dataframe(
File "C:\anaconda_setup\envs\SDG-goal\lib\site-packages\streamlit\runtime\metrics_util.py", line 396, in wrapped_func
result = non_optional_func(*args, **kwargs)
File "C:\anaconda_setup\envs\SDG-goal\lib\site-packages\streamlit\elements\arrow.py", line 230, in dataframe
proto.data = type_util.data_frame_to_bytes(data_df)
File "C:\anaconda_setup\envs\SDG-goal\lib\site-packages\streamlit\type_util.py", line 821, in data_frame_to_bytes
table = pa.Table.from_pandas(df)
File "pyarrow\table.pxi", line 3869, in pyarrow.lib.Table.from_pandas
File "C:\anaconda_setup\envs\SDG-goal\lib\site-packages\pyarrow\pandas_compat.py", line 613, in dataframe_to_arrays
arrays = [convert_column(c, f)
File "C:\anaconda_setup\envs\SDG-goal\lib\site-packages\pyarrow\pandas_compat.py", line 613, in
arrays = [convert_column(c, f)
File "C:\anaconda_setup\envs\SDG-goal\lib\site-packages\pyarrow\pandas_compat.py", line 600, in convert_column
raise e
File "C:\anaconda_setup\envs\SDG-goal\lib\site-packages\pyarrow\pandas_compat.py", line 594, in convertcolumn
result = pa.array(col, type=type, from_pandas=True, safe=safe)
File "pyarrow\array.pxi", line 340, in pyarrow.lib.array
File "pyarrow\array.pxi", line 86, in pyarrow.lib._ndarray_to_array
File "pyarrow\error.pxi", line 91, in pyarrow.lib.check_status
more info :
I'm running only context relevance feedback function as follow
While running dashboard , Im getting this error :
ArrowInvalid: ('cannot mix struct and non-struct, non-null values', 'Conversion failed for column statement with type object') Traceback: File "C:\anaconda_setup\envs\SDG-goal\lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 534, in _run_script exec(code, module.dict) File "C:\anaconda_setup\envs\SDG-goal\Lib\site-packages\trulens_eval\pages\Evaluations.py", line 369, in
display_feedback_call(feedback_calls)
File "C:\anaconda_setup\envs\SDG-goal\Lib\site-packages\trulens_eval\pages\Evaluations.py", line 358, in display_feedback_call
st.dataframe(
File "C:\anaconda_setup\envs\SDG-goal\lib\site-packages\streamlit\runtime\metrics_util.py", line 396, in wrapped_func
result = non_optional_func(*args, **kwargs)
File "C:\anaconda_setup\envs\SDG-goal\lib\site-packages\streamlit\elements\arrow.py", line 230, in dataframe
proto.data = type_util.data_frame_to_bytes(data_df)
File "C:\anaconda_setup\envs\SDG-goal\lib\site-packages\streamlit\type_util.py", line 821, in data_frame_to_bytes
table = pa.Table.from_pandas(df)
File "pyarrow\table.pxi", line 3869, in pyarrow.lib.Table.from_pandas
File "C:\anaconda_setup\envs\SDG-goal\lib\site-packages\pyarrow\pandas_compat.py", line 613, in dataframe_to_arrays
arrays = [convert_column(c, f)
File "C:\anaconda_setup\envs\SDG-goal\lib\site-packages\pyarrow\pandas_compat.py", line 613, in
arrays = [convert_column(c, f)
File "C:\anaconda_setup\envs\SDG-goal\lib\site-packages\pyarrow\pandas_compat.py", line 600, in convert_column
raise e
File "C:\anaconda_setup\envs\SDG-goal\lib\site-packages\pyarrow\pandas_compat.py", line 594, in convertcolumn
result = pa.array(col, type=type, from_pandas=True, safe=safe)
File "pyarrow\array.pxi", line 340, in pyarrow.lib.array
File "pyarrow\array.pxi", line 86, in pyarrow.lib._ndarray_to_array
File "pyarrow\error.pxi", line 91, in pyarrow.lib.check_status
more info :
I'm running only context relevance feedback function as follow
f_context_relevance = ( Feedback(fopenai.qs_relevance_with_cot_reasons, name = "Context Relevance") .on(Select.RecordCalls.retrieve.args.query) .on(Select.RecordCalls.retrieve.rets.collect()) .aggregate(np.mean) )
My Rag from scratch ::
class RAG_from_scratch: @instrument def retrieve(self, query: str) -> list: """ Retrieve relevant text from vector store. """ results = db_faiss.similarity_search_with_relevance_scores(query,2) return results
rag = RAG_from_scratch()
Note : The app (dashboard) does not throw this error for QA relevance feedback function