chakravala / chakravala/Grassmann.jl
gradient throws error
- Dominant language
- Julia
- Stars
- 514
- Forks
- 41
- PR merge metrics
- No merged PRs in 30d
Description
v1 is the standard basis vector
```
julia> Zygote.gradient(v->0v, v1)
ERROR: cannot convert from ⟨×××⟩ to ⟨+++---⟩*
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:33
[2] (::SubManifold{⟨+++---⟩*, 6, 0x000000000000003f})(b::SubManifold{⟨×××⟩, 0, 0x0000000000000000})
@ DirectSum ~/.julia/packages/DirectSum/XQ4T8/src/operations.jl:231
[3] interop
@ ~/.julia/packages/AbstractTensors/f9LPE/src/AbstractTensors.jl:151 [inlined]
[4] *
@ ~/.julia/packages/AbstractTensors/f9LPE/src/AbstractTensors.jl:186 [inlined]
[5] (::ChainRules.var"#times_pullback#1182"{Int64, SubManifold{⟨×××⟩, 1, 0x0000000000000001}, ChainRulesCore.ProjectTo{Number, NamedTuple{(), Tuple{}}}, ChainRulesCore.ProjectTo{Float64, NamedTuple{(), Tuple{}}}})(Ω̇::SubManifold{⟨×××⟩, 0, 0x0000000000000000})
@ ChainRules ~/.julia/packages/ChainRules/Tj6lu/src/rulesets/Base/fastmath_able.jl:243
[6] ZBack
@ ~/.julia/packages/Zygote/rv6db/src/compiler/chainrules.jl:179 [inlined]
[7] Pullback
@ ./REPL[18]:1 [inlined]
[8] (::typeof(∂(#7)))(Δ::SubManifold{⟨×××⟩, 0, 0x0000000000000000})
@ Zygote ~/.julia/packages/Zygote/rv6db/src/compiler/interface2.jl:0
[9] (::Zygote.var"#52#53"{typeof(∂(#7))})(Δ::SubManifold{⟨×××⟩, 0, 0x0000000000000000})
@ Zygote ~/.julia/packages/Zygote/rv6db/src/compiler/interface.jl:41
[10] gradient(f::Function, args::SubManifold{⟨×××⟩, 1, 0x0000000000000001})
@ Zygote ~/.julia/packages/Zygote/rv6db/src/compiler/interface.jl:76
[11] top-level scope
@ REPL[18]:1
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the Julia example with Zygote.gradient(v -> 0v, v1) and inspect the failure at DirectSum/src/operations.jl:231. Read the interop path in AbstractTensors/src/AbstractTensors.jl:151 and the ChainRules pullback referenced in the stack trace. Done means the reported gradient no longer raises the shown SubManifold conversion error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100