Skip to content
Snippets Groups Projects
Commit a51ccb79 authored by Sylvia Biscoveanu's avatar Sylvia Biscoveanu Committed by Michael Williams
Browse files

BUG: Fix custom prior loading from result file

parent 38b30527
No related branches found
No related tags found
1 merge request!1360BUG: Fix custom prior loading from result file
Pipeline #630440 passed
......@@ -154,13 +154,16 @@ def decode_bilby_json(dct):
try:
cls = getattr(import_module(dct["__module__"]), dct["__name__"])
except AttributeError:
logger.debug(
logger.warning(
"Unknown prior class for parameter {}, defaulting to base Prior object".format(
dct["kwargs"]["name"]
)
)
from ..prior import Prior
for key in list(dct["kwargs"].keys()):
if key not in ["name", "latex_label", "unit", "minimum", "maximum", "boundary"]:
dct["kwargs"].pop(key)
cls = Prior
obj = cls(**dct["kwargs"])
return obj
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment