fix wandb/comet problems
As discussed in https://github.com/huggingface/transformers/issues/7821

* handle the case where `comet_ml` is installed but not configured
* fix error in wandb code:
```
>               combined_dict = {**model.config.to_dict(), **combined_dict}
E               AttributeError: 'NoneType' object has no attribute 'to_dict'
```

Fixes: #7821

@sgugger 
Thanks for this! W're working on a refactor on the comet_ml SDK to move some of the complications from here over to there.<|||||>@dsblank, also while you're at it, would it be possible to mend these in both projects. Getting these w/ py38 in the test suite. Thank you!

```
/home/stas/anaconda3/envs/main-38/lib/python3.8/site-packages/comet_ml/utils.py:30
  /home/stas/anaconda3/envs/main-38/lib/python3.8/site-packages/comet_ml/utils.py:30: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.9 it will stop working
    from collections import Mapping, defaultdict

/home/stas/anaconda3/envs/main-38/lib/python3.8/site-packages/comet_ml/monkey_patching.py:19
  /home/stas/anaconda3/envs/main-38/lib/python3.8/site-packages/comet_ml/monkey_patching.py:19: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
    import imp

/home/stas/anaconda3/envs/main-38/lib/python3.8/site-packages/wandb/util.py:35
  /home/stas/anaconda3/envs/main-38/lib/python3.8/site-packages/wandb/util.py:35: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.9 it will stop working
    from collections import namedtuple, Mapping, Sequence

/home/stas/anaconda3/envs/main-38/lib/python3.8/site-packages/wandb/vendor/graphql-core-1.1/graphql/type/directives.py:55
  /home/stas/anaconda3/envs/main-38/lib/python3.8/site-packages/wandb/vendor/graphql-core-1.1/graphql/type/directives.py:55: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.9 it will stop working
    assert isinstance(locations, collections.Iterable), 'Must provide locations for directive.'
```<|||||>@stas00 Sure, I'll take a look. I know some of these are caused by our support of Python 2.7, but perhaps there is a way to hide those.<|||||>Much appreciated, @dsblank!