iTranslated by AI

The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
😘

Disabling Progress Bars in huggingface/datasets

に公開

When I was using huggingface/datasets, it was annoying that a progress bar was displayed every time I shuffled the dataset.

I tried tweaking things like datasets.utils.logging.set_verbosity(), but the progress bar still remained.

Ultimately, I found the following Issue and was able to handle it.

https://github.com/huggingface/datasets/issues/2651

from datasets.utils import disable_progress_bar
disable_progress_bar()

However, when I actually tried using this, a warning appeared stating that it would be deprecated in the next version.

Therefore, as mentioned in the issue, it is better to write it as follows now:

from datasets.utils import set_progress_bar_enabled
set_progress_bar_enabled(False)

Discussion