Skip to content

Iron out ProjectTo #467

@mzgubic

Description

@mzgubic

Following JuliaDiff/ChainRulesCore.jl#385 and #459, there are still some things to iron out, namely:

  • How to test that the returned types are correct. An attempt is at WIP: Add the option to test tangent types  ChainRulesTestUtils.jl#186 but we can do better
  • Expand the documentation on how to use ProjectTo when writing rules.
  • Scalar rules, e.g. @scalar_rule x \ y (-(Ω / x), one(y) / x). Do we change the @scalar_rule macro, or do we just write out the rules that need to be projected? Is there a performance impact (I've tried for * and adding project appears to have no effect)?
  • The rule for ::typeof(sum), f, xs::AbstractArray breaks inference when an array of array is passed. Can we solve this?

Perhaps we want to solve some of these before merging the two PRs?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions