Comments (2)
I took a look at this function to see what we would need to "mock" to be able to turn this function into an expression graph.
One question is how we get the data into a graph, instead of a literal. The data comes from a RNG. We can pass in a custom RNG that we fake it into thinking is a numpy RNG subclass.
So that can work. But then the core flow of the algorithm is a loop with checking each iteration if we are done or not.
We cannot override this control flow and turn it into a graph. jax has the same issue, that it cannot process things like if statements if they are based on dynamic data.
So it seems like to make this library useful in passing into SciPy, we would need a way to process control flow.
Numba does this already.
If we take a step back, what we are doing is having to translate between statement blocks and an expression graph. This seems to be explored in the compiler community as translating between control flow graphs and value state dependence graphs:
cc @rgommers who brought up this original question.
from metadsl.
So it seems like to make this library useful in passing into SciPy, we would need a way to process control flow.
I think this particular problem is mostly specific to scipy.optimize
. Pretty much all optimizers and root finders have this kind of tolerance-based termination of iteration. Most of the rest of SciPy does not.
The issue you'll encounter more is probably functions implemented in compiled code or calling compiled code expecting real numpy arrays under the hood.
from metadsl.
Related Issues (20)
- Refactor internals to use own type representation
- Fix doctests
- Fix Python 3.9-3.10 errors
- Host viewer as jupyter widget
- Fix serializing parameterized typs
- Add backend that compiles to NumPy to show E2E system that is a no-op
- Tony Notes
- Compare with `typy` HOT 2
- Blog post comparing to NumPy Mixin HOT 1
- Generic Constructors HOT 8
- updating metadsl docs - roadmap/vision
- Seperate replacements into steps
- Generate metadsl from linked data
- Create interface to REDUCE
- images HOT 6
- Refactor internals to use own type representation HOT 1
- EPython notes
- Remove uarray tags HOT 1
- TypeError: Cannot match concrete type <class '__main__.Number'> with hint <class 'int'> HOT 7
- Integrate with MLIR 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 metadsl.