-
Notifications
You must be signed in to change notification settings - Fork 2
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
Keyword arguments #6
Conversation
Codecov Report
@@ Coverage Diff @@
## master #6 +/- ##
==========================================
+ Coverage 97.05% 97.22% +0.16%
==========================================
Files 1 1
Lines 34 36 +2
==========================================
+ Hits 33 35 +2
Misses 1 1
Continue to review full report at Codecov.
|
My comments at this point are more high level, and they are opinionated. DynamicHMC is intended to serve as a sampling backend. As a result, it is highly customizable, but that also means that its API is meant to be more developer-friendly than user-friendly. While it is nice to have the customizability by essentially using DynamicHMC's API for configurable options, in my view it is better to identify the options users will most likely want to change and offer a convenient interface for changing those, while offering the rest of the options in a not-necessarily-as-user-friendly interface. e.g. most users will not and should not change the warmup schedule, but they should change the total number of warmup draws, and the number of doublings should be set based on this number of draws. It is probably best that this package offer a warmup stage function that, if passed a number of warmup draws, auto chooses the warmup based on that. Most users will want some feedback on how quickly their model is sampling. Defaulting to For In my view the most common warmup options users will want to (and should) change would be (roughly in decreasing order of priority):
A simple interface for setting these directly without needing to know DynamicHMC's API and types would go a long way toward making it easy for the vast majority of users to do everything they need with this package. What are your thoughts? |
Thanks @sethaxen , this is a valuable discussion. Maybe it can help (or not hurt too much) to lay out some motivations that might be entirely at odds with each other. It's a sort of overdetermined system, and hopefully we can find the right metric for projecting onto the solution space. Sorry if this is stretching the analogy a little thin :)
Based on all of this, I'm leaning toward something like
|
I think you had suggested somewhere that if we allow keeping the warmup, we might have a |
Okay, I think I see where you're coming from.
Perhaps if we do this, it would be best to also re-export DynamicHMC from this package so that the user doesn't need to explicitly load DynamicHMC to access the API functions.
Yes, perhaps we can revisit this after using it for a while and maybe getting user input.
Yes, exactly. There could also be a "warmup_stage" field, since DynamicHMC gives us that information, but that seems unnecessary. Yet another alternative is having a warmup field in
ProgressMeter is friendly with Distributed and Threads, but we may need to create the progress bar outside of the threaded loop to have a single progress bar shared across threads (right now it seems to just show one bar at a time). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made some suggestions, mostly documentation ones. In general this package also needs more tests. In particular now that the dynamicHMC
function is correctly called and that user-specified parameters are effective, also that newchain
creates a chain with the expected number of warmup stages and that sample!
adds the expected number of samples.
What's the status of this PR? |
Thanks for the ping @sethaxen . It looks like I had missed your earlier comments. Sorry about that, I'll have a look now. Also, it looks like we'll need to update for TransformVariables 0.4. Shouldn't be much to that, I think the biggest change is that transforms are no longer callable, but need to use |
Co-authored-by: Seth Axen <[email protected]>
Co-authored-by: Seth Axen <[email protected]>
Co-authored-by: Seth Axen <[email protected]>
Co-authored-by: Seth Axen <[email protected]>
Co-authored-by: Seth Axen <[email protected]>
Co-authored-by: Seth Axen <[email protected]>
Co-authored-by: Seth Axen <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about doing @reexport using DynamicHMC
?
cc @sethaxen