Fix crash when having no eval dataset and not using the viewer (#1537)

Fixed crash when no eval imgs on wandb/tensorboard
This commit is contained in:
Sacha Lewin authored and GitHub committed 2023-03-01 15:02:41 -08:00
1 parent 7366456835
commit 6912e7cde9
1 file changed
+3 -1
+3 -1
View File
@@ -238,7 +238,9 @@ class Trainer:
writer.put_dict(name="Train Loss Dict", scalar_dict=loss_dict, step=step)
writer.put_dict(name="Train Metrics Dict", scalar_dict=metrics_dict, step=step)
self.eval_iteration(step)
# Do not perform evaluation if there are no validation images
if self.pipeline.datamanager.eval_dataset:
self.eval_iteration(step)
if step_check(step, self.config.steps_per_save):
self.save_checkpoint(step)