def convert_configs_to_dicts(config: Any) -> Any:
    """Convert all ConfigBase objects to dictionaries."""
    if isinstance(config, ConfigBase):
        return config.dict()
    if isinstance(config, dict):
        return {k: convert_configs_to_dicts(v) for k, v in config.items()}
    if isinstance(config, list):
        return [convert_configs_to_dicts(v) for v in config]
    return config
Convert all ConfigBase objects to dictionaries.
olive/common/config_utils.py