Comments (7)
Hi Sebastian,
Excellent, that's great to hear! From our perspective, more frequent releases of Pyadjoint on PyPI would be awesome, and would make things much easier for us.
We have been considering the possibility of maintaining our own fork of this repo, which would be more effort for us and would make it harder to upstream our development to Pyadjoint itself if/when any particular components are ready to do so as compared to using Pyadjoint/the dolfin_adjoint
/fenics_adjoint
in this repo as a dependency, but more frequent releases of Pyadjoint to PyPI would make this issue entirely moot. Thank you!
Our code is hosted at https://gitlab.com/crikit/crikit if you're curious.
from pyadjoint.
Thank you! We'll probably be releasing CRIKit to PyPI very soon now.
Yes, we definitely would like to upstream some of our changes to pyadjoint. Of the additions you've seen, are there any in particular that you'd like to see in pyadjoint? I would personally like to upstream the JAXBlock
/overload_jax
eventually, but I see several issues with that as it exists right now:
- I don't have Hessian-vector products working right now (probably could get them working without too much trouble though), just adjoint, TLM, and TLM matrix functions
- To use JAX or TensorFlow inside of a FEniCS PDE, right now you need to use
crikit.assemble_with_cr()
instead offenics_adjoint.assemble()
, and you need apyadjoint_utils.SNESSolver
to solve the equation (instead of afenics_adjoint.NonlinearVariationalSolver
). I would personally like to get something more like @nbouziani 'sExternalOperator
class working so we can use thefenics_adjoint
solvers to solve variational problems with the normalassemble()
for assembly.
Some things from pyadjoint_utils
that are (IMO) ready to upstream with minimal changes:
ReducedFunction
(likeReducedFunctional
, but the output might not be anAdjFloat
, just some genericOverloadedType
).- Jacobian matrix computing functions (
Tape.evaluate_tlm_matrix()
andBlock.evaluate_tlm_matrix_component()
)
from pyadjoint.
@DiffeoInvariant
ReducedFunction
is something that has been in different branches for a very long time, with even an open pull request https://bitbucket.org/dolfin-adjoint/pyadjoint/pull-requests/92.
I would definitely like for some ReducedFunction
implementation to be merged into master.
Having an interface for computing Jacobian matrices is also welcome.
from pyadjoint.
Hi,
CRIKit seems very interesting, I will have to check it out.
We will be making another release soon. I would hope to merge most (or all) of the current pull requests first.
But perhaps we should just make a PyPI release without them and opt for more frequent releases on PyPI.
from pyadjoint.
I've now uploaded a version 2019.1.1 to PyPI.
I also took a look at your repository and saw that you have made some additions to pyadjoint. I wonder if you think some of these would be good to merge into pyadjoint?
We are open to pull requests and also to suggestions for what we could change to make pyadjoint nicer to work with.
from pyadjoint.
@DiffeoInvariant Regarding the use of JAX or TensorFlow, this can indeed be done with ExternalOperator. External operators are annotated and they have their own blocks.
So when you call assemble
or solve
the Assemble/GenericSolveBlock
will use the ExternalOperator subclass representing your operator to compute the bit needed.
(CC @dham)
from pyadjoint.
@sebastkm Great, thanks! That PR that Toby wrote is the same ReducedFunction
he wrote for CRIKit (I didn't realize he had an open PR here), so we can get that updated and ready to go soon, hopefully in the next few weeks. We've also made some changes since that PR was submitted, so I'll review Toby's PR and either update that with our latest developments or open a new one if the latest developments are sufficiently different from the original PR
from pyadjoint.
Related Issues (20)
- "Excesive" execution time in a demo file HOT 4
- ReadTheDocs compilation is failing. HOT 1
- FunctionAssigner does not work with annotate = False HOT 1
- optimization without PDE constraint
- Inverse parameter identification fails - how to use discrete measurements? HOT 3
- Checking a computed gradient with the Taylor test HOT 1
- Taylor remainder convergence test demo on the website did not work HOT 5
- TSFC-Interface Bug? IndexError: tuple index out of range HOT 6
- Use previous solutions with a functional involving time stepping HOT 2
- Error in custom function example normalise.py (modifies input func) HOT 3
- TypeError: __init__(): incompatible constructor arguments. The following argument types are supported: HOT 1
- Increasing memory consumption during optimization when using ROL HOT 1
- Adjoint variables kept around longer than necessary
- Ipopt import error on pyadjoint:latest docker image
- No graph is built for visualization HOT 2
- RuntimeError with ROL solver HOT 1
- Support for taping non-scalar outputs: ReducedFunction HOT 1
- Typo: Overoaded -> Overloaded
- optimization problem by use IPOPTSolver,the range of guessed value is very close to the target value.
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 pyadjoint.