File "/home/asrst/.cache/pypoetry/virtualenvs/llm-NDDKoWLm-py3.10/lib/python3.10/site-packages/ragas/evaluation.py", line 292, in __repr__
score_strs = [f"'{k}': {v:0.4f}" for k, v in scores.items()]
File "/home/asrst/.cache/pypoetry/virtualenvs/llm-NDDKoWLm-py3.10/lib/python3.10/site-packages/ragas/evaluation.py", line 292, in <listcomp>
score_strs = [f"'{k}': {v:0.4f}" for k, v in scores.items()]
ValueError: Unknown format code 'f' for object of type 'str'
Expected behavior
output metrics (python dictonary)
Additional context
this usually can happen when v is a string instead of float. But in what cases ragas returns a string value for v in scores.items() ? Ideally it should be numeric for any metric.
[X] I have checked the documentation and related resources and couldn't resolve my bug.
Describe the bug ValueError: Unknown format code 'f' for object of type 'str'
Ragas version: 0.1.7 Python version: 3.10
Code to Reproduce
Error trace
Expected behavior
output metrics (python dictonary)
Additional context this usually can happen when
v
is a string instead of float. But in what cases ragas returns a string value forv
in scores.items() ? Ideally it should be numeric for any metric.R-237