Skip to content

Commit 8228393

Browse files
committed
Improve comment and fix assert condition for test
1 parent 3915a8d commit 8228393

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

scripts/compare-llama-bench.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ def valid_format(data_files: list[str]) -> bool:
548548
except ValueError:
549549
pass
550550

551-
# add plot_x parameter to if it's not already there
551+
# Add plot_x parameter to parameters to show if it's not already present:
552552
if known_args.plot:
553553
for k, v in PRETTY_NAMES.items():
554554
if v == known_args.plot_x and k not in show:
@@ -652,19 +652,16 @@ def create_performance_plot(table_data: list[list[str]], headers: list[str], bas
652652
if val is not None and str(val).strip():
653653
group_key_parts.append(f"{header_name}={val}")
654654

655-
if plot_x_param == "n_prompt":
656-
assert "pp" in test_name, f"n_prompt test name {test_name} does not contain 'pp'"
655+
if plot_x_param == "n_prompt" and "pp" in test_name:
657656
base_test = test_name.split("@")[0]
658657
x_value = base_test
659658
elif plot_x_param == "n_gen" and "tg" in test_name:
660-
assert "tg" in test_name, f"n_gen test name {test_name} does not contain 'tg'"
661659
x_value = test_name.split("@")[0]
662660
elif plot_x_param == "n_depth" and "@d" in test_name:
663-
assert "@d" in test_name, f"n_depth test name {test_name} does not contain '@d'"
664661
base_test = test_name.split("@d")[0]
665662
x_value = int(test_name.split("@d")[1])
666663
else:
667-
base_test = test_name
664+
assert False
668665

669666
if base_test.strip():
670667
group_key_parts.append(f"Test={base_test}")

0 commit comments

Comments
 (0)