It is better to move away from print and use instead logging.log. This allows for much easier dealing with logging to different devices and different levels of verbosity
[x] Replace print with logging.log with proper logging levels, e.g. print(f'{X.shape = }') -> logging.info(f'{X.shape = }') or logging.level(20, f'{X.shape = }')
[x] Log to file and terminal
[x] Log important information to telegram (Alessandro knows how)
It is better to move away from
print
and use insteadlogging.log
. This allows for much easier dealing with logging to different devices and different levels of verbosityprint
withlogging.log
with proper logging levels, e.g.print(f'{X.shape = }')
->logging.info(f'{X.shape = }')
orlogging.level(20, f'{X.shape = }')