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

error when no gradient function is provided #1

Open
gica3618 opened this issue Jun 19, 2023 · 1 comment
Open

error when no gradient function is provided #1

gica3618 opened this issue Jun 19, 2023 · 1 comment

Comments

@gica3618
Copy link

When a sampler is initialised without gradient function (that is, grad_logLikelihood=None), and error is thrown by the helpers.py:
NameError: name 'numerical_grad' is not defined
Indeed, numerical_grad on line 53 of helpers.py is not defined. So I believe that currently, the code does not work if no gradient function is provided.
As an example to reproduce the error, one can replace grad_logLikelihood by None on line 185 of imf_examples.py.

@JohannesBuchner
Copy link
Owner

yeah, grad_logLikelihood=None is not intended to be supported here, but was supported in the original code.

This is an odd error to receive, and a byproduct of stale code that should not be reached. Probably best would be to assert grad_logLikelihood is not None somewhere.

PRs are welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants