Enable tqdm toggling
Author: jaketae
Pull request: yes

# What does this PR do?

Fixes https://github.com/huggingface/transformers/issues/14889.


## Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/master/CONTRIBUTING.md#start-contributing-pull-requests),
      Pull Request section?
- [x] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link
      to it if that's the case.
- [ ] Did you make sure to update the documentation with your changes? Here are the
      [documentation guidelines](https://github.com/huggingface/transformers/tree/master/docs), and
      [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/master/docs#writing-source-documentation).
- [x] Did you write any new necessary tests?


## Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@stas00, @LysandreJik 

Comments:
1. In `datasets`, `tqdm_utils.py` functions are exposed at the upper level via imports in `__init__.py` ([link](https://github.com/huggingface/datasets/blob/ccc28d4141006924af85c2d940d82d71da4c6ec0/src/datasets/utils/__init__.py#L41)). It seems that this is not the case with utility functions in `transformers`. Do we want to keep functions like `transformers.utils.set_progress_bar_enabled` hidden at its current level?
2. Should toggling `set_progress_bar_enabled` affect the entire API, for instance the behavior of the `Trainer` class? This would mean replacing all occurrences of `from tqdm.auto import tqdm` with `from .utils.tqdm_utils import tqdm`. 

Thanks in advance!

> 1. In `datasets`, `tqdm_utils.py` functions are exposed at the upper level via imports in `__init__.py` ([link](https://github.com/huggingface/datasets/blob/ccc28d4141006924af85c2d940d82d71da4c6ec0/src/datasets/utils/__init__.py#L41)). It seems that this is not the case with utility functions in `transformers`. Do we want to keep functions like `transformers.utils.set_progress_bar_enabled` hidden at its current level?

I don't think there is a need for that. This will be very rarely used.

> 2. Should toggling `set_progress_bar_enabled` affect the entire API, for instance the behavior of the `Trainer` class? This would mean replacing all occurrences of `from tqdm.auto import tqdm` with `from .utils.tqdm_utils import tqdm`.

No. the turning off is advanced use, so we shouldn't turn tqdm anywhere since it has a very specific goal.

And those who don't want it can now turn it off at will.


@stas00 Thanks for the review. I've updated the test and the docs/docstrings. Let me know if there is anything else that needs to be done!

Thanks everyone for the comments! I've distilled the discussion into a to-do list, which I'll update as I go. Please let me know if anything seems missing or out of place.

- [x] Use `AutoConfig` to make the test framework-agnostic
- [x] Move the test into `test_logging.py` instead of creating a separate new file
- [x] Create `enable_progress_bar` and `disable_progress_bar`
- [x] Create an [issue](https://github.com/huggingface/datasets/issues/3586) on `datasets` side to unify API/de-deprecate `disable_progress_bar`
- [x] Move docstring to comment
- [x] Merge `tqdm_utils.py` into `logging.py`
- [x] Remove `set_progress_bar_enabled()`