How to use the ultranest.ReactiveNestedSampler function in ultranest

To help you get started, we’ve selected a few ultranest examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github threeML / threeML / threeML / bayesian / ultranest_sampler.py View on Github external
# We need to check if the MCMC
        # chains will have a place on
        # the disk to write and if not,
        # create one

        chain_name = self._kwargs.pop("chain_name")

        if threeML_config["parallel"]["use-parallel"]:

            raise RuntimeError(
                "If you want to run ultranest in parallell you need to use an ad-hoc method"
            )

        else:

            sampler = ultranest.ReactiveNestedSampler(
                param_names,
                loglike,
                transform=ultranest_prior,
                log_dir=chain_name,
                vectorized=False,
                resume=self._resume,
                wrapped_params=self._wrapped_params,
            )

            sampler.run(show_status=loud, **self._kwargs)

        process_fit = False

        if using_mpi:

            # if we are running in parallel and this is not the

ultranest

Fit and compare complex models reliably and rapidly. Advanced Nested Sampling.

GPL-3.0
Latest version published 2 months ago

Package Health Score

76 / 100
Full package analysis

Similar packages