File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
examples/speculative_decoding/collect_hidden_states Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -106,12 +106,14 @@ async def main(args: argparse.Namespace) -> None:
106
106
num_total_conversations = min (
107
107
len (all_conversations ), args .debug_max_num_conversations or len (all_conversations )
108
108
)
109
- for entry in tqdm (
110
- all_conversations [: args .debug_max_num_conversations ],
111
- desc = "Processing conversations" ,
112
- total = num_total_conversations ,
109
+ for idx , entry in enumerate (
110
+ tqdm (
111
+ all_conversations [: args .debug_max_num_conversations ],
112
+ desc = "Processing conversations" ,
113
+ total = num_total_conversations ,
114
+ )
113
115
):
114
- conversation_id = entry [ "conversation_id" ]
116
+ conversation_id = entry . get ( "conversation_id" , "{:08d}" . format ( idx ))
115
117
conversations = entry ["conversations" ]
116
118
if not conversations or not isinstance (conversations , list ):
117
119
num_invalid += 1
You can’t perform that action at this time.
0 commit comments