... | ... |
@@ -123,7 +123,7 @@ |
123 | 123 |
"metadata": {}, |
124 | 124 |
"outputs": [], |
125 | 125 |
"source": [ |
126 |
- "adaptive.live_plot(runner)" |
|
126 |
+ "runner.live_plot()" |
|
127 | 127 |
] |
128 | 128 |
}, |
129 | 129 |
{ |
... | ... |
@@ -196,7 +196,8 @@ |
196 | 196 |
"metadata": {}, |
197 | 197 |
"outputs": [], |
198 | 198 |
"source": [ |
199 |
- "runner = adaptive.Runner(learner, goal=lambda l: l.loss() < 0.01)" |
|
199 |
+ "runner = adaptive.Runner(learner, goal=lambda l: l.loss() < 0.01)\n", |
|
200 |
+ "runner.live_info()" |
|
200 | 201 |
] |
201 | 202 |
}, |
202 | 203 |
{ |
... | ... |
@@ -211,7 +212,7 @@ |
211 | 212 |
" opts = dict(plot=dict(title_format=title))\n", |
212 | 213 |
" return plot.Image + plot.EdgePaths.I.clone().opts(**opts) + plot\n", |
213 | 214 |
"\n", |
214 |
- "adaptive.live_plot(runner, plotter=plot, update_interval=1)" |
|
215 |
+ "runner.live_plot(plotter=plot, update_interval=0.2)" |
|
215 | 216 |
] |
216 | 217 |
}, |
217 | 218 |
{ |
... | ... |
@@ -272,7 +273,16 @@ |
272 | 273 |
"source": [ |
273 | 274 |
"learner = adaptive.AverageLearner(g, atol=None, rtol=0.01)\n", |
274 | 275 |
"runner = adaptive.Runner(learner, goal=lambda l: l.loss() < 1)\n", |
275 |
- "adaptive.live_plot(runner)" |
|
276 |
+ "runner.live_info()" |
|
277 |
+ ] |
|
278 |
+ }, |
|
279 |
+ { |
|
280 |
+ "cell_type": "code", |
|
281 |
+ "execution_count": null, |
|
282 |
+ "metadata": {}, |
|
283 |
+ "outputs": [], |
|
284 |
+ "source": [ |
|
285 |
+ "runner.live_plot()" |
|
276 | 286 |
] |
277 | 287 |
}, |
278 | 288 |
{ |
... | ... |
@@ -336,7 +346,8 @@ |
336 | 346 |
"source": [ |
337 | 347 |
"from adaptive.runner import SequentialExecutor\n", |
338 | 348 |
"learner = adaptive.IntegratorLearner(f24, bounds=(0, 3), tol=1e-10)\n", |
339 |
- "runner = adaptive.Runner(learner, executor=SequentialExecutor(), goal=lambda l: l.done())" |
|
349 |
+ "runner = adaptive.Runner(learner, executor=SequentialExecutor(), goal=lambda l: l.done())\n", |
|
350 |
+ "runner.live_info()" |
|
340 | 351 |
] |
341 | 352 |
}, |
342 | 353 |
{ |
... | ... |
@@ -410,7 +421,7 @@ |
410 | 421 |
"from adaptive.runner import SequentialExecutor\n", |
411 | 422 |
"\n", |
412 | 423 |
"learner = adaptive.Learner1D(f_levels, bounds=(-1, 1))\n", |
413 |
- "runner = adaptive.Runner(learner, SequentialExecutor(), goal=lambda l: l.loss() < 0.05)" |
|
424 |
+ "runner = adaptive.Runner(learner, executor=SequentialExecutor(), goal=lambda l: l.loss() < 0.05)" |
|
414 | 425 |
] |
415 | 426 |
}, |
416 | 427 |
{ |
... | ... |
@@ -426,7 +437,7 @@ |
426 | 437 |
"metadata": {}, |
427 | 438 |
"outputs": [], |
428 | 439 |
"source": [ |
429 |
- "adaptive.live_plot(runner)" |
|
440 |
+ "runner.live_plot()" |
|
430 | 441 |
] |
431 | 442 |
}, |
432 | 443 |
{ |
... | ... |
@@ -469,7 +480,7 @@ |
469 | 480 |
"outputs": [], |
470 | 481 |
"source": [ |
471 | 482 |
"plotter = lambda learner: hv.Overlay([L.plot() for L in learner.learners])\n", |
472 |
- "adaptive.live_plot(runner, plotter=plotter)" |
|
483 |
+ "runner.live_plot(plotter=plotter)" |
|
473 | 484 |
] |
474 | 485 |
}, |
475 | 486 |
{ |
... | ... |
@@ -547,7 +558,7 @@ |
547 | 558 |
"outputs": [], |
548 | 559 |
"source": [ |
549 | 560 |
"learner.plot = _learner.plot\n", |
550 |
- "adaptive.live_plot(runner)" |
|
561 |
+ "runner.live_plot()" |
|
551 | 562 |
] |
552 | 563 |
}, |
553 | 564 |
{ |
... | ... |
@@ -608,7 +619,7 @@ |
608 | 619 |
"\n", |
609 | 620 |
"learner = adaptive.Learner1D(f, bounds=(-1, 1))\n", |
610 | 621 |
"runner = adaptive.Runner(learner, executor=executor, goal=lambda l: l.loss() < 0.1)\n", |
611 |
- "adaptive.live_plot(runner)" |
|
622 |
+ "runner.live_plot()" |
|
612 | 623 |
] |
613 | 624 |
}, |
614 | 625 |
{ |
... | ... |
@@ -632,7 +643,7 @@ |
632 | 643 |
"\n", |
633 | 644 |
"learner = adaptive.Learner1D(f, bounds=(-1, 1))\n", |
634 | 645 |
"runner = adaptive.Runner(learner, executor=client, goal=lambda l: l.loss() < 0.1)\n", |
635 |
- "adaptive.live_plot(runner)" |
|
646 |
+ "runner.live_plot()" |
|
636 | 647 |
] |
637 | 648 |
}, |
638 | 649 |
{ |
... | ... |
@@ -673,7 +684,7 @@ |
673 | 684 |
"source": [ |
674 | 685 |
"learner = adaptive.Learner1D(f, bounds=(-1, 1))\n", |
675 | 686 |
"runner = adaptive.Runner(learner)\n", |
676 |
- "adaptive.live_plot(runner)" |
|
687 |
+ "runner.live_plot()" |
|
677 | 688 |
] |
678 | 689 |
}, |
679 | 690 |
{ |
... | ... |
@@ -718,7 +729,7 @@ |
718 | 729 |
" \n", |
719 | 730 |
"learner = adaptive.Learner1D(will_raise, (-1, 1))\n", |
720 | 731 |
"runner = adaptive.Runner(learner) # without 'goal' the runner will run forever unless cancelled\n", |
721 |
- "adaptive.live_plot(runner)" |
|
732 |
+ "runner.live_plot()" |
|
722 | 733 |
] |
723 | 734 |
}, |
724 | 735 |
{ |
... | ... |
@@ -778,7 +789,7 @@ |
778 | 789 |
"learner = adaptive.Learner1D(f, bounds=(-1, 1))\n", |
779 | 790 |
"runner = adaptive.Runner(learner, goal=lambda l: l.loss() < 0.1,\n", |
780 | 791 |
" log=True)\n", |
781 |
- "adaptive.live_plot(runner)" |
|
792 |
+ "runner.live_plot()" |
|
782 | 793 |
] |
783 | 794 |
}, |
784 | 795 |
{ |