Comments (5)
originally posted by Joseph Weston (@jbweston) at 2018-07-13T11:16:03.002Z on GitLab
More details please
from adaptive.
originally posted by Jorn Hoofwijk (@jorn) at 2018-07-13T11:30:09.676Z on GitLab
I told him to report this, however, here is an actual example:
import numpy as np
import adaptive
adaptive.notebook_extension()
def f(x):
return x
learner = adaptive.IntegratorLearner(f, (0,1), tol=1e-8)
runner = adaptive.Runner(learner, lambda l: l.done()) # runs perfect
runner.live_info()
learner1 = adaptive.IntegratorLearner(f, (0,1), tol=1e-8)
learner2 = adaptive.IntegratorLearner(f, (0,1), tol=1e-8)
balancer = adaptive.BalancingLearner([learner1, learner2])
runner = adaptive.Runner(balancer, lambda l: l.loss() < 0.1) # fails
runner = adaptive.Runner(balancer, lambda l: l.done()) # fails
runner = adaptive.Runner(balancer, lambda bl: all(l.done() for l in bl.learners)) # fails
runner.live_info()
especially the last one, i don't know why it fails yet
from adaptive.
originally posted by Jorn Hoofwijk (@jorn) at 2018-07-13T11:33:02.163Z on GitLab
got it:
Traceback (most recent call last):
File "test5.py", line 14, in <module>
runner = adaptive.BlockingRunner(balancer, lambda l: l.loss() < 0.1) # fails
File "/home/jorn/natk/bep/adaptive/adaptive/runner.py", line 152, in __init__
self._run()
File "/home/jorn/natk/bep/adaptive/adaptive/runner.py", line 175, in _run
points, _ = self.learner.ask(n_new_tasks)
File "/home/jorn/natk/bep/adaptive/adaptive/learner/balancing_learner.py", line 89, in ask
return self._ask_and_tell(n)
File "/home/jorn/natk/bep/adaptive/adaptive/learner/balancing_learner.py", line 73, in _ask_and_tell
n=1, add_data=False)
TypeError: ask() got an unexpected keyword argument 'add_data'
from adaptive.
originally posted by Bas Nijholt (@basnijholt) at 2018-07-18T18:20:14.013Z on GitLab
Thanks for reporting, I've added some code to raise a NotImplementedError
when add_data=False
in the IntegratorLearner
here: https://gitlab.kwant-project.org/qt/adaptive/commit/8640b8d58006b634e278709fd185a6ed2d05bfcb.
This doesn't fix the issue but at least makes it clear as to why it happens.
from adaptive.
originally posted by Jorn Hoofwijk (@jorn) at 2018-09-25T11:47:55.034Z on GitLab
we could do it similarly as with the LearnerND: add a with restore(self)
to allow not adding the data.
Also this would be solved if we would switch to a new BalancingLearner: !113
from adaptive.
Related Issues (20)
- make triangulation tests stronger with more randomness HOT 1
- learner tests fail HOT 2
- use a ItemSortedDict for the loss in the LearnerND
- divide by zero warnings in LearnerND
- Issues that can potentially be closed
- Improvements to plotting of the LearnerND
- Learner.load does not raise an exception if the provided filename was not found HOT 5
- Specify an API for defining the scale of point
- (LearnerND) use direct neighbours in loss
- (LearnerND) add advanced usage example HOT 1
- Document and test loss function signatures HOT 4
- Balancing learner does not work with Integrator learner HOT 5
- make triangulation tests stronger with more randomness HOT 1
- learner tests fail HOT 4
- deprecate Learner2D HOT 3
- use a ItemSortedDict for the loss in the LearnerND
- suggested points lie outside of domain HOT 2
- use a ItemSortedDict for the loss in the LearnerND
- Specify an API for defining the scale of point
- Runners should tell learner about remaining points at end of run HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from adaptive.