Logging
Logging submodule.
The methods are responsible for the in-console logger.
ProgressBar
Keras style progress bar.
Adapted from https://github.com/yueyericardo/pkbar.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
max_value
|
Optional[int]
|
Maximum progress bar value, by default None. |
None
|
epoch
|
Optional[int]
|
Zero-indexed current epoch, by default None. |
None
|
num_epochs
|
Optional[int]
|
Total number of epochs, by default None. |
None
|
stateful_metrics
|
Optional[list]
|
Iterable of string names of metrics that should not be averaged over time. Metrics in this list will be displayed as-is. All others will be averaged by the progress bar before display, by default None. |
None
|
always_stateful
|
bool
|
|
False
|
mode
|
str
|
Mode, one of "train", "val", or "predict", by default "train". |
'train'
|
add(n, values=None)
spinning_cursor()
Generate a spinning cursor animation.
Taken from https://github.com/manrajgrover/py-spinners/tree/master.
Returns:
| Type | Description |
|---|---|
Generator
|
Generator of animation frames. |
get_logger(name, log_level=logging.INFO, log_path=None)
Create a python logger instance with configured handlers.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Name of the logger. |
required |
log_level
|
int
|
Log level (info, error etc.), by default logging.INFO. |
INFO
|
log_path
|
Optional[Union[str, Path]]
|
Path in which to save the log, by default None. |
None
|
Returns:
| Type | Description |
|---|---|
Logger
|
Logger. |