From 3e56870a992d912504b731cfc94e80fe772c6807 Mon Sep 17 00:00:00 2001 From: Bas Nijholt <basnijholt@gmail.com> Date: Mon, 8 Oct 2018 13:16:54 +0200 Subject: [PATCH] display the loss with 'live_info' --- adaptive/notebook_integration.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/adaptive/notebook_integration.py b/adaptive/notebook_integration.py index 87f3c34a..856ca7b2 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) -- GitLab