Super tiny code cleanup (#15652)

This commit is contained in:
fzyzcjy
2025-12-24 22:15:00 +08:00
committed by GitHub
parent fd4a558e71
commit aa21c6e3f1

View File

@@ -1101,13 +1101,11 @@ class Req:
def log_time_stats(self):
# If overlap schedule, we schedule one decode batch ahead so this gets called twice.
if self.has_log_time_stats is True:
if self.has_log_time_stats:
return
if self.bootstrap_room is not None:
prefix = f"Req Time Stats(rid={self.rid}, bootstrap_room={self.bootstrap_room}, input len={len(self.origin_input_ids)}, output len={len(self.output_ids)}, type={self.time_stats.disagg_mode_str()})"
else:
prefix = f"Req Time Stats(rid={self.rid}, input len={len(self.origin_input_ids)}, output len={len(self.output_ids)}, type={self.time_stats.disagg_mode_str()})"
bootstrap_info = f", bootstrap_room={self.bootstrap_room}" if self.bootstrap_room is not None else ""
prefix = f"Req Time Stats(rid={self.rid}{bootstrap_info}, input len={len(self.origin_input_ids)}, output len={len(self.output_ids)}, type={self.time_stats.disagg_mode_str()})"
logger.info(f"{prefix}: {self.time_stats.convert_to_duration()}")
self.has_log_time_stats = True