Skip to content

Commit

Permalink
more comment
Browse files Browse the repository at this point in the history
Signed-off-by: Terry Kong <[email protected]>
  • Loading branch information
terrykong committed Nov 7, 2024
1 parent 3d1ae26 commit 380e37d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion nemo_aligner/data/nlp/builders.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,10 @@ def collate_with_pad_to_max_batch(max_seqlen, tokenizer_eos_id, cfg, generate_ma


def identity_collate(batch):
# Useful since torch's data loader's default collate will crash with ragged sequences.
"""
Useful since torch's data loader's default collate will crash with ragged sequences.
Also, this function is needed b/c lambda functions aren't pickle-able.
"""
return batch


Expand Down

0 comments on commit 380e37d

Please sign in to comment.