gnn_tracking.utils.dictionaries#
Attributes#
Functions#
|
Return a copy of the dictionary with the prefix added to all keys. |
|
Return a copy of the dictionary with the suffix added to all keys. |
|
Return a copy of the dictionary for all keys that start with prefix |
|
Expands a grid of parameters into a list of configurations. |
|
Transform list of key value pairs into dict of lists. |
|
Convert all tensors in a datastructure to floats. |
|
Module Contents#
- gnn_tracking.utils.dictionaries._P#
- gnn_tracking.utils.dictionaries.add_key_prefix(dct: dict[str, _P], prefix: str = '') dict[str, _P] #
Return a copy of the dictionary with the prefix added to all keys.
- gnn_tracking.utils.dictionaries.add_key_suffix(dct: dict[str, _P], suffix: str = '') dict[str, _P] #
Return a copy of the dictionary with the suffix added to all keys.
- gnn_tracking.utils.dictionaries.subdict_with_prefix_stripped(dct: dict[str, _P], prefix: str = '') dict[str, _P] #
Return a copy of the dictionary for all keys that start with prefix and with the prefix removed from all keys.
- gnn_tracking.utils.dictionaries.expand_grid(grid: dict[str, Sequence], fixed: dict[str, Sequence] | None = None) list[dict[str, Any]] #
Expands a grid of parameters into a list of configurations.
- gnn_tracking.utils.dictionaries.pivot_record_list(records: list[dict]) dict #
Transform list of key value pairs into dict of lists.
- gnn_tracking.utils.dictionaries.to_floats(inpt: Any) Any #
Convert all tensors in a datastructure to floats. Works on single tensors, lists, or dictionaries, nested or not.
- gnn_tracking.utils.dictionaries.separate_init_kwargs(kwargs: dict, cls: type) tuple[dict, dict] #