bilby_pipe issueshttps://git.ligo.org/lscsoft/bilby_pipe/-/issues2024-03-27T14:32:37Zhttps://git.ligo.org/lscsoft/bilby_pipe/-/issues/299Add API docs2024-03-27T14:32:37ZColm Talbotcolm.talbot@ligo.orgAdd API docsI noticed that we don't have auto-generated API docs. It would be good to add this, especially as we start adding features like asimov integration and thinking about plugins.I noticed that we don't have auto-generated API docs. It would be good to add this, especially as we start adding features like asimov integration and thinking about plugins.https://git.ligo.org/lscsoft/bilby_pipe/-/issues/288Confusing sampler kwargs behaviour2023-10-30T16:59:55ZMichael Williamsmichael.williams@ligo.orgConfusing sampler kwargs behaviourThe behaviour of `sampler_kwargs` came up recently in the asimov review (tagging @daniel-williams, @patricia-schmidt), particularly in relation to which defaults are used for different values of `sampler_kwargs`. It also came up before i...The behaviour of `sampler_kwargs` came up recently in the asimov review (tagging @daniel-williams, @patricia-schmidt), particularly in relation to which defaults are used for different values of `sampler_kwargs`. It also came up before in https://git.ligo.org/lscsoft/bilby_pipe/-/issues/269
Taking `dynesty` as an example, it is my understanding that [the code](https://git.ligo.org/lscsoft/bilby_pipe/-/blob/master/bilby_pipe/input.py#L1440) behaves as follows
1. If `sampler_kwargs=None`, then the kwargs are set to `dict()` and it therefore falls back to the `bilby` defaults.
2. If `sampler_kwargs={'nlive': 50}` , then the `DynestyDefault` dictionary (defined [here](https://git.ligo.org/lscsoft/bilby_pipe/-/blob/master/bilby_pipe/utils.py#L220)) from `bilby_pipe` is used and the kwargs will be set to the equivalent of : `SAMPLER_SETTINGS['DynestyDefault'].update({'nlive': 50})` .
3. If `sampler_kwargs='DynestyDefault',` then the `DynestyDefault` dictionary will be used directly.
I think it's the first option (1) that leads to confusion, because if a user does not specify anything they will get the `bilby` defaults but then if they want to update a setting, e.g. increasing `nlive`, other settings will change based on the defaults in `DynestyDefault`.
If I haven't misunderstood the code, is this behaviour intentional? If not, what do we think the correct behaviour should be? I am happy to implement a fix myself, but thought we should discuss it first.