glenn-jocher commited on
Commit
412b113
1 Parent(s): 4250f84

W&B logging bug fix (#1399)

Browse files
Files changed (1) hide show
  1. test.py +1 -1
test.py CHANGED
@@ -221,7 +221,7 @@ def test(data,
221
  nt = torch.zeros(1)
222
 
223
  # W&B logging
224
- if plots and wandb:
225
  wandb.log({"Images": wandb_images})
226
  wandb.log({"Validation": [wandb.Image(str(x), caption=x.name) for x in sorted(save_dir.glob('test*.jpg'))]})
227
 
 
221
  nt = torch.zeros(1)
222
 
223
  # W&B logging
224
+ if plots and wandb and wandb.run:
225
  wandb.log({"Images": wandb_images})
226
  wandb.log({"Validation": [wandb.Image(str(x), caption=x.name) for x in sorted(save_dir.glob('test*.jpg'))]})
227