Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting error "ValueError: could not convert string to float: '' #131

Open
bernardoleite opened this issue Mar 17, 2022 · 2 comments
Open

Comments

@bernardoleite
Copy link

Right after installing and setting up nlg-eval with success, I did the following test:

from nlgeval import NLGEval

nlgeval = NLGEval()  # loads the models
metrics_dict = nlgeval.compute_individual_metrics(['this is small test'], 'this is a test')
print(metrics_dict)

I'm getting the following error:

Error handling value: b''
Decoded value: 
eval_line: EVAL ||| 4.0 4.0 3.0 2.0 1.0 1.0 2.0 2.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.0 3.0 3.0
Traceback (most recent call last):
  File "/Users/bernardoleite/Desktop/project-folder/src/eval.py", line 27, in <module>
    run(args)
  File "/Users/bernardoleite/Desktop/project-folder/src/eval.py", line 13, in run
    metrics_dict = nlgeval.compute_individual_metrics(['this is small test'], 'this is a test')
  File "/Users/bernardoleite/opt/miniconda3/envs/myenv/lib/python3.9/site-packages/nlgeval/__init__.py", line 259, in compute_individual_metrics
    score, scores = scorer.compute_score(refs, hyps)
  File "/Users/bernardoleite/opt/miniconda3/envs/myenv/lib/python3.9/site-packages/nlgeval/pycocoevalcap/meteor/meteor.py", line 85, in compute_score
    scores.append(float(dec(v.strip())))
ValueError: could not convert string to float: ''

I am using Mac OS High Sierra with python 3.9.7.
Does anyone have an idea what the problem could be? Thanks in advance.

@juharris
Copy link
Member

You might find https://github.com/Maluuba/nlg-eval#troubleshooting or some suggestions in #64 helpful.

@juharris
Copy link
Member

juharris commented Oct 11, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants