File tree Expand file tree Collapse file tree 1 file changed +7
-12
lines changed Expand file tree Collapse file tree 1 file changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -604,18 +604,13 @@ def create_tokens_prompt_from_beam(
604
604
** mm_kwargs ,
605
605
), )
606
606
607
- token_iter = range (max_tokens )
608
- if use_tqdm :
609
- token_iter = tqdm (range (max_tokens , desc = "Beam Searching" ))
610
- warnings .warn (
611
- "The progress bar shows the upper bound on token steps and "
612
- "may finish early due to stopping conditions. It does not "
613
- "reflect instance-level progress." ,
614
- stacklevel = 2 ,
615
- unit = "token" ,
616
- unit_scale = False ,
617
- )
618
-
607
+ token_iter = tqdm (range (max_tokens ), desc = "Beam search" , unit = "token" , unit_scale = False )
608
+ warnings .warn (
609
+ "The progress bar shows the upper bound on token steps and "
610
+ "may finish early due to stopping conditions. It does not "
611
+ "reflect instance-level progress." ,
612
+ stacklevel = 2 ,
613
+ )
619
614
for _ in token_iter :
620
615
all_beams : list [BeamSearchSequence ] = list (
621
616
sum ((instance .beams for instance in instances ), []))
You can’t perform that action at this time.
0 commit comments