Quellcode durchsuchen

another fix for mpi execution

Dimitri Korsch vor 4 Jahren
Ursprung
Commit
385e7b4b83
1 geänderte Dateien mit 6 neuen und 3 gelöschten Zeilen
  1. 6 3
      cvfinetune/finetuner/mpi.py

+ 6 - 3
cvfinetune/finetuner/mpi.py

@@ -67,7 +67,10 @@ class MPIFinetuner(DefaultFinetuner):
 				self.evaluator, self.comm)
 
 	def run(self, trainer_cls, opts, *args, **kwargs):
-		kwargs["no_observe"] = not self.mpi_main_process
-		opts.no_snapshot = not self.mpi_main_process
-		opts.no_progress = opts.no_progress or not self.mpi_main_process
+		if not self.mpi_main_process:
+			kwargs["no_observe"] = True
+			opts.no_snapshot = True
+			opts.no_progress = True
+			self.evaluator._progress_bar = False
+
 		super(MPIFinetuner, self).run(trainer_cls, opts, *args, **kwargs)