Skip to content

Remove projection rule for VectorOfArray - #377

Merged
ChrisRackauckas merged 2 commits into
SciML:masterfrom
DhairyaLGandhi:dg/noproj
May 16, 2024
Merged

ChrisRackauckas merged 2 commits into
SciML:masterfrom
DhairyaLGandhi:dg/noproj

Conversation

@DhairyaLGandhi

Copy link
Copy Markdown
Member

Checklist

  • Appropriate tests were added
  • Any code changes were done in a way that does not break public API
  • All documentation related to code changes were updated
  • The new code follows the
    contributor guidelines, in particular the SciML Style Guide and
    COLPRAC.
  • Any new documentation only uses public API

Additional context

The current rule does not account for the various Tangent types that can be seen when working with downstream packages (specifically note AD'ing through observable functions via SII). It is much better to remove the rule and let AD take care of picking out the right fields etc. If its preferred to retain the rule (to get the VectorOfArray type returned in the reverse pass), then we will need to handle that elsewhere. For now, let's check for breakages in CI.

Add any other context about the problem here.

Comment thread ext/RecursiveArrayToolsZygoteExt.jl Outdated
return VectorOfArray(x)
end
end
# function ChainRulesCore.ProjectTo(a::AbstractVectorOfArray)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't comment out code like this. You've done it in a few PRs. Just remove the code if it's to be removed.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, will do.

Comment thread ext/RecursiveArrayToolsZygoteExt.jl Outdated
@ChrisRackauckas
ChrisRackauckas merged commit 27caf9b into SciML:master May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants