Ayush Chaurasia
commited on
Fix: evolve with wandb (#2634)
Browse files
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'])
|