Quiet test_bs_1_speed CI log (#25548)
This commit is contained in:
@@ -3495,7 +3495,10 @@ class Scheduler(
|
|||||||
|
|
||||||
if empty_cache:
|
if empty_cache:
|
||||||
current_platform.empty_cache()
|
current_platform.empty_cache()
|
||||||
logger.info("Cache flushed successfully!")
|
# Per-DP-group leader logs once: ranks within a DP group are
|
||||||
|
# state-synchronous, but DP groups may diverge.
|
||||||
|
if self.is_stats_logging_rank:
|
||||||
|
logger.info("Cache flushed successfully!")
|
||||||
success = True
|
success = True
|
||||||
else:
|
else:
|
||||||
logging.warning(
|
logging.warning(
|
||||||
|
|||||||
@@ -14,8 +14,9 @@ class SpecDecodingMixin:
|
|||||||
acc_length, speed = 0.0, 0.0
|
acc_length, speed = 0.0, 0.0
|
||||||
for attempt in range(1, self.bs_1_speed_attempts + 1):
|
for attempt in range(1, self.bs_1_speed_attempts + 1):
|
||||||
requests.get(self.base_url + "/flush_cache")
|
requests.get(self.base_url + "/flush_cache")
|
||||||
acc_length, speed = send_one_prompt(args)
|
acc_length, speed = send_one_prompt(
|
||||||
print(f"attempt {attempt}: {acc_length=:.2f} {speed=:.2f}")
|
args, label=f"attempt {attempt}", print_output=False
|
||||||
|
)
|
||||||
if acc_length > self.accept_length_thres and speed > self.bs_1_speed_thres:
|
if acc_length > self.accept_length_thres and speed > self.bs_1_speed_thres:
|
||||||
break
|
break
|
||||||
requests.get(self.base_url + "/flush_cache")
|
requests.get(self.base_url + "/flush_cache")
|
||||||
|
|||||||
@@ -105,7 +105,11 @@ class BenchArgs:
|
|||||||
return cls(**{attr: getattr(args, attr) for attr in attrs})
|
return cls(**{attr: getattr(args, attr) for attr in attrs})
|
||||||
|
|
||||||
|
|
||||||
def send_one_prompt(args: BenchArgs):
|
def send_one_prompt(
|
||||||
|
args: BenchArgs,
|
||||||
|
label: Optional[str] = None,
|
||||||
|
print_output: bool = True,
|
||||||
|
):
|
||||||
base_url = f"http://{args.host}:{args.port}"
|
base_url = f"http://{args.host}:{args.port}"
|
||||||
|
|
||||||
# Construct the input
|
# Construct the input
|
||||||
@@ -235,10 +239,12 @@ def send_one_prompt(args: BenchArgs):
|
|||||||
speed = ret["meta_info"]["completion_tokens"] / latency
|
speed = ret["meta_info"]["completion_tokens"] / latency
|
||||||
tokens = ret["meta_info"]["completion_tokens"]
|
tokens = ret["meta_info"]["completion_tokens"]
|
||||||
|
|
||||||
if not args.stream:
|
if not args.stream and print_output:
|
||||||
print(ret["text"])
|
print(ret["text"])
|
||||||
|
|
||||||
print()
|
print()
|
||||||
|
if label is not None:
|
||||||
|
print(label)
|
||||||
headers = ["Latency (s)", "Tokens", "Acc Length", "Speed (token/s)"]
|
headers = ["Latency (s)", "Tokens", "Acc Length", "Speed (token/s)"]
|
||||||
rows = [[f"{latency:.3f}", f"{tokens}", f"{acc_length:.3f}", f"{speed:.2f}"]]
|
rows = [[f"{latency:.3f}", f"{tokens}", f"{acc_length:.3f}", f"{speed:.2f}"]]
|
||||||
msg = tabulate.tabulate(rows, headers=headers, tablefmt="pretty")
|
msg = tabulate.tabulate(rows, headers=headers, tablefmt="pretty")
|
||||||
|
|||||||
Reference in New Issue
Block a user