Disable warning messages

How do I disable Dask warnings that are printed to the terminal? For example, I see the following message in the terminal when I run my Dask project:

distributed.utils_perf - WARNING - full garbage collections took 10% CPU time recently

The project works fine and I don’t see any problems with the results generated from the code. Therefore, I would like to disable the warning messages so they don’t clutter up my terminal window.

Hi @wigging, you should be able to configure the logging level using the Dask config system.

So in your case, you can open your ~/.config/dask/distributed.yaml and add:

  distributed: error

to increase the log level to only show errors.

Is this in the Dask docs? I don’t see anything about configuring the logging level.

I linked to it in my response

I used this and it seems to disable the warning messages. Thank you for the help.

import dask
dask.config.set({'logging.distributed': 'error'})