Reputation: 425
I am trying to suppress the output of the "extract_features" and "select_features" classes from the tsfresh library, because the output slows down my jupyter notebooks. Unfortunately, the classes don't contain any arguments for suppressing all output.
I tried to use %%capture but that just suppresses notebook output, but not the output from the classes and I didn't manage to find print statements within the classes in the .py files associated with the library.
Any help is very much appreciated!
Upvotes: 1
Views: 453
Reputation: 425
In case anyone is having a similar issue, here is the solution that worked for me:
import logging
logger = logging.getLogger()
logger.setLevel(logging.CRITICAL)
Upvotes: 3
Reputation: 36608
It looks like those messages are generated from the logging
module. You can try to redirect them to a file by importing logging
and setting an output path.
import logging
logging.basicConfig(filename='tslog.log')
Upvotes: 1