JuliaDiff / JuliaDiff/ChainRules.jl

Provide rrules for collect

Open
#486 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

missing rule
Dominant language
Julia
Stars
475
Forks
98
PR merge metrics
No merged PRs in 30d

Description

At least for Tuple and Array, it'd be useful to have, e.g.:

rrule(::typeof(collect), x::Tuple) = collect(x), dy -> (NoTangent(), Tuple(dy))
rrule(::typeof(collect), x::AbstractArray) = collect(x), dy -> (NoTangent(), dy)

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 locating existing rrule definitions and tests for collect or related collection methods in the repository. Add the Tuple and AbstractArray cases shown in the issue, then run the relevant rule tests and verify that the returned tangents match the stated behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
machine-learning
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.