Skip to content

Commit 57074b3

Browse files
authored
Added Wandb entity attribute (#783)
1 parent 5035ce5 commit 57074b3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pytorch_lightning/loggers/wandb.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class WandbLogger(LightningLoggerBase):
3333
"""
3434

3535
def __init__(self, name=None, save_dir=None, offline=False, id=None, anonymous=False,
36-
version=None, project=None, tags=None, experiment=None):
36+
version=None, project=None, tags=None, experiment=None, entity=None):
3737
super().__init__()
3838
self._name = name
3939
self._save_dir = save_dir
@@ -43,6 +43,7 @@ def __init__(self, name=None, save_dir=None, offline=False, id=None, anonymous=F
4343
self._project = project
4444
self._experiment = experiment
4545
self._offline = offline
46+
self._entity = entity
4647

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

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

0 commit comments

Comments
 (0)