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

trap/warn if assign HMC to invalid nodes #40

Closed
paciorek opened this issue Jan 20, 2024 · 3 comments
Closed

trap/warn if assign HMC to invalid nodes #40

paciorek opened this issue Jan 20, 2024 · 3 comments

Comments

@paciorek
Copy link
Contributor

With the changes to AD handling, we are now in the position that a user could assign HMC to invalid nodes. For example, dcat and other discrete nodes or to nodes that have truncated or constraint dependencies.

At the moment we (as of AD-stoch-ind branching being merged into nimble`) simply have a run-time error when we run the HMC.

I think that in assigning NUTS samplers, we should check for invalid cases. I think these are:

  • discrete nodes
  • nodes assigned truncated distributions
  • nodes with dependencies of truncated distributions, dinterval, dconstraint
  • user-defined distribution without derivative support (I haven't thought through how difficult this would be)

@danielturek @perrydv Thoughts?

@danielturek
Copy link
Member

@paciorek Yes, I think that makes sense about the cases to catch. In the HMC samplers we already were checking for discrete nodes, but not the other cases.

And @perrydv is there a way to determine if a user-defined distribution has AD support?

@danielturek
Copy link
Member

Started working on this in PR #42.

@danielturek
Copy link
Member

Fixed in PR #42 and #57

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