Skip to content

suggested points lie outside of domain

This happens because of some numerical precision issues.

import adaptive

adaptive.notebook_extension()
def f(xy):
    import random
    import time
    time.sleep(4 + random.random()/10)
    return random.randint(1, 10)
learner = adaptive.Learner2D(
    f,
    bounds=[
        (0.16, 0.2),
        (0.6, 2.4)
        ]
)

runner = adaptive.Runner(learner, goal=lambda l: l.npoints > 1000, ntasks=10, log=True)

runner.live_info()

Will fail after ~20 points.