Improve how sampling seed is handled
Compare changes
Maintenance will be performed on git.ligo.org, containers.ligo.org, and docs.ligo.org on Tuesday 22 April 2025 starting at approximately 9am PDT. It is expected to take around 30 minutes and there will be several periods of downtime throughout the maintenance. Please address any comments, concerns, or questions to the helpdesk. This maintenance will be upgrading the GitLab database in order to be ready for the migration.
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
bilby_pipe
to fix bilby_pipe#240 (closed)