Returns a status string for the current state of the engine.
(self)
| 344 | return stats |
| 345 | |
| 346 | def status(self) -> str: |
| 347 | """Returns a status string for the current state of the engine.""" |
| 348 | stats = copy.deepcopy(self.status_dict) |
| 349 | |
| 350 | msgs = [stats.pop(StatusMembers.STATUS.value), "Iters: " + str(stats.pop(StatusMembers.ITERS.value, 0))] |
| 351 | |
| 352 | for key, val in stats.items(): |
| 353 | if isinstance(val, float): |
| 354 | msg = self.status_format.format(key, val) |
| 355 | else: |
| 356 | msg = f"{key}: {val}" |
| 357 | |
| 358 | msgs.append(msg) |
| 359 | |
| 360 | return ", ".join(msgs) |
| 361 | |
| 362 | def plot_status(self, logger: Any, plot_func: Callable = plot_engine_status) -> plt.Figure | None: |
| 363 | """ |