Super tiny code cleanup (#15652)
This commit is contained in:
@@ -1101,13 +1101,11 @@ class Req:
|
|||||||
|
|
||||||
def log_time_stats(self):
|
def log_time_stats(self):
|
||||||
# If overlap schedule, we schedule one decode batch ahead so this gets called twice.
|
# 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
|
return
|
||||||
|
|
||||||
if self.bootstrap_room is not None:
|
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_room={self.bootstrap_room}, input len={len(self.origin_input_ids)}, output len={len(self.output_ids)}, type={self.time_stats.disagg_mode_str()})"
|
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()})"
|
||||||
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()})"
|
|
||||||
logger.info(f"{prefix}: {self.time_stats.convert_to_duration()}")
|
logger.info(f"{prefix}: {self.time_stats.convert_to_duration()}")
|
||||||
self.has_log_time_stats = True
|
self.has_log_time_stats = True
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user