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

Entity can be specified when logging to wandb. #510

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
3 changes: 2 additions & 1 deletion basicsr/utils/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ def init_wandb_logger(opt):
import wandb
logger = get_root_logger()

entity = opt['logger']['wandb'].get('entity', None)
project = opt['logger']['wandb']['project']
resume_id = opt['logger']['wandb'].get('resume_id')
if resume_id:
Expand All @@ -138,7 +139,7 @@ def init_wandb_logger(opt):
wandb_id = wandb.util.generate_id()
resume = 'never'

wandb.init(id=wandb_id, resume=resume, name=opt['name'], config=opt, project=project, sync_tensorboard=True)
wandb.init(id=wandb_id, resume=resume, name=opt['name'], config=opt, entity=entity, project=project, sync_tensorboard=True)

logger.info(f'Use wandb logger with id={wandb_id}; project={project}.')

Expand Down