File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
users/zeyer/experiments/exp2024_04_23_baselines Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -710,7 +710,6 @@ def finish(self, state: LMState):
710
710
assert seq_len <= max_seq_len
711
711
results = fl_decoder .decode (emissions_ptr , seq_len , model .wb_target_dim .dimension )
712
712
hyps_per_batch = [result .tokens for result in results ]
713
- assert all (len (hyp ) == seq_len for hyp in hyps_per_batch )
714
713
scores_per_batch = [result .score for result in results ]
715
714
best_word_seq = [
716
715
model .wb_target_dim .vocab .id_to_label (label_idx ) if label_idx >= 0 else str (label_idx )
@@ -725,6 +724,9 @@ def finish(self, state: LMState):
725
724
f" LM recalc whole seq count { fl_lm ._count_recalc_whole_seq } "
726
725
f" mem usage { dev_s } : { ' ' .join (_collect_mem_stats ())} "
727
726
)
727
+ assert all (
728
+ len (hyp ) == seq_len for hyp in hyps_per_batch
729
+ ), f"seq_len { seq_len } , hyps lens { [len (hyp ) for hyp in hyps_per_batch ]} "
728
730
if len (results ) >= n_best :
729
731
hyps_per_batch = hyps_per_batch [:n_best ]
730
732
scores_per_batch = scores_per_batch [:n_best ]
You can’t perform that action at this time.
0 commit comments