diff --git a/adaptive/notebook_integration.py b/adaptive/notebook_integration.py index 87f3c34a1e34593d6109099a42c4e44c04960579..856ca7b2157bb03c4514b29a138dc8ddc0a34669 100644 --- a/adaptive/notebook_integration.py +++ b/adaptive/notebook_integration.py @@ -174,6 +174,9 @@ def _info_html(runner): with suppress(Exception): info.append(('# of points', runner.learner.npoints)) + with suppress(Exception): + info.append(('latest loss', f'{runner.learner._cache["loss"]:.3f}')) + template = '<dt>{}</dt><dd>{}</dd>' table = '\n'.join(template.format(k, v) for k, v in info)