configs
🗿
Configuration for FaceSim3D project.
Note: store private configs in the same folder as config.toml
, namely: ./[PRIVATE_PREFIX]_configs.toml
Author: Simon M. Hofmann | [firstname].[lastname]@cbs.mpg.de | 2022
Classes:
Name | Description |
---|---|
CONFIG |
Configuration object. |
Functions:
Name | Description |
---|---|
update_logger_configs |
Update logger name and filename. |
CONFIG
🗿
CONFIG(config_dict: dict | None = None)
Configuration object.
Initialise CONFIG class object.
Methods:
Name | Description |
---|---|
asdict |
Convert the config object to dict. |
show |
Display the nested configuration information. |
update |
Update the config object with new entries. |
update_paths |
Update relative paths to PROJECT_ROOT dir. |
Source code in code/facesim3d/configs.py
41 42 43 44 |
|
asdict
🗿
asdict()
Convert the config object to dict.
Source code in code/facesim3d/configs.py
88 89 90 91 92 93 94 95 96 |
|
show
🗿
show(indent: int = 0)
Display the nested configuration information.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
indent
|
int
|
The number of tabs to use for indentation (default: 0) |
0
|
Returns:
Type | Description |
---|---|
None |
Source code in code/facesim3d/configs.py
73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
|
update
🗿
Update the config object with new entries.
Source code in code/facesim3d/configs.py
65 66 67 68 69 70 71 |
|
update_paths
🗿
Update relative paths to PROJECT_ROOT dir.
Source code in code/facesim3d/configs.py
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
|
update_logger_configs
🗿
update_logger_configs(
new_logger_name: str,
new_logger_filename: str | Path,
logger: Logger,
) -> Logger
Update logger name and filename.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
new_logger_name
|
str
|
new logger name |
required |
new_logger_filename
|
str | Path
|
new logger filename |
required |
logger
|
Logger
|
updated logger object |
required |
Source code in code/facesim3d/configs.py
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 |
|