Skip to content

Commit

Permalink
Added Wandb entity attribute (#783)
Browse files Browse the repository at this point in the history
  • Loading branch information
calclavia committed Feb 6, 2020
1 parent 5035ce5 commit 57074b3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pytorch_lightning/loggers/wandb.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class WandbLogger(LightningLoggerBase):
"""

def __init__(self, name=None, save_dir=None, offline=False, id=None, anonymous=False,
version=None, project=None, tags=None, experiment=None):
version=None, project=None, tags=None, experiment=None, entity=None):
super().__init__()
self._name = name
self._save_dir = save_dir
Expand All @@ -43,6 +43,7 @@ def __init__(self, name=None, save_dir=None, offline=False, id=None, anonymous=F
self._project = project
self._experiment = experiment
self._offline = offline
self._entity = entity

def __getstate__(self):
state = self.__dict__.copy()
Expand All @@ -68,7 +69,7 @@ def experiment(self):
os.environ["WANDB_MODE"] = "dryrun"
self._experiment = wandb.init(
name=self._name, dir=self._save_dir, project=self._project, anonymous=self._anonymous,
id=self._id, resume="allow", tags=self._tags)
id=self._id, resume="allow", tags=self._tags, entity=self._entity)
return self._experiment

def watch(self, model, log="gradients", log_freq=100):
Expand Down

0 comments on commit 57074b3

Please sign in to comment.