Skip to content

Commit 179767e

Browse files
committed
Quick fix to typing issue (with TODO item for better fix)
Signed-off-by: Olivier Delalleau <507137+odelalleau@users.noreply.github.com>
1 parent 3297cd1 commit 179767e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

nemo_rl/algorithms/loss_functions.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,8 @@ def _dpo_loss(
623623
rewards, sample_mask, global_valid_seqs, self.reference_policy_kl_penalty
624624
)
625625

626-
def __call__(
626+
# TODO a cleaner typing fix would be required (probably that DPOLossFn should not inherit from PreferenceLoss)
627+
def __call__( # type: ignore
627628
self,
628629
next_token_logits: Tensor,
629630
data: BatchedDataDict[DPOLossDataDict],

0 commit comments

Comments
 (0)