From a5a61425eb62ff2c7a9bbe8d7793c739bd352003 Mon Sep 17 00:00:00 2001 From: thecaptain789 Date: Sat, 7 Feb 2026 16:56:22 +0000 Subject: [PATCH] fix: correct typos 'occured' and 'occurence' --- fairseq/data/huffman/huffman_coder.py | 2 +- fairseq/optim/dynamic_loss_scaler.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fairseq/data/huffman/huffman_coder.py b/fairseq/data/huffman/huffman_coder.py index c04f84564e..000cfb164e 100644 --- a/fairseq/data/huffman/huffman_coder.py +++ b/fairseq/data/huffman/huffman_coder.py @@ -173,7 +173,7 @@ def decode(self, bits: bitarray) -> tp.Iterator["HuffmanNode"]: class HuffmanCodeBuilder: """ - build a dictionary with occurence count and then build the Huffman code for it. + build a dictionary with occurrence count and then build the Huffman code for it. """ def __init__(self): diff --git a/fairseq/optim/dynamic_loss_scaler.py b/fairseq/optim/dynamic_loss_scaler.py index 60c47b8db0..1216bafacf 100644 --- a/fairseq/optim/dynamic_loss_scaler.py +++ b/fairseq/optim/dynamic_loss_scaler.py @@ -42,7 +42,7 @@ def _decrease_loss_scale(self): def check_overflow(self, grad_norm): # detect inf and nan if grad_norm == float("inf") or grad_norm != grad_norm: - # overflow has occured + # overflow has occurred prev_scale = self.loss_scale iter_since_rescale = self._iter - self._last_rescale_iter