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

HMC Type hint issue #782

Open
lockwo opened this issue Mar 4, 2025 · 0 comments
Open

HMC Type hint issue #782

lockwo opened this issue Mar 4, 2025 · 0 comments

Comments

@lockwo
Copy link

lockwo commented Mar 4, 2025

With code from the HMC docs, pyright throws an error on the typing.

import blackjax
from jax import numpy as jnp

def f(x, key):
    return 0

hmc = blackjax.hmc(
    f, 1.0, jnp.array(1.0), 1
)
x = hmc.init(jnp.array(1.0))

yields

 - error: Argument missing for parameter "rng_key" (reportCallIssue)
1 error, 0 warnings, 0 informations 

This is based on the code from https://blackjax-devs.github.io/blackjax/autoapi/blackjax/mcmc/hmc/index.html#blackjax.mcmc.hmc.init.

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

1 participant