Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Wandb entity attribute #783

Merged
merged 1 commit into from
Feb 6, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls, write docstring and describe usage of particular parameters...

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