config_utils
sleap.gui.config_utils
¶
Functions:
| Name | Description |
|---|---|
apply_cfg_transforms_to_key_val_dict |
Transforms data from form to correct data types before converting to object. |
filter_cfg |
Filter out keys that start with underscore to get training config. |
find_backbone_name_from_key_val_dict |
Find the backbone model name from the config dictionary. |
get_backbone_from_omegaconf |
Get the backbone model name from the config. |
get_head_from_omegaconf |
Get the head model name from the config. |
get_keyval_dict_from_omegaconf |
Get a flat dictionary from an OmegaConf object. |
get_omegaconf_from_gui_form |
Get an OmegaConf object from a flat dictionary. |
get_skeleton_from_config |
Create Sleap-io Skeleton objects from config. |
resolve_strides_from_key_val_dict |
Find the valid max and output strides from the config dictionary. |
apply_cfg_transforms_to_key_val_dict(key_val_dict)
¶
Transforms data from form to correct data types before converting to object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key_val_dict
|
Flat dictionary from |
required |
Source code in sleap/gui/config_utils.py
filter_cfg(cfg)
¶
Filter out keys that start with underscore to get training config.
Source code in sleap/gui/config_utils.py
find_backbone_name_from_key_val_dict(key_val_dict)
¶
Find the backbone model name from the config dictionary.
Source code in sleap/gui/config_utils.py
get_backbone_from_omegaconf(cfg)
¶
get_head_from_omegaconf(cfg)
¶
get_keyval_dict_from_omegaconf(cfg, parent_key='', sep='.')
¶
Get a flat dictionary from an OmegaConf object.
Source code in sleap/gui/config_utils.py
get_omegaconf_from_gui_form(flat_dict)
¶
Get an OmegaConf object from a flat dictionary.
Source code in sleap/gui/config_utils.py
get_skeleton_from_config(skeleton_config)
¶
Create Sleap-io Skeleton objects from config.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
skeleton_config
|
OmegaConf
|
OmegaConf object containing the skeleton config. |
required |
Returns:
| Type | Description |
|---|---|
|
Returns a list of |
Source code in sleap/gui/config_utils.py
resolve_strides_from_key_val_dict(key_val_dict, backbone_name)
¶
Find the valid max and output strides from the config dictionary.