set auto dp if no backend

This commit is contained in:
William Falcon
2020-01-16 17:36:05 -05:00
parent 438708c33d
commit c3d3c47554
+10 -24
View File
@@ -1,27 +1,3 @@
"""
Log using `W&B <https://www.wandb.com>`_
.. code-block:: python
>>> from pytorch_lightning.logging import WandbLogger
>>> from pytorch_lightning import Trainer
>>> wandb_logger = WandbLogger()
>>> trainer = Trainer(logger=wandb_logger)
Use the logger anywhere in you LightningModule as follows:
.. code-block:: python
def train_step(...):
# example
self.logger.experiment.whatever_wandb_supports(...)
def any_lightning_module_function_or_hook(...):
self.logger.experiment.whatever_wandb_supports(...)
"""
import os
try:
@@ -44,6 +20,16 @@ class WandbLogger(LightningLoggerBase):
anonymous (bool): enables or explicitly disables anonymous logging.
project (str): the name of the project to which this run will belong.
tags (list of str): tags associated with this run.
Example
--------
.. code-block:: python
from pytorch_lightning.logging import WandbLogger
from pytorch_lightning import Trainer
wandb_logger = WandbLogger()
trainer = Trainer(logger=wandb_logger)
"""
def __init__(self, name=None, save_dir=None, offline=False, id=None, anonymous=False,