Skip to content

NUTS sampler fails to compute posterior samples #163

Description

@camposandro

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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions