Skip to content

Commit 23ac907

Browse files
crasandersfacebook-github-bot
authored andcommitted
fix bug when semip is passed None for likelihood (#347)
Summary: Pull Request resolved: #347 Adds a check to make sure likelihood class is not None when constructing the likelihood of SemiP from a config Reviewed By: mshvartsman Differential Revision: D57624855 fbshipit-source-id: 514996c4f2c97c98d33171e811199ad47466a98e
1 parent 6cf932a commit 23ac907

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

aepsych/models/semi_p.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,8 +280,10 @@ def from_config(cls, config: Config) -> SemiParametricGPModel:
280280

281281
if hasattr(likelihood_cls, "from_config"):
282282
likelihood = likelihood_cls.from_config(config)
283-
else:
283+
elif likelihood_cls is not None:
284284
likelihood = likelihood_cls()
285+
else:
286+
likelihood = None
285287

286288
stim_dim = config.getint(classname, "stim_dim", fallback=0)
287289

0 commit comments

Comments
 (0)