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

An error occurred when running mol_translation_metrics.py #1

Closed
laituan245 opened this issue May 3, 2022 · 1 comment
Closed

An error occurred when running mol_translation_metrics.py #1

laituan245 opened this issue May 3, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@laituan245
Copy link
Collaborator

I was just trying to run the example command python mol_translation_metrics.py --input_file caption2smiles_example.txt.

The error log

0 processed.
Traceback (most recent call last):
  File "C:\Users\laitu\Downloads\MolT5\evaluation\mol_translation_metrics.py", line 66, in <module>
    mscore = meteor_score([gt], out)
  File "C:\Users\laitu\Anaconda3\lib\site-packages\nltk\translate\meteor_score.py", line 397, in meteor_score
    return max(
  File "C:\Users\laitu\Anaconda3\lib\site-packages\nltk\translate\meteor_score.py", line 398, in <genexpr>
    single_meteor_score(
  File "C:\Users\laitu\Anaconda3\lib\site-packages\nltk\translate\meteor_score.py", line 326, in single_meteor_score
    enum_hypothesis, enum_reference = _generate_enums(
  File "C:\Users\laitu\Anaconda3\lib\site-packages\nltk\translate\meteor_score.py", line 33, in _generate_enums
    raise TypeError(
TypeError: "hypothesis" expects pre-tokenized hypothesis (Iterable[str]): C1=CC=C2C(=C1)C(=O)C3=C(C2=O)C=C(C=C3)C(=O)[O-]
@laituan245 laituan245 added the bug Something isn't working label May 3, 2022
@laituan245
Copy link
Collaborator Author

It is interesting that I don't see this error anymore when running on a different computer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants