@@ -17,8 +17,7 @@ def notebook_extension(*, _inline_js=True):
17
17
"""Enable ipywidgets, holoviews, and asyncio notebook integration."""
18
18
if not in_ipynb ():
19
19
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.'
22
21
)
23
22
24
23
global _async_enabled , _holoviews_enabled , _ipywidgets_enabled
@@ -122,8 +121,7 @@ def live_plot(runner, *, plotter=None, update_interval=2, name=None, normalize=T
122
121
"""
123
122
if not _holoviews_enabled :
124
123
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()'?"
127
125
)
128
126
129
127
import holoviews as hv
@@ -208,8 +206,7 @@ def live_info(runner, *, update_interval=0.5):
208
206
"""
209
207
if not _holoviews_enabled :
210
208
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()'?"
213
210
)
214
211
215
212
import ipywidgets
@@ -274,7 +271,7 @@ def _info_html(runner):
274
271
info .append (("# of samples" , runner .learner .nsamples ))
275
272
276
273
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} " ))
278
275
279
276
table = "\n " .join (_table_row (i , k , v ) for i , (k , v ) in enumerate (info ))
280
277
0 commit comments