HuggingFaceNmtEngine stops normalizing punctuation for NLLB models after it recovers from a CUDA out-of-memory error. It happens when translation runs out of memory and oom_batch_size_backoff_mult is below 1. Every segment the engine translates after that skips Moses punctuation normalization.
Affected: HuggingFaceNmtEngine.translate_n_batch in machine/translation/huggingface/hugging_face_nmt_engine.py.
Versions: main and #363.
Expected: the rebuilt pipeline normalizes punctuation the same way as the original one.
Actual: the rebuilt pipeline has no MosesPunctNormalizer.
Cause: the constructor passes mpn=self._mpn to the pipeline. The pipeline rebuilt after an out-of-memory error does not.
Test: no test covers the out-of-memory rebuild.
HuggingFaceNmtEnginestops normalizing punctuation for NLLB models after it recovers from a CUDA out-of-memory error. It happens when translation runs out of memory andoom_batch_size_backoff_multis below 1. Every segment the engine translates after that skips Moses punctuation normalization.Affected:
HuggingFaceNmtEngine.translate_n_batchinmachine/translation/huggingface/hugging_face_nmt_engine.py.Versions:
mainand #363.Expected: the rebuilt pipeline normalizes punctuation the same way as the original one.
Actual: the rebuilt pipeline has no
MosesPunctNormalizer.Cause: the constructor passes
mpn=self._mpnto the pipeline. The pipeline rebuilt after an out-of-memory error does not.Test: no test covers the out-of-memory rebuild.