JuliaDiff / JuliaDiff/AbstractDifferentiation.jl

Use multiple arguments instead of a tuple for pushforward and pullback function?

Open
#53 6 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

design help wanted question
Dominant language
Julia
Stars
138
Forks
18
PR merge metrics
No merged PRs in 30d

Description

It seems annoying that the pushforward and pullback function accept tuples of co-tangents instead of multiple arguments. Is there a compelling reason for doing so or was this a design decision that could be changed? In my opinion the main annoyance is that one has to handle the case of tuples of length 1 in a special way (as e.g. in https://github.com/JuliaDiff/AbstractDifferentiation.jl/pull/51) (it also makes it impossible to work with actual single-argument functions that take a tuple as only argument but maybe this is not needed anyway). Arguably it is also cleaner to provide multiple arguments as, well, multiple arguments instead of a tuple.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing pushforward and pullback interfaces and the tuple-handling example referenced in AbstractDifferentiation.jl pull request #51. Determine whether multiple arguments can replace tuple arguments while preserving support for single-argument tuple functions. Done means the API direction and implementation scope are agreed.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.