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

Weights & Biases (W&B) Feature Addition #1235

Merged
merged 18 commits into from
Oct 31, 2020
Merged
Changes from 1 commit
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
9 changes: 5 additions & 4 deletions train.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ def train(hyp, opt, device, tb_writer=None, wandb=None):
scheduler = lr_scheduler.LambdaLR(optimizer, lr_lambda=lf)
# plot_lr_scheduler(optimizer, scheduler, epochs)

# Logging
if wandb and wandb.run is None:
id = ckpt.get('wandb_id') if 'ckpt' in locals() else None
wandb_run = wandb.init(config=opt, resume="allow", project=log_dir, id=id)

glenn-jocher marked this conversation as resolved.
Show resolved Hide resolved
# Resume
start_epoch, best_fitness = 0, 0.0
if pretrained:
Expand All @@ -141,10 +146,6 @@ def train(hyp, opt, device, tb_writer=None, wandb=None):
(weights, ckpt['epoch'], epochs))
epochs += ckpt['epoch'] # finetune additional epochs

# Logging
if wandb and wandb.run is None:
wandb_run = wandb.init(config=opt, resume="allow", project=log_dir, id=ckpt.get('wandb_id'))

del ckpt, state_dict

# Image sizes
Expand Down