quantlab.core.component.recorded_configs#
- quantlab.core.component.recorded_configs(configs)[source]#
Write each component
configsnames, byid, as the config recorded for it.Inside the block,
get_config()of any component writes a component found in a declared field whoseidis a key ofconfigsas that config, at every depth. The components themselves are not changed.- Parameters:
- configsMapping[int, dict]
id(component)to the config to write for it.
Examples
>>> dataset = label.config.factor.config.dataset >>> with recorded_configs({id(dataset): {"name": "x"}}): ... label.get_config()["factor"]["dataset"] {'name': 'x'}