Code Monkey home page Code Monkey logo

Comments (9)

cscherrer avatar cscherrer commented on August 15, 2024

Sounds good! I've often hoped for a common interface for this sort of thing, especially the currently-incompatible diffeomorphism implementations that are spread across a few packages like this one.

One thing I think it's important to account for is that high-dimensional transforms are themselves often implemented in terms of iteration. So we need ways to compose these iterations "vertically" and "horizontally". I've mostly worked with TransformVariables; I'm not sure how similar or different Bijectors approach might be

from bijectors.jl.

oschulz avatar oschulz commented on August 15, 2024

I've registered FunctionChains.jl. It should, in principle, be able to replace Bijectors.Composed, though the result will obviously not be a subtype of Bijector (is that important, though?).

from bijectors.jl.

oschulz avatar oschulz commented on August 15, 2024

I could add support for FunctionChains to Bijectors, if there's interest, e.g. via bi-directioinal conversion in a package extension?

from bijectors.jl.

devmotion avatar devmotion commented on August 15, 2024

More a general question, not an actual objection at this point, but similar to the discussion in JuliaDiff/AbstractDifferentiation.jl#88 it's unclear to me if bi-directional conversions should be defined here or if only Base.convert(::Type{T}, ...) for types that Bijectors owns should be defined in a possible extension of it.

from bijectors.jl.

oschulz avatar oschulz commented on August 15, 2024

bi-directional conversions should be defined here or if only Base.convert(::Type{T}, ...) for types that Bijectors owns should be defined in a possible extension of it.

I agree, it would be nice to have a kind of convention here, to avoid "extension piracy". On the other hand, maintenance wise it would be much easier (versioning, CI, etc.) to not split and extension that "bridges" two package in respect to a specific topic, but to host the complete extension in one of them. Ideally the package maintainers would come to some agreement where to put the extensions in cases where the choice is not obvious.

If the two packages is very lightweight/abstract, I think would would technically better to host the extension in the "heavy" package. That way, one can use a non-weak depencency instead of Requires on Julia <v1.9, which will improve load times there. In this specific case here, for example, FunctionChains can be very lightweight (I'll move most of it's dependencies into extensions, and Bijectors already shares pretty much all of them already anyway). So Bijectors depending on FunctionChains on Julia <= v1.8 and using and extension on >= v1.9 seems better, load-time wise, than FunctionChains using Requires on Julia <= v1.8 (since Bijectors is much heavier) and using an extension on >= v1.9.

from bijectors.jl.

torfjelde avatar torfjelde commented on August 15, 2024

I could add support for FunctionChains to Bijectors, if there's interest, e.g. via bi-directioinal conversion in a package extension?

Shouldn't FunctionChains just "work" with Bijectors? Or am I missing something?

from bijectors.jl.

oschulz avatar oschulz commented on August 15, 2024

I think you're right @torfjelde - I hadn't noticed that Bijectors.Composed <: Bijector has gone. So Bijectors wouldn't require FunctionChain to be a subtype of Bijector anymore and no conversion is necessary?

from bijectors.jl.

torfjelde avatar torfjelde commented on August 15, 2024

Exactly:) Now it should "just work" 👍

from bijectors.jl.

oschulz avatar oschulz commented on August 15, 2024

Thanks @torfjelde !

from bijectors.jl.

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.