Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Casting bound values as float in inference_parameter.py to prevent parsing errors #405

Merged
merged 4 commits into from
Dec 6, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions flepimop/gempyor_pkg/src/gempyor/inference_parameter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a specific reason this is of a different form to lines 68 and 69? Otherwise I think this will deal with the error. thanks!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops nope, just fixed them so that they match. Good catch

ub=float(parameter_config["value"]["b"].get()),
)

# grouped subpop have one parameter per group
Expand All @@ -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()),
jcblemai marked this conversation as resolved.
Show resolved Hide resolved
ub=float(parameter_config["value"]["b"].get()),
)

def add_single_parameter(self, ptype, pname, subpop, pdist, lb, ub):
Expand Down