Commit dca8f8f
authored
[fix] Fix
# What does this PR do?
Fixes `num_padding_microbatches` metric calculation for the Megatron
backend when there are real sequences with all zero loss masks (example
with `apply_overlong_filtering=true`)
The number of padding microbatches should not count all sequences with
zero loss mask because some of these are real sequences but masked out
for loss calculation.
The fix is to read the `num_padding_microbatches` attribute from the
`microbatch_iterator` when available.
Signed-off-by: SumanthRH <sumanthrh@anyscale.com>num_padding_microbatches metric for Megatron backend (#1856)1 parent 06785af commit dca8f8f
1 file changed
Lines changed: 10 additions & 6 deletions
Lines changed: 10 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1034 | 1034 | | |
1035 | 1035 | | |
1036 | 1036 | | |
1037 | | - | |
1038 | | - | |
1039 | | - | |
1040 | | - | |
1041 | | - | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
1042 | 1046 | | |
1043 | 1047 | | |
1044 | 1048 | | |
| |||
1118 | 1122 | | |
1119 | 1123 | | |
1120 | 1124 | | |
1121 | | - | |
| 1125 | + | |
1122 | 1126 | | |
1123 | 1127 | | |
1124 | 1128 | | |
| |||
0 commit comments