pytorch / ignite

High-level library to help with training and evaluating neural networks in PyTorch flexibly and transparently.
https://pytorch-ignite.ai
BSD 3-Clause "New" or "Revised" License
4.54k stars 619 forks source link

Wrong import in Rouge Documentation example #2175

Closed Ishan-Kumar2 closed 3 years ago

Ishan-Kumar2 commented 3 years ago

🐛 Bug description

The import line in the docs for RougeN docstring here from ignite.metrics.rouge import RougeN doesnt work.

It should be replaced with either from ignite.metrics import RougeN from ignite.metrics.nlp.rouge import RougeN from ignite.metrics.nlp import RougeN (Which is how its done for Bleu so we should follow the same here)

Also the argument is mentioned ngrams it should be ngram

Same for RougeL here

Environment

vfdev-5 commented 3 years ago

Thanks for reporting @Ishan-Kumar2 ! @gucifer please fix this

gucifer commented 3 years ago

https://github.com/pytorch/ignite/pull/2176

Added the changes.