We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 05be948 commit efe4a44Copy full SHA for efe4a44
adaptive/runner.py
@@ -18,7 +18,13 @@
18
19
import loky
20
21
-from adaptive import BalancingLearner, BaseLearner, IntegratorLearner, SequenceLearner
+from adaptive import (
22
+ BalancingLearner,
23
+ BaseLearner,
24
+ DataSaver,
25
+ IntegratorLearner,
26
+ SequenceLearner,
27
+)
28
from adaptive.notebook_integration import in_ipynb, live_info, live_plot
29
30
try:
@@ -955,6 +961,8 @@ def auto_goal(
955
961
return lambda learner: learner.npoints >= goal
956
962
if isinstance(goal, (timedelta, datetime)):
957
963
return _TimeGoal(goal)
964
+ if isinstance(learner, DataSaver):
965
+ return auto_goal(goal, learner.learner, allow_running_forever)
958
966
if goal is None:
959
967
if isinstance(learner, SequenceLearner):
960
968
return SequenceLearner.done
0 commit comments