Skip to content

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

@ordabayevy

Description

@ordabayevy

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions