Fast transformers import part 1
# What does this PR do?

This PR is the first step for a fast `import transformers`. It changes all the test for `is_xxx_available` to avoid importing `xxx` and makes sure all integrations are only imported when needed (apart from comet ml which needs to be imported first).

The second test will be a bit more complex, to avoid importing torch and tf unless necessary, and will touch all inits like in [this repo](https://github.com/sgugger/lazy_init).
PR looks very clean! I'm no real import expert, so I'll leave it up to @LysandreJik  and @sgugger :-) But I'm very much welcoming this change. I think it's even cleaner that the libraries are no public attributes even more<|||||>re-based this into the deepspeed branch, and all was good until I tried:
```
from .integrations import is_deepspeed_available
```
inside `training_args.py`, and got:
```
Traceback (most recent call last):
  File "./finetune_trainer.py", line 23, in <module>
    from transformers import (
  File "/mnt/nvme1/code/huggingface/transformers-deepspeed/src/transformers/__init__.py", line 2092, in __getattr__
    return super().__getattr__(name)
  File "/mnt/nvme1/code/huggingface/transformers-deepspeed/src/transformers/file_utils.py", line 1452, in __getattr__
    module = self._get_module(self._class_to_module[name])
  File "/mnt/nvme1/code/huggingface/transformers-deepspeed/src/transformers/__init__.py", line 2086, in _get_module
    return importlib.import_module("." + module_name, self.__name__)
  File "/home/stas/anaconda3/envs/main-38/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/mnt/nvme1/code/huggingface/transformers-deepspeed/src/transformers/trainer_seq2seq.py", line 24, in <module>
    from .trainer import Trainer
  File "/mnt/nvme1/code/huggingface/transformers-deepspeed/src/transformers/trainer.py", line 32, in <module>
    from .integrations import (  # isort: split
  File "/mnt/nvme1/code/huggingface/transformers-deepspeed/src/transformers/integrations.py", line 55, in <module>
    from .trainer_callback import TrainerCallback  # noqa: E402
  File "/mnt/nvme1/code/huggingface/transformers-deepspeed/src/transformers/trainer_callback.py", line 28, in <module>
    from .training_args import TrainingArguments
  File "/mnt/nvme1/code/huggingface/transformers-deepspeed/src/transformers/training_args.py", line 24, in <module>
    from .integrations import is_deepspeed_available
ImportError: cannot import name 'is_deepspeed_available' from partially initialized module 'transformers.integrations' (most likely due to a circular import) (/mnt/nvme1/code/huggingface/transformers-deepspeed/src/transformers/integrations.py)
```

I fixed that by moving the import to the middle of the file where I needed it.<|||||>When I run `from transformers import DistilBertTokenizerFast ` I see imports of tensorflow and tensorboard, so what was the purpose of this PR? I only need a tokenizer, not asking for bloatware that every model in transformers uses.
transformers-4.14.1<|||||>Thanks for raising the issue @evrial, this patch https://github.com/huggingface/transformers/pull/14855 will be released in v4.15 sometime this week.

Please open a new issue with the issue you're facing next time so that we may get to it faster.<|||||>> Thanks for raising the issue @evrial, this patch #14855 will be released in v4.15 sometime this week.
> 
> Please open a new issue with the issue you're facing next time so that we may get to it faster.

Thanks! God bless and merry Christmas!