Skip to content

Add debug logs for when logrob rewrites don't apply #6691

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

Open
ricardoV94 opened this issue Apr 27, 2023 · 2 comments
Open

Add debug logs for when logrob rewrites don't apply #6691

ricardoV94 opened this issue Apr 27, 2023 · 2 comments

Comments

@ricardoV94
Copy link
Member

ricardoV94 commented Apr 27, 2023

We shouldn't raise errors when our measurable rewrites don't apply, because another rewrite (including a user custom one) could implement a transformation for a given graph.

However we could add debug logs for the cases where we almost wanted to raise an error because the graph is likely not measurable (e.g., if the graph looks like a convolution instead of a conditional transformation).

This way users (and devs) can figure out why PyMC refused to figure out the logprob for their graph, without having to raise eager errors or warnings.

@michaelosthege
Copy link
Member

I'd like to advocate in favor of logging with _log = logging.getLogger(__name__) loggers because then one could actually filter them.

@ricardoV94
Copy link
Member Author

Certainly

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

No branches or pull requests

2 participants