-
Notifications
You must be signed in to change notification settings - Fork 12
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
Fix initval setters leading to NotImplementedError #547
Fix initval setters leading to NotImplementedError #547
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Just some minor comments.
BTW, looks like process_initvals
in HSSM
does not have docstrings. Can you fix that?
Line 251 in 906bce6
process_initvals: bool = True, |
src/hssm/hssm.py
Outdated
if not isinstance(self._initvals, dict): | ||
raise ValueError("self._initvals should not be a dictionary.") | ||
else: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self._initvals
can only be of type dict
right? It's initialized as a dict
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
most of these are just in response to mypy bugging me endlessly :D
will try to do a round of improvements. @digicosmos86
This changes the logic on how we store
initvals
.We now attach and update a class property
.initvals
that holds a dictionary.This dictionary is passed as
initvals
argument to the.sampler()
method.All pre-processing of initial values now targets this dictionary, instead of attempting changes to the
pymc_model
directly.