@@ -195,10 +195,11 @@ def plot_engine_status(
195195 for src in (engine .state .batch , engine .state .output ):
196196 if isinstance (src , dict ):
197197 for k , v in src .items ():
198- images = image_fn (k , v )
198+ if isinstance (v , torch .Tensor ):
199+ images = image_fn (k , v )
199200
200- for i , im in enumerate (images ):
201- imagemap [f"{ k } _{ i } " ] = im
201+ for i , im in enumerate (images ):
202+ imagemap [f"{ k } _{ i } " ] = im
202203 else :
203204 label = "Batch" if src is engine .state .batch else "Output"
204205 images = image_fn (label , src )
@@ -311,7 +312,7 @@ def _update_status(self):
311312 def status_dict (self ) -> Dict [str , str ]:
312313 """A dictionary containing status information, current loss, and current metric values."""
313314 with self .lock :
314- stats = {StatusMembers .STATUS .value : "Running" if self .is_alive else "Stopped" }
315+ stats = {StatusMembers .STATUS .value : "Running" if self .is_alive () else "Stopped" }
315316 stats .update (self ._status_dict )
316317 return stats
317318
@@ -320,7 +321,14 @@ def status(self) -> str:
320321 stats = self .status_dict
321322
322323 msgs = [stats .pop (StatusMembers .STATUS .value ), "Iters: " + str (stats .pop (StatusMembers .ITERS .value ))]
323- msgs += [self .status_format .format (key , val ) for key , val in stats .items ()]
324+
325+ for key , val in stats .items ():
326+ if isinstance (val , float ):
327+ msg = self .status_format .format (key , val )
328+ else :
329+ msg = f"{ key } : { val } "
330+
331+ msgs .append (msg )
324332
325333 return ", " .join (msgs )
326334
0 commit comments