From 0b37db1777db1aac9ba4e02cf4f6e0335c3df5d3 Mon Sep 17 00:00:00 2001 From: yisz Date: Sun, 18 Feb 2024 23:19:39 -0800 Subject: [PATCH] test_graph --- continuous_eval/eval/manager.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/continuous_eval/eval/manager.py b/continuous_eval/eval/manager.py index c31c619..7d7cd50 100644 --- a/continuous_eval/eval/manager.py +++ b/continuous_eval/eval/manager.py @@ -207,5 +207,14 @@ def load_test_results(self, filepath: Path): with open(filepath, "r") as json_file: self._test_results = json.load(json_file) + def test_graph(self): + pipeline_graph = self._pipeline.graph_repr() + tests = "\n %% Tests\n" + for module, results in self._test_results.items(): + metrics = "
".join([f"{metric}: {value}" for metric, value in results.items()]) + tests += f" {module}[{module}
---
{metrics}]\n" + + return pipeline_graph + tests + eval_manager = EvaluationManager()