From 0ec92108c91e3b6c2b08affa364a77493345d23c Mon Sep 17 00:00:00 2001 From: Lilith Wittmann Date: Sat, 6 Jul 2024 22:50:26 +0200 Subject: [PATCH] add algorithm details --- causy/serialization.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/causy/serialization.py b/causy/serialization.py index a41229a..b9f91ba 100644 --- a/causy/serialization.py +++ b/causy/serialization.py @@ -31,9 +31,12 @@ def load_algorithm_from_specification(algorithm_dict: Dict[str, Any]): algorithm_dict["pipeline_steps"] = load_pipeline_steps_by_definition( algorithm_dict["pipeline_steps"] ) - algorithm_dict["extensions"] = load_pipeline_steps_by_definition( - algorithm_dict["extensions"] - ) + if "extensions" in algorithm_dict and algorithm_dict["extensions"] is not None: + algorithm_dict["extensions"] = load_pipeline_steps_by_definition( + algorithm_dict["extensions"] + ) + else: + algorithm_dict["extensions"] = [] if "variables" not in algorithm_dict or algorithm_dict["variables"] is None: algorithm_dict["variables"] = []