glenn-jocher
commited on
W&B log epoch (#1946)
Browse files* W&B log epoch
* capitalize
* W&B log epoch
* capitalize
* Update train.py
New try using https://docs.wandb.ai/library/log#incremental-logging
* Update train.py
* Update test.py
* Update train.py
* Update plots.py
* Update train.py
* Update train.py
* label plot step -1
* update
* update
* update
* update
* update
* update
* Update train.py
* Update train.py
- test.py +2 -2
- train.py +1 -1
- utils/plots.py +1 -1
test.py
CHANGED
@@ -239,8 +239,8 @@ def test(data,
|
|
239 |
if plots:
|
240 |
confusion_matrix.plot(save_dir=save_dir, names=list(names.values()))
|
241 |
if wandb and wandb.run:
|
242 |
-
wandb.
|
243 |
-
wandb.log({"Validation":
|
244 |
|
245 |
# Save JSON
|
246 |
if save_json and len(jdict):
|
|
|
239 |
if plots:
|
240 |
confusion_matrix.plot(save_dir=save_dir, names=list(names.values()))
|
241 |
if wandb and wandb.run:
|
242 |
+
val_batches = [wandb.Image(str(f), caption=f.name) for f in sorted(save_dir.glob('test*.jpg'))]
|
243 |
+
wandb.log({"Images": wandb_images, "Validation": val_batches}, commit=False)
|
244 |
|
245 |
# Save JSON
|
246 |
if save_json and len(jdict):
|
train.py
CHANGED
@@ -321,7 +321,7 @@ def train(hyp, opt, device, tb_writer=None, wandb=None):
|
|
321 |
# tb_writer.add_graph(model, imgs) # add model to tensorboard
|
322 |
elif plots and ni == 10 and wandb:
|
323 |
wandb.log({"Mosaics": [wandb.Image(str(x), caption=x.name) for x in save_dir.glob('train*.jpg')
|
324 |
-
if x.exists()]})
|
325 |
|
326 |
# end batch ------------------------------------------------------------------------------------------------
|
327 |
# end epoch ----------------------------------------------------------------------------------------------------
|
|
|
321 |
# tb_writer.add_graph(model, imgs) # add model to tensorboard
|
322 |
elif plots and ni == 10 and wandb:
|
323 |
wandb.log({"Mosaics": [wandb.Image(str(x), caption=x.name) for x in save_dir.glob('train*.jpg')
|
324 |
+
if x.exists()]}, commit=False)
|
325 |
|
326 |
# end batch ------------------------------------------------------------------------------------------------
|
327 |
# end epoch ----------------------------------------------------------------------------------------------------
|
utils/plots.py
CHANGED
@@ -295,7 +295,7 @@ def plot_labels(labels, save_dir=Path(''), loggers=None):
|
|
295 |
# loggers
|
296 |
for k, v in loggers.items() or {}:
|
297 |
if k == 'wandb' and v:
|
298 |
-
v.log({"Labels": [v.Image(str(x), caption=x.name) for x in save_dir.glob('*labels*.jpg')]})
|
299 |
|
300 |
|
301 |
def plot_evolution(yaml_file='data/hyp.finetune.yaml'): # from utils.plots import *; plot_evolution()
|
|
|
295 |
# loggers
|
296 |
for k, v in loggers.items() or {}:
|
297 |
if k == 'wandb' and v:
|
298 |
+
v.log({"Labels": [v.Image(str(x), caption=x.name) for x in save_dir.glob('*labels*.jpg')]}, commit=False)
|
299 |
|
300 |
|
301 |
def plot_evolution(yaml_file='data/hyp.finetune.yaml'): # from utils.plots import *; plot_evolution()
|