Add --noplots flag to suppress figures and images logging (#7534)
* support nomedia * support nomedia for validation * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update train.py * Revert no plot evolve evolve plots do not contain any images * Revert plot_results contains no media * Update wandb_utils.py * sync-bn cleanup * Cleanup * Rename nomedia -> noplots Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
3 files changed
+7
-6
No files matched your search
@@ -99,11 +99,11 @@ class Loggers():
|
||||
if self.wandb:
|
||||
self.wandb.log({"Labels": [wandb.Image(str(x), caption=x.name) for x in paths]})
|
||||
|
||||
def on_train_batch_end(self, ni, model, imgs, targets, paths, plots, sync_bn):
|
||||
def on_train_batch_end(self, ni, model, imgs, targets, paths, plots):
|
||||
# Callback runs on train batch end
|
||||
if plots:
|
||||
if ni == 0:
|
||||
if not sync_bn: # tb.add_graph() --sync known issue https://github.com/ultralytics/yolov5/issues/3754
|
||||
if not self.opt.sync_bn: # --sync known issue https://github.com/ultralytics/yolov5/issues/3754
|
||||
with warnings.catch_warnings():
|
||||
warnings.simplefilter('ignore') # suppress jit trace warning
|
||||
self.tb.add_graph(torch.jit.trace(de_parallel(model), imgs[0:1], strict=False), [])
|
||||
|
||||
@@ -250,8 +250,8 @@ class WandbLogger():
|
||||
self.map_val_table_path()
|
||||
if opt.bbox_interval == -1:
|
||||
self.bbox_interval = opt.bbox_interval = (opt.epochs // 10) if opt.epochs > 10 else 1
|
||||
if opt.evolve:
|
||||
self.bbox_interval = opt.bbox_interval = opt.epochs + 1
|
||||
if opt.evolve or opt.noplots:
|
||||
self.bbox_interval = opt.bbox_interval = opt.epochs + 1 # disable bbox_interval
|
||||
train_from_artifact = self.train_artifact_path is not None and self.val_artifact_path is not None
|
||||
# Update the the data_dict to point to local artifacts dir
|
||||
if train_from_artifact:
|
||||
|
||||
Reference in new issue
Block a user