@@ -17,8 +17,7 @@ def notebook_extension(*, _inline_js=True):
1717 """Enable ipywidgets, holoviews, and asyncio notebook integration."""
1818 if not in_ipynb ():
1919 raise RuntimeError (
20- '"adaptive.notebook_extension()" may only be run '
21- "from a Jupyter notebook."
20+ '"adaptive.notebook_extension()" may only be run from a Jupyter notebook.'
2221 )
2322
2423 global _async_enabled , _holoviews_enabled , _ipywidgets_enabled
@@ -122,8 +121,7 @@ def live_plot(runner, *, plotter=None, update_interval=2, name=None, normalize=T
122121 """
123122 if not _holoviews_enabled :
124123 raise RuntimeError (
125- "Live plotting is not enabled; did you run "
126- "'adaptive.notebook_extension()'?"
124+ "Live plotting is not enabled; did you run 'adaptive.notebook_extension()'?"
127125 )
128126
129127 import holoviews as hv
@@ -208,8 +206,7 @@ def live_info(runner, *, update_interval=0.5):
208206 """
209207 if not _holoviews_enabled :
210208 raise RuntimeError (
211- "Live plotting is not enabled; did you run "
212- "'adaptive.notebook_extension()'?"
209+ "Live plotting is not enabled; did you run 'adaptive.notebook_extension()'?"
213210 )
214211
215212 import ipywidgets
@@ -274,7 +271,7 @@ def _info_html(runner):
274271 info .append (("# of samples" , runner .learner .nsamples ))
275272
276273 with suppress (Exception ):
277- info .append (("latest loss" , f' { runner .learner ._cache [" loss" ]:.3f} ' ))
274+ info .append (("latest loss" , f" { runner .learner ._cache [' loss' ]:.3f} " ))
278275
279276 table = "\n " .join (_table_row (i , k , v ) for i , (k , v ) in enumerate (info ))
280277
0 commit comments