Skip to content

add keywords for setting up dynesty and nautilus#389

Open
wangbingjie wants to merge 3 commits into
bd-j:mainfrom
wangbingjie:bw-sampler
Open

add keywords for setting up dynesty and nautilus#389
wangbingjie wants to merge 3 commits into
bd-j:mainfrom
wangbingjie:bw-sampler

Conversation

@wangbingjie
Copy link
Copy Markdown
Contributor

Previously, only nlive and neff could be passed to the samplers. This update provides a quick fix that allows most of the keywords accepted by dynesty and nautilus to be passed through to the corresponding samplers.

@bd-j
Copy link
Copy Markdown
Owner

bd-j commented Jan 6, 2026

Hi @wangbingjie, thanks for this. My understanding from #348 was that the parameter inspection was supposed to automatically pass any sampling keywords that are present in run_params and known to the chosen sampling algorithm, is that wrong? That said, these would need to be added to the parser given by prospect_args.py for use in the command line.

@wangbingjie
Copy link
Copy Markdown
Contributor Author

hum... I tried passing n_like_max to nautilus (to limit the max likelihood calls for debugging; api here) but that does not seem to do anything... my code snippet is

run_params['nested_sampler'] = 'nautilus'
run_params['n_like_max'] = 2000

output = fit_model( obs, model, sps, **run_params)

perhaps I did something dumb?

@elijahmathews
Copy link
Copy Markdown
Contributor

It looks to me like the unit test failures above are due to NumPy 2.0 compatibility issues, which should be fixed now with #388 merged (#388 added NumPy 2.0 compatibility, while #390 formally removes support for NumPy 1.x). Rebasing to main should result in the unit tests passing!

@bd-j
Copy link
Copy Markdown
Owner

bd-j commented Feb 2, 2026

This looks like an issue with how the inspection is used to get sampler keywords. I think I can put a fix together that will be a bit more general.

@bd-j bd-j mentioned this pull request Feb 2, 2026
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