Skip to content

Commit

Permalink
Avoid multiple warnings for loss mask (NVIDIA#6062)
Browse files Browse the repository at this point in the history
Signed-off-by: Mikołaj Błaż <[email protected]>
  • Loading branch information
mikolajblaz authored and titu1994 committed Mar 24, 2023
1 parent 6b22b52 commit 6b925ae
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ def __getitem__(self, idx):
# Negative index comes when we pad the last batch in MegatronPretrainingBatchSampler
# We make the loss_mask zero to mask out loss from these samples
if idx == -1:
logging.info('WARNING: Got -1 as item index. Masking loss from this sample')
logging.debug('Got -1 as item index. Masking loss from this sample')
loss_mask = torch.zeros_like(loss_mask)

return {
Expand Down

0 comments on commit 6b925ae

Please sign in to comment.