Usage Tracking

The configuration system can keep track of every key that is accessed via config.get and save the retrieved value to a nested dict that can be accessed by calling config.get_usage.

The value saved is the value of the configuration key after all expressions are resolved, but before object instantiation has occurred. This creates a representation of the configuration state that can be used to recreate the configuration for a future run.

Usage tracking is off by default. It can be enabled by calling config.track_usage (which will also clear any existing tracked configuration). Because it records exactly which values a run actually used, it is a convenient way to capture a reproducible snapshot of a configuration—for example, to store alongside a run’s output or in its metadata.