Skip to content

Zygote.gradient returns nothing instead of `NotImplemented #1227

@simonmandlik

Description

@simonmandlik
using ChainRulesCore, Zygote

f(x) = 2x
ChainRulesCore.rrule(::typeof(f), x) = 2x, d -> (NoTangent(), @not_implemented(""), )

Zygote.gradient(f, 1)

The last line returns (nothing, ) from v0.6.38 onwards but used to return ChainRulesCore.NotImplemented in the previous versions.

Is this intended?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions