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

translate_stream method does not yield all translations if number of input texts is not divisible without remainder by the chunk size #24

Closed
haukelicht opened this issue Apr 16, 2021 · 2 comments

Comments

@haukelicht
Copy link

Hi there,

thanks for providing this great package!

I have encountered an issue with the translate_stream method of the EasyNMT class: If the number of input texts ('n_texts') is not divisible by the chunk_size (i.e. without remainder), translate_stream only yields the first (n_texts // chunk_size) * chunk_size translations.

A minimal working example can be found here: https://colab.research.google.com/drive/1coVyCXc8jnPdHVcFHaVEsTfv1KfhGkvm?usp=sharing

nreimers added a commit that referenced this issue Apr 16, 2021
@nreimers
Copy link
Member

Thanks for reporting this issue.

I fixed it in the code and hope I will be able to soon release a new version on pip.

Until then, you can install it from sources to get the bugfix.

@haukelicht
Copy link
Author

Great, thanks!

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