File tree Expand file tree Collapse file tree 1 file changed +12
-11
lines changed
Expand file tree Collapse file tree 1 file changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -569,17 +569,18 @@ def map_chunk(chunk: InferenceEngineChunk):
569569 final_message = finalSystemMessage
570570
571571 end_all = time_ns ()
572- logger .info ({
573- "event" : "inference.timing" ,
574- "ttft_ms" : (first_ns - start_all ) // 1e6 ,
575- "total_ms" : (end_all - start_all ) // 1e6 ,
576- "safety_ms" : safety_check_elapsed_time ,
577- "input_tokens" : input_token_count ,
578- "output_tokens" : output_token_count ,
579- "sha" : sha ,
580- "model" : model .id ,
581- "safety_check_id" : checker_type ,
582- })
572+ if first_ns > start_all :
573+ logger .info ({
574+ "event" : "inference.timing" ,
575+ "ttft_ms" : (first_ns - start_all ) // 1e6 ,
576+ "total_ms" : (end_all - start_all ) // 1e6 ,
577+ "safety_ms" : safety_check_elapsed_time ,
578+ "input_tokens" : input_token_count ,
579+ "output_tokens" : output_token_count ,
580+ "sha" : sha ,
581+ "model" : model .id ,
582+ "safety_check_id" : checker_type ,
583+ })
583584
584585 yield format_message (final_message )
585586
You can’t perform that action at this time.
0 commit comments