added loggers

This commit is contained in:
William Falcon
2020-01-16 17:35:02 -05:00
parent f82def41f2
commit 438708c33d
3 changed files with 38 additions and 7 deletions
+1 -1
View File
@@ -93,7 +93,7 @@ class NeptuneLogger(LightningLoggerBase):
trainer = Trainer(max_epochs=10, logger=neptune_logger)
Args:
api_key (str|None): Required in online mode. Neputne API token, found on https://neptune.ml.
api_key (str | None): Required in online mode. Neputne API token, found on https://neptune.ml.
Read how to get your API key https://docs.neptune.ml/python-api/tutorials/get-started.html#copy-api-token.
project_name (str): Required in online mode. Qualified name of a project in a form of
"namespace/project_name" for example "tom/minst-classification".
+10 -6
View File
@@ -11,12 +11,15 @@ from .base import LightningLoggerBase, rank_zero_only
class TensorBoardLogger(LightningLoggerBase):
r"""Log to local file system in TensorBoard format
r"""
Log to local file system in TensorBoard format
Implemented using :class:`torch.utils.tensorboard.SummaryWriter`. Logs are saved to
`os.path.join(save_dir, name, version)`
:example:
Example
--------
.. code-block:: python
@@ -24,11 +27,12 @@ class TensorBoardLogger(LightningLoggerBase):
trainer = Trainer(logger=logger)
trainer.train(model)
:param str save_dir: Save directory
:param str name: Experiment name. Defaults to "default".
:param int version: Experiment version. If version is not specified the logger inspects the save
Args:
save_dir (str): Save directory
name (str): Experiment name. Defaults to "default".
version (int): Experiment version. If version is not specified the logger inspects the save
directory for existing versions, then automatically assigns the next available version.
:param \**kwargs: Other arguments are passed directly to the :class:`SummaryWriter` constructor.
\**kwargs (dict): Other arguments are passed directly to the :class:`SummaryWriter` constructor.
"""
NAME_CSV_TAGS = 'meta_tags.csv'
+27
View File
@@ -38,6 +38,33 @@ from .base import LightningLoggerBase, rank_zero_only
class TestTubeLogger(LightningLoggerBase):
r"""
Log to local file system in TensorBoard format but using a nicer folder structure.
Implemented using :class:`torch.utils.tensorboard.SummaryWriter`. Logs are saved to
`os.path.join(save_dir, name, version)`
Example
--------
.. code-block:: python
logger = TestTubeLogger("tt_logs", name="my_exp_name")
trainer = Trainer(logger=logger)
trainer.train(model)
Args:
save_dir (str): Save directory
name (str): Experiment name. Defaults to "default".
description (str): A short snippet about this experiment
debug (bool): If True, it doesn't log anything
version (int): Experiment version. If version is not specified the logger inspects the save
directory for existing versions, then automatically assigns the next available version.
create_git_tag (bool): If True creates a git tag to save the code used in this experiment
"""
__test__ = False
def __init__(