@@ -16,8 +16,7 @@ def notebook_extension(*, _inline_js=True):
16
16
"""Enable ipywidgets, holoviews, and asyncio notebook integration."""
17
17
if not in_ipynb ():
18
18
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.'
21
20
)
22
21
23
22
global _holoviews_enabled , _ipywidgets_enabled
@@ -116,8 +115,7 @@ def live_plot(runner, *, plotter=None, update_interval=2, name=None, normalize=T
116
115
"""
117
116
if not _holoviews_enabled :
118
117
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()'?"
121
119
)
122
120
123
121
import holoviews as hv
@@ -202,8 +200,7 @@ def live_info(runner, *, update_interval=0.5):
202
200
"""
203
201
if not _holoviews_enabled :
204
202
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()'?"
207
204
)
208
205
209
206
import ipywidgets
@@ -268,7 +265,7 @@ def _info_html(runner):
268
265
info .append (("# of samples" , runner .learner .nsamples ))
269
266
270
267
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} " ))
272
269
273
270
table = "\n " .join (_table_row (i , k , v ) for i , (k , v ) in enumerate (info ))
274
271
0 commit comments