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

Mypy has issues with adding classes to the locals() in pyro.poutine.handlers module #3284

Closed
ordabayevy opened this issue Oct 19, 2023 · 0 comments · Fixed by #3285
Closed

Comments

@ordabayevy
Copy link
Member

In the pyro.poutine.handlers submodule there is a _make_handler function that converts the classes from the _msngrs list to handler functions and adds them to the locals() (e.g., BlockMessenger -> block). Then these are imported in the pyro.poutine.__init__ (i.e., from .handlers import block). Mypy doesn't like this. One solution could be to rename these messengers like BlockMessenger -> block and make them callable like in NumPyro.

@ordabayevy ordabayevy linked a pull request Oct 22, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant