Skip to content

BalancingLearner of SequenceLearners does not finish calculation #213

Description

@andrenmelo

The following code fails to finish the calculation

import adaptive
adaptive.notebook_extension()

def dummy(x):
    return x

sequence = range(20)
learners = [adaptive.SequenceLearner(dummy, sequence)]
bl = adaptive.BalancingLearner(learners)
runner = adaptive.Runner(bl, lambda bl: all([l.done() for l in bl.learners]), 
                         log=True)
runner.live_info()

The error is happening in runner._get_futures(). I think something goes wrong when the runner asks for more points then there are points left in sequence.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions