Catch exceptions when optional dependencies are missing (#442)

This commit is contained in:
Nic Eggert 2019-10-30 11:03:52 -05:00 committed by William Falcon
parent 37647d835a
commit 4df4d4cc03
1 changed files with 3 additions and 3 deletions

View File

@ -3,16 +3,16 @@ from .base import LightningLoggerBase, rank_zero_only
try:
from .test_tube_logger import TestTubeLogger
except ModuleNotFoundError:
except ImportError:
pass
try:
from .mlflow_logger import MLFlowLogger
except ModuleNotFoundError:
except ImportError:
pass
try:
# needed to prevent ImportError and duplicated logs.
environ["COMET_DISABLE_AUTO_LOGGING"] = "1"
from .comet_logger import CometLogger
except ModuleNotFoundError:
except ImportError:
del environ["COMET_DISABLE_AUTO_LOGGING"]