Improve how sampling seed is handled
This MR aims to standardize how the sampling seed is handled for the different samplers. This is motivated by bilby_pipe#240 (closed).
Proposed change
Check if a sampler supports setting a random seed (sampling_seed_key
) and, if so, translate the seed to the correct keyword argument. Rather than add the "translation" to each sampler individually I've opted to change _translate_kwargs
in the base sampler class and have each child class call the parent method.
bilby_pipe
In bilby_pipe
we can check if a sampler supports a sampling seed (sampling_seed_key
is not None) and add the correct key if one of the equivalent keys isn't already set.
To-do
-
Check if documentation needs updating -
Test alongside changes to bilby_pipe
to address bilby_pipe#240 (closed)
(This MR is identical to !1122 (closed) but the diff should be fixed so it is easier to review).
Merge request reports
Activity
added Sampling label
mentioned in merge request !1122 (closed)
Results shown in bilby_pipe!459 (merged) verify that the fix works.
added 9 commits
-
81c16852...c761682e - 8 commits from branch
lscsoft:master
- 8e0c4048 - Merge branch 'master' of git.ligo.org:michael.williams/bilby into improve-sampling-seed-fixed
-
81c16852...c761682e - 8 commits from branch
mentioned in commit 374d810f
changed milestone to %1.2.1