@@ -16,8 +16,7 @@ def notebook_extension(*, _inline_js=True):
1616 """Enable ipywidgets, holoviews, and asyncio notebook integration."""
1717 if not in_ipynb ():
1818 raise RuntimeError (
19- '"adaptive.notebook_extension()" may only be run '
20- "from a Jupyter notebook."
19+ '"adaptive.notebook_extension()" may only be run from a Jupyter notebook.'
2120 )
2221
2322 global _holoviews_enabled , _ipywidgets_enabled
@@ -116,8 +115,7 @@ def live_plot(runner, *, plotter=None, update_interval=2, name=None, normalize=T
116115 """
117116 if not _holoviews_enabled :
118117 raise RuntimeError (
119- "Live plotting is not enabled; did you run "
120- "'adaptive.notebook_extension()'?"
118+ "Live plotting is not enabled; did you run 'adaptive.notebook_extension()'?"
121119 )
122120
123121 import holoviews as hv
@@ -202,8 +200,7 @@ def live_info(runner, *, update_interval=0.5):
202200 """
203201 if not _holoviews_enabled :
204202 raise RuntimeError (
205- "Live plotting is not enabled; did you run "
206- "'adaptive.notebook_extension()'?"
203+ "Live plotting is not enabled; did you run 'adaptive.notebook_extension()'?"
207204 )
208205
209206 import ipywidgets
@@ -268,7 +265,7 @@ def _info_html(runner):
268265 info .append (("# of samples" , runner .learner .nsamples ))
269266
270267 with suppress (Exception ):
271- info .append (("latest loss" , f' { runner .learner ._cache [" loss" ]:.3f} ' ))
268+ info .append (("latest loss" , f" { runner .learner ._cache [' loss' ]:.3f} " ))
272269
273270 table = "\n " .join (_table_row (i , k , v ) for i , (k , v ) in enumerate (info ))
274271
0 commit comments