Must manually import `comet_ml` before `CometLogger` to avoid import error
🐛 Bug
A few weeks ago, a refactoring of logger imports changed the ordering of imports for the CometLogger. However, comet requires for comet_ml to be imported before some other dependencies, i.e. torch and tensorboard, to work properly. If not, you get the following error:
ImportError: You must import Comet before these modules: torch, tensorboard

Before the imports reordering, comet's import requirements could be met by importing CometLogger before torch and tensorboard. However, since the refactoring, torch is now imported before comet in loggers/comet.py itself. This forces users to manually add an unused import for comet_ml before importing CometLogger to avoid the above ImportError.
To Reproduce
This BoringModel example reproduces the ImportError.
Expected behavior
Users should not have to manually import comet_ml before CometLogger to avoid triggering the ImportError. The comet_ml import inside loggers/comet.py should exceptionally come before the torch import, even if it violates usual import ordering.