extract_hparams#

composer.utils.extract_hparams(locals_dict)[source]#

Takes in local symbol table and recursively grabs any hyperparameter.

Parameters

locals_dict (dict[str, Any]) โ€“ The local symbol table returned when calling locals(), which maps any free local variablesโ€™ names to their values.

Returns

dict[str, Any] โ€“ A nested dictionary with every element of locals_dict mapped to its value or to another sub_dict.