run test_balancing_learner for all strategies#218
Open
basnijholt wants to merge 1 commit intomainfrom
Open
Conversation
Member
Author
|
Something broke in between these two commits to However, when I reverse the exact changes from ca8b1d5 in that state of the repo, it is still broken. So seemingly it is not the code inside the |
Member
Author
|
#!/usr/bin/env python3
import sys
from functools import partial
import adaptive
f = lambda x: x[0]
learner = adaptive.BalancingLearner(
[adaptive.LearnerND(f, bounds=[(-1, 1), (-1, 1)])], strategy="loss"
)
try: # fails in master
adaptive.runner.simple(learner, goal=lambda l: l.learners[0].npoints > 20)
except:
sys.exit(1)
sys.exit(0)using the power of |
Contributor
|
We should probably add the test, but we can probably wait until #220 is merged, because that will replace LearnerND anyway. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

@python-adaptive/core this reveals a regression in the
LearnerND.Should we merge this already (without a fix)?
also: @JornHoofwijk