From 4168b588facabe5e7a3eee7cd6aa8c8ba3b69b94 Mon Sep 17 00:00:00 2001 From: NiccoloN Date: Thu, 29 Oct 2026 14:09:58 +0100 Subject: [PATCH] minor plot changes --- validation/tests/test_pim_plots.py | 10 ++++++---- validation/tools/pim/pimcomp/compare/README.md | 2 +- validation/tools/pim/pimcomp/compare/generate_plots.py | 2 +- validation/tools/pim/plot_style.py | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/validation/tests/test_pim_plots.py b/validation/tests/test_pim_plots.py index 76adf46..ced8293 100644 --- a/validation/tests/test_pim_plots.py +++ b/validation/tests/test_pim_plots.py @@ -177,7 +177,7 @@ def test_plot_display_variant_exports(comparison, tmp_path, colors, anonymize): for name in ("performance_energy_compact", "speedup_compact_comparison"): svg = (tmp_path / f"svg/{name}.svg").read_text() if name == "performance_energy_compact": - assert ("Anonimized better" in svg) == anonymize + assert ("ANON better" in svg) == anonymize assert ("Raptor better" in svg) == (not anonymize) svg_colors = re.findall(r"(?:fill|stroke):\s*#([0-9a-fA-F]{6})", svg) assert svg_colors @@ -207,9 +207,9 @@ def test_anonymization_reaches_all_plot_labels(comparison, monkeypatch): comparison.main() assert len(captured) == 30 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 "Anonimized better →" in captured["performance_energy_compact"] - assert "Anonimized\n2 stages" in captured["validation_status"] + assert "ANON pipeline stages" in captured["raptor_pipeline_throughput"] + assert "ANON better →" in captured["performance_energy_compact"] + assert "ANON\n2 stages" in captured["validation_status"] finally: comparison.configure_style() @@ -262,6 +262,8 @@ def test_repeated_pimcomp_batch_results_must_agree(comparison, comparison_csv, t fields, rows = comparison_csv row = next(row for row in rows if row["arch"] == "arch-a" and row["model"] == "vgg8" and row["raptor_pipeline"] == "4") + if field == "pimcomp_functional_validation" and row[field] == value: + value = "PASS" row[field] = value with pytest.raises(ValueError, match="inconsistent shared PIMCOMP batch results"): comparison.load_results(write_csv(tmp_path / "results.csv", fields, rows)) diff --git a/validation/tools/pim/pimcomp/compare/README.md b/validation/tools/pim/pimcomp/compare/README.md index f4341ee..4f850a5 100644 --- a/validation/tools/pim/pimcomp/compare/README.md +++ b/validation/tools/pim/pimcomp/compare/README.md @@ -102,7 +102,7 @@ configurations are rejected before plots are written. Charts use the pastel palette and the Raptor name by default. 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. 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 diff --git a/validation/tools/pim/pimcomp/compare/generate_plots.py b/validation/tools/pim/pimcomp/compare/generate_plots.py index 983758e..a8446ac 100755 --- a/validation/tools/pim/pimcomp/compare/generate_plots.py +++ b/validation/tools/pim/pimcomp/compare/generate_plots.py @@ -657,7 +657,7 @@ def main() -> None: parser.add_argument("--colors", action=argparse.BooleanOptionalAction, default=True, help="Use the pastel palette (default); --no-colors exports grayscale charts") 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, help="Outline markers (default); --no-marker-borders uses solid markers in dot and line charts") args = parser.parse_args() diff --git a/validation/tools/pim/plot_style.py b/validation/tools/pim/plot_style.py index 18131b9..155accc 100644 --- a/validation/tools/pim/plot_style.py +++ b/validation/tools/pim/plot_style.py @@ -109,7 +109,7 @@ class CenteredHatch(AbstractPathEffect): def configure_style(*, colors: bool = True, anonymize: bool = False) -> None: global _USE_COLORS _USE_COLORS = colors - COMPILER_NAMES["raptor"] = "Anonimized" if anonymize else "Raptor" + COMPILER_NAMES["raptor"] = "ANON" if anonymize else "Raptor" plt.rcParams.update({ "font.family": "DejaVu Sans", "axes.spines.top": False,