Rich utils
Rich utils to print config tree.
enforce_tags(cfg, save_to_file=False)
#
Prompts user to input tags from command line if no tags are provided in config.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
cfg
|
DictConfig
|
A DictConfig composed by Hydra. |
required |
save_to_file
|
bool
|
Whether to export tags to the hydra output folder. Default is |
False
|
Source code in src/utils/rich_utils.py
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
|
print_config_tree(cfg, print_order=('data', 'model', 'callbacks', 'logger', 'trainer', 'paths', 'extras'), resolve=False, save_to_file=False)
#
Prints the contents of a DictConfig as a tree structure using the Rich library.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
cfg
|
DictConfig
|
A DictConfig composed by Hydra. |
required |
print_order
|
Sequence[str]
|
Determines in what order config components are printed. Default is ``("data", "model", |
('data', 'model', 'callbacks', 'logger', 'trainer', 'paths', 'extras')
|
resolve
|
bool
|
Whether to resolve reference fields of DictConfig. Default is |
False
|
save_to_file
|
bool
|
Whether to export config to the hydra output folder. Default is |
False
|
Source code in src/utils/rich_utils.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
|