Skip to content

Conversation

penelopeysm
Copy link
Member

@penelopeysm penelopeysm commented Oct 7, 2025

Closes #2678

Note, CI not running because this needs TuringLang/AbstractMCMC.jl#178 to go through.

This PR:

  • Removes the nadapts argument from HMCDA and NUTS constructors. Instead of specifying that, the user should specify the num_warmup keyword argument to sample().
  • Removes the discard_adapt keyword argument when sampling with HMCDA/NUTS, in favour of discard_initial, which has the same meaning for all samplers and is therefore more coherent.
  • Since adaptive Hamiltonians must do different behaviours for adaptation / warmup steps, this PR also implements AbstractMCMC.step_warmup for these samplers.

This also needs:

  • Changelog

@penelopeysm
Copy link
Member Author

Oh, for goodness' sake, this is way more annoying than I had realised. DynamicPPL.Sampler, simply, straight up, does NOT allow for step_warmup at all because DynamicPPL.initialstep is only called via step and not step_warmup,

@penelopeysm penelopeysm marked this pull request as draft October 7, 2025 12:50
@penelopeysm
Copy link
Member Author

I think this will just have to wait for Sampler to be removed as a whole.

@penelopeysm penelopeysm closed this Oct 9, 2025
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

Successfully merging this pull request may close these issues.

1 participant