Document exceptions in loggers (#6171)

* Document exceptions in loggers

* minor formatting

* docstring changed in comet.py

* Apply suggestions from code review

Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
This commit is contained in:
Kunal Mundada 2021-02-26 01:38:32 +05:30 committed by GitHub
parent 3df02b880a
commit 4d96f19493
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 23 additions and 0 deletions

View File

@ -115,6 +115,12 @@ class CometLogger(LightningLoggerBase):
prefix: A string to put at the beginning of metric keys.
\**kwargs: Additional arguments like `workspace`, `log_code`, etc. used by
:class:`CometExperiment` can be passed as keyword arguments in this logger.
Raises:
ImportError:
If required Comet package is not installed on the device.
MisconfigurationException:
If neither ``api_key`` nor ``save_dir`` are passed as arguments.
"""
LOGGER_JOIN_CHAR = '-'

View File

@ -79,6 +79,9 @@ class MLFlowLogger(LightningLoggerBase):
Has no effect if `tracking_uri` is provided.
prefix: A string to put at the beginning of metric keys.
Raises:
ImportError:
If required MLFlow package is not installed on the device.
"""
LOGGER_JOIN_CHAR = '-'

View File

@ -171,6 +171,10 @@ class NeptuneLogger(LightningLoggerBase):
prefix: A string to put at the beginning of metric keys.
\**kwargs: Additional arguments like `params`, `tags`, `properties`, etc. used by
:func:`neptune.Session.create_experiment` can be passed as keyword arguments in this logger.
Raises:
ImportError:
If required Neptune package is not installed on the device.
"""
LOGGER_JOIN_CHAR = '-'

View File

@ -74,6 +74,10 @@ class TestTubeLogger(LightningLoggerBase):
the user has defined the `self.example_input_array` attribute in their
model.
prefix: A string to put at the beginning of metric keys.
Raises:
ImportError:
If required TestTube package is not installed on the device.
"""
__test__ = False

View File

@ -61,6 +61,12 @@ class WandbLogger(LightningLoggerBase):
\**kwargs: Additional arguments like `entity`, `group`, `tags`, etc. used by
:func:`wandb.init` can be passed as keyword arguments in this logger.
Raises:
ImportError:
If required WandB package is not installed on the device.
MisconfigurationException:
If both ``log_model`` and ``offline``is set to ``True``.
Example::
from pytorch_lightning.loggers import WandbLogger