-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Remove unreachable lines of sampling code #4261
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
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -111,31 +111,31 @@ def instantiate_steppers(_model, steps, selected_steps, step_kwargs=None): | |
---------- | ||
model : Model object | ||
A fully-specified model object; legacy argument -- ignored | ||
steps : step function or vector of step functions | ||
steps : sequence of step functions | ||
One or more step functions that have been assigned to some subset of | ||
the model's parameters. Defaults to None (no assigned variables). | ||
the model's parameters. | ||
selected_steps : dictionary of step methods and variables | ||
The step methods and the variables that have were assigned to them. | ||
The step methods and the (possibly zero) variables that have were assigned to them. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And here, it should say
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And here, it should say
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure - I've added |
||
step_kwargs : dict | ||
Parameters for the samplers. Keys are the lower case names of | ||
the step method, values a dict of arguments. | ||
the step method, values a dict of arguments. Defaults to None. | ||
|
||
Returns | ||
------- | ||
methods : list | ||
List of step methods associated with the model's variables. | ||
methods : list or step | ||
List of step methods associated with the model's variables, or step method | ||
if there is only one. | ||
michaelosthege marked this conversation as resolved.
Show resolved
Hide resolved
|
||
""" | ||
if step_kwargs is None: | ||
step_kwargs = {} | ||
|
||
used_keys = set() | ||
for step_class, vars in selected_steps.items(): | ||
if len(vars) == 0: | ||
continue | ||
args = step_kwargs.get(step_class.name, {}) | ||
used_keys.add(step_class.name) | ||
step = step_class(vars=vars, **args) | ||
steps.append(step) | ||
if vars: | ||
args = step_kwargs.get(step_class.name, {}) | ||
used_keys.add(step_class.name) | ||
step = step_class(vars=vars, **args) | ||
steps.append(step) | ||
|
||
unused_args = set(step_kwargs).difference(used_keys) | ||
if unused_args: | ||
|
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.
None
has no.append
methodThere 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.
SHould be like this: