Ayush Chaurasia commited on
Commit
dc51e80
·
unverified ·
1 Parent(s): 6e8c5b7

Fix: evolve with wandb (#2634)

Browse files
Files changed (1) hide show
  1. train.py +1 -1
train.py CHANGED
@@ -439,7 +439,7 @@ def train(hyp, opt, device, tb_writer=None):
439
  strip_optimizer(f) # strip optimizers
440
  if opt.bucket:
441
  os.system(f'gsutil cp {final} gs://{opt.bucket}/weights') # upload
442
- if wandb_logger.wandb: # Log the stripped model
443
  wandb_logger.wandb.log_artifact(str(final), type='model',
444
  name='run_' + wandb_logger.wandb_run.id + '_model',
445
  aliases=['last', 'best', 'stripped'])
 
439
  strip_optimizer(f) # strip optimizers
440
  if opt.bucket:
441
  os.system(f'gsutil cp {final} gs://{opt.bucket}/weights') # upload
442
+ if wandb_logger.wandb and not opt.evolve: # Log the stripped model
443
  wandb_logger.wandb.log_artifact(str(final), type='model',
444
  name='run_' + wandb_logger.wandb_run.id + '_model',
445
  aliases=['last', 'best', 'stripped'])