convert_nested_dict_to_flat_dict#

composer.utils.convert_nested_dict_to_flat_dict(nested_dict, prefix='')[source]#

Takes in a nested dict converts it to a flat dict with keys separated by slashes.

Parameters
  • nested_dict (dict) โ€“ A dictionary containing at least one other dictionary.

  • prefix (str, optional) โ€“ A prefix to left append to the keys in the dictionary. โ€˜Defaults to โ€˜โ€™.

Returns

dict โ€“ A flat dictionary representation of the nested one (contains no other dictionaries inside of it)