Coder Social home page Coder Social logo

No recent release about pyadjoint HOT 7 CLOSED

dolfin-adjoint avatar dolfin-adjoint commented on August 27, 2024
No recent release

from pyadjoint.

Comments (7)

DiffeoInvariant avatar DiffeoInvariant commented on August 27, 2024 1

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.

(CC @gbruer15 @jedbrown)

from pyadjoint.

DiffeoInvariant avatar DiffeoInvariant commented on August 27, 2024 1

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:

  1. 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
  2. To use JAX or TensorFlow inside of a FEniCS PDE, right now you need to use crikit.assemble_with_cr() instead of fenics_adjoint.assemble(), and you need a pyadjoint_utils.SNESSolver to solve the equation (instead of a fenics_adjoint.NonlinearVariationalSolver ). I would personally like to get something more like @nbouziani 's ExternalOperator class working so we can use the fenics_adjoint solvers to solve variational problems with the normal assemble() for assembly.

Some things from pyadjoint_utils that are (IMO) ready to upstream with minimal changes:

  1. ReducedFunction (like ReducedFunctional, but the output might not be an AdjFloat, just some generic OverloadedType).
  2. Jacobian matrix computing functions (Tape.evaluate_tlm_matrix() and Block.evaluate_tlm_matrix_component())

from pyadjoint.

sebastkm avatar sebastkm commented on August 27, 2024 1

@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.

sebastkm avatar sebastkm commented on August 27, 2024

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.

sebastkm avatar sebastkm commented on August 27, 2024

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.

nbouziani avatar nbouziani commented on August 27, 2024

@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.

DiffeoInvariant avatar DiffeoInvariant commented on August 27, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.