mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-09-11 12:31:23 +08:00
set auto dp if no backend
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user