Skip to content
New issue

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

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

Already on GitHub? # to your account

Error while calculating score #718

Closed
aastha19 opened this issue May 8, 2019 · 6 comments
Closed

Error while calculating score #718

aastha19 opened this issue May 8, 2019 · 6 comments

Comments

@aastha19
Copy link

aastha19 commented May 8, 2019

Hi
When I try to run the generate.py file and calculate the BLEU score, an ImportError is thrown.
ImportError: cannot import name 'libbleu' from 'fairseq'
Any help would be appreciated.

@junyann
Copy link

junyann commented May 13, 2019

Hi! You can try cd into the folder containing fairseq's code, and run:

pip install --editable .

@huihuifan
Copy link
Contributor

did you run the setup?

@aastha19
Copy link
Author

Running the generate script results in
AttributeError: function 'bleu_zero_init' not found

@aastha19
Copy link
Author

did you run the setup?

Yes

@myleott
Copy link
Contributor

myleott commented May 15, 2019

The BLEU scorer depends on a C module that is compiled when you run python setup.py develop or pip install --editable .. Did that compilation succeed without errors and/or can you try again?

Alternatively you can pip install sacrebleu and pass the --sacrebleu option to generate.py

@chintanckg
Copy link

For windows, this #292 helped me.

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

No branches or pull requests

5 participants