minor plot changes
Validate Operations / validate-operations (push) Has been cancelled

This commit is contained in:
NiccoloN
2026-10-29 14:09:58 +01:00
parent 5f2db946f0
commit 4168b588fa
4 changed files with 9 additions and 7 deletions
+6 -4
View File
@@ -177,7 +177,7 @@ def test_plot_display_variant_exports(comparison, tmp_path, colors, anonymize):
for name in ("performance_energy_compact", "speedup_compact_comparison"): for name in ("performance_energy_compact", "speedup_compact_comparison"):
svg = (tmp_path / f"svg/{name}.svg").read_text() svg = (tmp_path / f"svg/{name}.svg").read_text()
if name == "performance_energy_compact": if name == "performance_energy_compact":
assert ("Anonimized better" in svg) == anonymize assert ("ANON better" in svg) == anonymize
assert ("Raptor better" in svg) == (not anonymize) assert ("Raptor better" in svg) == (not anonymize)
svg_colors = re.findall(r"(?:fill|stroke):\s*#([0-9a-fA-F]{6})", svg) svg_colors = re.findall(r"(?:fill|stroke):\s*#([0-9a-fA-F]{6})", svg)
assert svg_colors assert svg_colors
@@ -207,9 +207,9 @@ def test_anonymization_reaches_all_plot_labels(comparison, monkeypatch):
comparison.main() comparison.main()
assert len(captured) == 30 assert len(captured) == 30
assert all("Raptor" not in label for labels in captured.values() for label in labels) assert all("Raptor" not in label for labels in captured.values() for label in labels)
assert "Anonimized pipeline stages" in captured["raptor_pipeline_throughput"] assert "ANON pipeline stages" in captured["raptor_pipeline_throughput"]
assert "Anonimized better →" in captured["performance_energy_compact"] assert "ANON better →" in captured["performance_energy_compact"]
assert "Anonimized\n2 stages" in captured["validation_status"] assert "ANON\n2 stages" in captured["validation_status"]
finally: finally:
comparison.configure_style() comparison.configure_style()
@@ -262,6 +262,8 @@ def test_repeated_pimcomp_batch_results_must_agree(comparison, comparison_csv, t
fields, rows = comparison_csv fields, rows = comparison_csv
row = next(row for row in rows if row["arch"] == "arch-a" and row["model"] == "vgg8" row = next(row for row in rows if row["arch"] == "arch-a" and row["model"] == "vgg8"
and row["raptor_pipeline"] == "4") and row["raptor_pipeline"] == "4")
if field == "pimcomp_functional_validation" and row[field] == value:
value = "PASS"
row[field] = value row[field] = value
with pytest.raises(ValueError, match="inconsistent shared PIMCOMP batch results"): with pytest.raises(ValueError, match="inconsistent shared PIMCOMP batch results"):
comparison.load_results(write_csv(tmp_path / "results.csv", fields, rows)) comparison.load_results(write_csv(tmp_path / "results.csv", fields, rows))
@@ -102,7 +102,7 @@ configurations are rejected before plots are written.
Charts use the pastel palette and the Raptor name by default. Charts use the pastel palette and the Raptor name by default.
Use `--no-colors` for grayscale output; `--colors` explicitly enables colors. Use `--no-colors` for grayscale output; `--colors` explicitly enables colors.
Use `--anonymize` to replace displayed `Raptor` labels with `Anonimized`; Use `--anonymize` to replace displayed `Raptor` labels with `ANON`;
`--no-anonymize` explicitly keeps the Raptor name. The flags are independent. `--no-anonymize` explicitly keeps the Raptor name. The flags are independent.
Use `--no-marker-borders` for solid markers without outlines in the compact dot Use `--no-marker-borders` for solid markers without outlines in the compact dot
plot and line chart, including their legends. These markers use the darker plot and line chart, including their legends. These markers use the darker
@@ -657,7 +657,7 @@ def main() -> None:
parser.add_argument("--colors", action=argparse.BooleanOptionalAction, default=True, parser.add_argument("--colors", action=argparse.BooleanOptionalAction, default=True,
help="Use the pastel palette (default); --no-colors exports grayscale charts") help="Use the pastel palette (default); --no-colors exports grayscale charts")
parser.add_argument("--anonymize", action=argparse.BooleanOptionalAction, default=False, parser.add_argument("--anonymize", action=argparse.BooleanOptionalAction, default=False,
help="Replace the displayed Raptor name with Anonimized") help="Replace the displayed Raptor name with ANON")
parser.add_argument("--marker-borders", action=argparse.BooleanOptionalAction, default=True, parser.add_argument("--marker-borders", action=argparse.BooleanOptionalAction, default=True,
help="Outline markers (default); --no-marker-borders uses solid markers in dot and line charts") help="Outline markers (default); --no-marker-borders uses solid markers in dot and line charts")
args = parser.parse_args() args = parser.parse_args()
+1 -1
View File
@@ -109,7 +109,7 @@ class CenteredHatch(AbstractPathEffect):
def configure_style(*, colors: bool = True, anonymize: bool = False) -> None: def configure_style(*, colors: bool = True, anonymize: bool = False) -> None:
global _USE_COLORS global _USE_COLORS
_USE_COLORS = colors _USE_COLORS = colors
COMPILER_NAMES["raptor"] = "Anonimized" if anonymize else "Raptor" COMPILER_NAMES["raptor"] = "ANON" if anonymize else "Raptor"
plt.rcParams.update({ plt.rcParams.update({
"font.family": "DejaVu Sans", "font.family": "DejaVu Sans",
"axes.spines.top": False, "axes.spines.top": False,