mlos_bench.dict_templater module¶
Simple class to help with nested dictionary $var templating.
- class mlos_bench.dict_templater.DictTemplater(source_dict: Dict[str, Any])¶
Bases:
object
Simple class to help with nested dictionary $var templating.
Methods
expand_vars
(*[, extra_source_dict, use_os_env])Expand the template variables in the destination dictionary.
- expand_vars(*, extra_source_dict: Dict[str, Any] | None = None, use_os_env: bool = False) Dict[str, Any] ¶
Expand the template variables in the destination dictionary.
- Parameters:
- extra_source_dictDict[str, Any]
An optional extra source dictionary to use for expansion.
- use_os_envbool
Whether to use the os environment variables a final fallback for expansion.
- Returns:
- Dict[str, Any]
The expanded dictionary.
- Raises:
- ValueError on unsupported nested types.