peal.global_utils.propagate_seed¶
- peal.global_utils.propagate_seed(config)[source]¶
Copy the top-level seed into every nested config that has one.
Walks all attributes, list entries and dict values of
configand sets theirseedattribute toconfig.seed, so that a single seed in the top-level config governs data, generator, predictor and explainer alike. Does nothing when the top-level config has no seed or it isNone, and silently skips attributes that refuse assignment.- Parameters:
config (
object) – Config tree, modified in place.