抑制模块日志记录

问题描述 投票:0回答:0

我正在使用 umap-learn 模块(pip install umap-learn)。我正在使用

import umap
导入模块。每次我调用该库的
transform()
方法时,以下信息都会记录到控制台:

Batches: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00,  1.96it/s]

我已经尝试添加

logging.getLogger("umap").disabled = True
但它不起作用。

如何禁止将此模块记录到控制台?

python logging python-module python-logging
© www.soinside.com 2019 - 2024. All rights reserved.