瀏覽代碼

W&B: Don't log models in evolve operation (#4611)

modifyDataloader
Ayush Chaurasia GitHub 3 年之前
父節點
當前提交
11e7c7b48d
沒有發現已知的金鑰在資料庫的簽署中 GPG Key ID: 4AEE18F83AFDEB23
共有 2 個文件被更改,包括 9 次插入5 次删除
  1. +8
    -4
      utils/loggers/__init__.py
  2. +1
    -1
      utils/loggers/wandb/wandb_utils.py

+ 8
- 4
utils/loggers/__init__.py 查看文件

@@ -138,7 +138,11 @@ class Loggers():
if self.wandb:
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
wandb.log_artifact(str(best if best.exists() else last), type='model',
name='run_' + self.wandb.wandb_run.id + '_model',
aliases=['latest', 'best', 'stripped'])
self.wandb.finish_run()
if not self.opt.evolve:
wandb.log_artifact(str(best if best.exists() else last), type='model',
name='run_' + self.wandb.wandb_run.id + '_model',
aliases=['latest', 'best', 'stripped'])
self.wandb.finish_run()
else:
self.wandb.finish_run()
self.wandb = WandbLogger(self.opt)

+ 1
- 1
utils/loggers/wandb/wandb_utils.py 查看文件

@@ -112,7 +112,7 @@ class WandbLogger():
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
- Upload dataset if opt.upload_dataset is True

Loading…
取消
儲存