MCPcopy Create free account
hub / github.com/Project-MONAI/MONAI / plot_status

Method plot_status

monai/utils/jupyter_utils.py:362–372  ·  view source on GitHub ↗

Generate a plot of the current status of the contained engine whose loss and metrics were tracked by `logger`. The function `plot_func` must accept arguments `title`, `engine`, `logger`, and `fig` which are the plot title, `self.engine`, `logger`, and `self.fig` respectively

(self, logger: Any, plot_func: Callable = plot_engine_status)

Source from the content-addressed store, hash-verified

360 return ", ".join(msgs)
361
362 def plot_status(self, logger: Any, plot_func: Callable = plot_engine_status) -> plt.Figure | None:
363 """
364 Generate a plot of the current status of the contained engine whose loss and metrics were tracked by `logger`.
365 The function `plot_func` must accept arguments `title`, `engine`, `logger`, and `fig` which are the plot title,
366 `self.engine`, `logger`, and `self.fig` respectively. The return value must be a figure object (stored in
367 `self.fig`) and a list of Axes objects for the plots in the figure. Only the figure is returned by this method,
368 which holds the internal lock during the plot generation.
369 """
370 with self.lock:
371 self.fig, _ = plot_func(title=self.status(), engine=self.engine, logger=logger, fig=self.fig)
372 return self.fig

Callers 1

test_plotMethod · 0.95

Calls 1

statusMethod · 0.95

Tested by 1

test_plotMethod · 0.76