-
Notifications
You must be signed in to change notification settings - Fork 84
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
Support Enumerate inside HMC #293
Comments
To do this, it could be helpful to generalize |
I think I have this working for the case where tapes enter the enumerated model as ERP parameters. See this test (based on Andreas' example from #287) for an example. (See my hmc-over-enum branch for the rest of the code.) It's of course possible to write down models where tapes enter in some other way, but I couldn't come up with any examples that seemed useful in practice. Does what I have cover the cases we're interested in? So far I've adified appropriate bits of code by hand to get a feel for what needs transforming. It's not clear to me exactly how to best generalize |
This may already be covered by what you have, but two important cases to get right are sequential and nested enumerations, as in these examples: Sequential:
Nested:
|
We do have a lot of cases where params flow into nested Enumeration not directly as an ERP param. Eg. within the enum there might be a We also often access the score of a submodel (not just sample from it): within outer @mhtess or @hawkrobe can provide further examples of actual cases. |
Great. I think they'll work, but I'll make sure.
Ah, of course! Come to think of it I think these will probably already work too, but again I'll make sure. Thanks! |
I've added more tests for the cases mentioned above, they all seem to work OK. I've also decided on an approach to generalizing |
Why not transform everything in every file that ends with |
The only file that's transformed at present is I believe this was done for performance reasons. One relevant data point is that in #265 we noticed that using ADified score functions caused the run time of existing algorithms to increase by something like 40%. The more general version of the AD transform I wrote can be used to transform a whole file. (It only requires a The question of whether we should be transforming all of |
I agree that it's unrelated to this issue—I'm discussing it here since this is where you linked to the new approach to generalizing |
Previous discussion:
The text was updated successfully, but these errors were encountered: