mirror of
https://github.com/ultralytics/yolov5.git
synced 2025-06-03 14:49:29 +08:00
W&B: Don't log models in evolve operation (#4611)
This commit is contained in:
parent
3a72d4a7e3
commit
11e7c7b48d
@ -138,7 +138,11 @@ class Loggers():
|
|||||||
if self.wandb:
|
if self.wandb:
|
||||||
self.wandb.log({"Results": [wandb.Image(str(f), caption=f.name) for f in files]})
|
self.wandb.log({"Results": [wandb.Image(str(f), caption=f.name) for f in files]})
|
||||||
# Calling wandb.log. TODO: Refactor this into WandbLogger.log_model
|
# Calling wandb.log. TODO: Refactor this into WandbLogger.log_model
|
||||||
|
if not self.opt.evolve:
|
||||||
wandb.log_artifact(str(best if best.exists() else last), type='model',
|
wandb.log_artifact(str(best if best.exists() else last), type='model',
|
||||||
name='run_' + self.wandb.wandb_run.id + '_model',
|
name='run_' + self.wandb.wandb_run.id + '_model',
|
||||||
aliases=['latest', 'best', 'stripped'])
|
aliases=['latest', 'best', 'stripped'])
|
||||||
self.wandb.finish_run()
|
self.wandb.finish_run()
|
||||||
|
else:
|
||||||
|
self.wandb.finish_run()
|
||||||
|
self.wandb = WandbLogger(self.opt)
|
||||||
|
@ -112,7 +112,7 @@ class WandbLogger():
|
|||||||
https://docs.wandb.com/guides/integrations/yolov5
|
https://docs.wandb.com/guides/integrations/yolov5
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, opt, run_id, job_type='Training'):
|
def __init__(self, opt, run_id=None, job_type='Training'):
|
||||||
"""
|
"""
|
||||||
- Initialize WandbLogger instance
|
- Initialize WandbLogger instance
|
||||||
- Upload dataset if opt.upload_dataset is True
|
- Upload dataset if opt.upload_dataset is True
|
||||||
|
Loading…
x
Reference in New Issue
Block a user