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

NUTS sampler fails to compute posterior samples #163

Open
camposandro opened this issue Sep 26, 2023 · 0 comments
Open

NUTS sampler fails to compute posterior samples #163

camposandro opened this issue Sep 26, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@camposandro
Copy link
Collaborator

Running unit tests for the posteriors generator (#162), NUTS often fails to compute posterior samples.

src/superphot_plus/samplers/numpyro_sampler.py:63: in run_single_curve
    eq_wt_samples = run_mcmc(
src/superphot_plus/samplers/numpyro_sampler.py:422: in run_mcmc
    mcmc.run(
../../anaconda3/envs/superphot-env/lib/python3.10/site-packages/numpyro/infer/mcmc.py:628: in run
    states_flat, last_state = partial_map_fn(map_args)
../../anaconda3/envs/superphot-env/lib/python3.10/site-packages/numpyro/infer/mcmc.py:410: in _single_chain_mcmc
    new_init_state = self.sampler.init(
../../anaconda3/envs/superphot-env/lib/python3.10/site-packages/numpyro/infer/hmc.py:713: in init
    init_params = self._init_state(
../../anaconda3/envs/superphot-env/lib/python3.10/site-packages/numpyro/infer/hmc.py:657: in _init_state
    ) = initialize_model(
...
>               raise RuntimeError(
                    "Cannot find valid initial parameters. Please check your model again."
                )
E               RuntimeError: Cannot find valid initial parameters. Please check your model again.

../../anaconda3/envs/superphot-env/lib/python3.10/site-packages/numpyro/infer/util.py:747: RuntimeError

This behavior was observed for both ZTF and LSST light curves, examples of which are:

@camposandro camposandro added the bug Something isn't working label Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant