From aeb230b70d6cae879f2c1ec12d38c11534c7b5c4 Mon Sep 17 00:00:00 2001 From: Emily Przykucki Date: Fri, 22 Nov 2024 14:49:58 -0500 Subject: [PATCH 1/3] Update `inference_parameter.py` Cast `lb` and `ub` as `floats` when they are pulled from the config. --- flepimop/gempyor_pkg/src/gempyor/inference_parameter.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/flepimop/gempyor_pkg/src/gempyor/inference_parameter.py b/flepimop/gempyor_pkg/src/gempyor/inference_parameter.py index e6a795192..a9e910549 100644 --- a/flepimop/gempyor_pkg/src/gempyor/inference_parameter.py +++ b/flepimop/gempyor_pkg/src/gempyor/inference_parameter.py @@ -53,8 +53,8 @@ def add_modifier(self, pname, ptype, parameter_config, subpops): pname=pname, subpop=sp, pdist=parameter_config["value"].as_random_distribution(), - lb=parameter_config["value"]["a"].get(), - ub=parameter_config["value"]["b"].get(), + lb=float(parameter_config["value"]["a"].get()), + ub=float(parameter_config["value"]["b"].get()), ) # grouped subpop have one parameter per group @@ -65,8 +65,8 @@ def add_modifier(self, pname, ptype, parameter_config, subpops): pname=pname, subpop=",".join(group), pdist=parameter_config["value"].as_random_distribution(), - lb=parameter_config["value"]["a"].get(), - ub=parameter_config["value"]["b"].get(), + lb=float(parameter_config["value"]["a"].get()), + ub=float(parameter_config["value"]["b"].get()), ) def add_single_parameter(self, ptype, pname, subpop, pdist, lb, ub): From 8e8020452b5989fe351cd7c4d5633bc1d008ef88 Mon Sep 17 00:00:00 2001 From: Emily Przykucki Date: Wed, 4 Dec 2024 12:28:35 -0500 Subject: [PATCH 2/3] Implementing Joseph's suggestion --- flepimop/gempyor_pkg/src/gempyor/inference_parameter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flepimop/gempyor_pkg/src/gempyor/inference_parameter.py b/flepimop/gempyor_pkg/src/gempyor/inference_parameter.py index a9e910549..2244748ce 100644 --- a/flepimop/gempyor_pkg/src/gempyor/inference_parameter.py +++ b/flepimop/gempyor_pkg/src/gempyor/inference_parameter.py @@ -65,8 +65,8 @@ def add_modifier(self, pname, ptype, parameter_config, subpops): pname=pname, subpop=",".join(group), pdist=parameter_config["value"].as_random_distribution(), - lb=float(parameter_config["value"]["a"].get()), - ub=float(parameter_config["value"]["b"].get()), + lb=parameter_config["value"]["a"].get(float), + ub=parameter_config["value"]["b"].get(float), ) def add_single_parameter(self, ptype, pname, subpop, pdist, lb, ub): From c97841d3befb394911a27aa9a5df7ac72ec4650f Mon Sep 17 00:00:00 2001 From: Emily Przykucki Date: Fri, 6 Dec 2024 09:22:00 -0500 Subject: [PATCH 3/3] Update `inference_parameter.py` --- flepimop/gempyor_pkg/src/gempyor/inference_parameter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flepimop/gempyor_pkg/src/gempyor/inference_parameter.py b/flepimop/gempyor_pkg/src/gempyor/inference_parameter.py index 2244748ce..612835e9e 100644 --- a/flepimop/gempyor_pkg/src/gempyor/inference_parameter.py +++ b/flepimop/gempyor_pkg/src/gempyor/inference_parameter.py @@ -53,8 +53,8 @@ def add_modifier(self, pname, ptype, parameter_config, subpops): pname=pname, subpop=sp, pdist=parameter_config["value"].as_random_distribution(), - lb=float(parameter_config["value"]["a"].get()), - ub=float(parameter_config["value"]["b"].get()), + lb=parameter_config["value"]["a"].get(float), + ub=parameter_config["value"]["b"].get(float), ) # grouped subpop have one parameter per group