Skip to content

Conversation

@yallup
Copy link
Collaborator

@yallup yallup commented Oct 10, 2025

Some small changes so that the slice sampling is easier to run as a standalone kernel, in particular

  • init in top level API for SS was unusable due to constraint function not being passed
  • Minor issues in passing controllable kwargs to the HRSS top level api

Copy link

@williamjameshandley williamjameshandley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great idea.
Could we add some tests/examples on actually running a slice sampler on its own?

"""
return SliceState(position, logdensity_fn(position), constraint_fn(position))
logp = logdensity_fn(position)
constraint_val = (constraint_fn or (lambda _: jnp.array([])))(position)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the blackjaxy way to do it, or should this default go at line 92?

def build_hrss_kernel(
generate_slice_direction_fn: Callable,
stepper_fn: Callable,
max_steps: int = 10,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Defaults are important -- is max_steps 10 well motivated (and not e.g. 16, or 1024)?

@williamjameshandley
Copy link

Fixed in #45

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.

3 participants