Skip to content
Advertisement

disable logging for specific lines of code

I am tuning the word2vec model hyper-parameters. Word2Vec has to many log in console that I cannot read Optuna or my custom log. Is there any trick to suppress logs generated by Word2Vec?

Advertisement

Answer

I used following code in python 3.7 in python 3.6 we have send logging.ERROR to disable function.

import logging

logging.disable()
#your code
logging.disable(logging.DEBUG)
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement