Failure with ComposedFunction `∘`
まだ誰も着手していません。
- #73 @mcabbott による — マージされずにクローズ
評価
調査の方向性
issue に示されている 2 つの Diffractor.gradient 呼び出しで失敗を再現します。まず src/stage1/generated.jl の 288-308 行付近と src/interface.jl の 122-128 行付近から始め、その後、リンクされている ChainRulesCore の pull request を確認します。gradient(identity∘cbrt, 1.23) が Tangent backing エラーなしで完了し、動作している直接の cbrt の結果が維持されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
I'm pretty confident this worked in September, but have no idea whether changes here or in ChainRules broke it: Edit -- the change is https://github.com/JuliaDiff/ChainRulesCore.jl/pull/495, discussed there.
julia> Diffractor.gradient(cbrt, 1.23)
(0.29036348772107673,)
julia> Diffractor.gradient(identity∘cbrt, 1.23)
ERROR: ArgumentError: Tangent for the primal Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}} should be backed by a AbstractDict type, not by NamedTuple{(:data,), Tuple{ChainRulesCore.ZeroTangent}}.
Stacktrace:
[1] _backing_error(P::Type, G::Type, E::Type)
@ ChainRulesCore ~/.julia/packages/ChainRulesCore/qzYOG/src/tangent_types/tangent.jl:62
[2] ChainRulesCore.Tangent{Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, NamedTuple{(:data,), Tuple{ChainRulesCore.ZeroTangent}}}(backing::NamedTuple{(:data,), Tuple{ChainRulesCore.ZeroTangent}})
@ ChainRulesCore ~/.julia/packages/ChainRulesCore/qzYOG/src/tangent_types/tangent.jl:33
[3] (::Diffractor.var"#162#164"{Symbol, DataType})(Δ::ChainRulesCore.ZeroTangent)
@ Diffractor ~/.julia/packages/Diffractor/HYuxt/src/stage1/generated.jl:308
[4] (::Diffractor.EvenOddOdd{1, 1, Diffractor.var"#162#164"{Symbol, DataType}, Diffractor.var"#163#165"{Symbol}})(Δ::ChainRulesCore.ZeroTangent)
@ Diffractor ~/.julia/packages/Diffractor/HYuxt/src/stage1/generated.jl:288
[5] ∂⃖¹₁merge
@ ./none:1
[6] ∂⃖¹₁
@ ./none:1
[7] (::Diffractor.ApplyOdd{1, 1})(Δ::Float64)
@ Diffractor ~/.julia/packages/Diffractor/HYuxt/src/stage1/generated.jl:371
[8] ∂⃖¹₁ComposedFunction
@ ./none:1
[9] (::Diffractor.∇{ComposedFunction{typeof(identity), typeof(cbrt)}})(args::Float64)
@ Diffractor ~/.julia/packages/Diffractor/HYuxt/src/interface.jl:122
[10] Diffractor.∇(::Function, ::Float64)
@ Diffractor ~/.julia/packages/Diffractor/HYuxt/src/interface.jl:128
[11] top-level scope
@ REPL[3]:1
- 主要言語
- Julia
- スター
- 453
- フォーク
- 33
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
JuliaDiff/Diffractor.jl のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 25/100
JuliaDiff/Diffractor.jl#302 · コメント 2 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 52/100
JuliaDiff/Diffractor.jl#294 ·
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
JuliaDiff/Diffractor.jl#293 ·
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
JuliaDiff/Diffractor.jl#290 · コメント 8 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
JuliaDiff/Diffractor.jl#280 · コメント 1 件 ·
JuliaDiff/Diffractor.jl の issue をすべて見る
似ている issue
-
enhancement good first issue help wanted
難易度 2/5 半日 初心者へのやさしさ 82/100
-
authority-vechtstromen ready-for-agent
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
Deltares/Ribasim-NL#890 ·
メンテナーはふだん 1 日以内に返信
-
Precompilation fails on Julia 1.14 nightly: HessenbergQ lmul! methods overwrite LinearAlgebra'sオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
JuliaLinearAlgebra/GenericLinearAlgebra.jl#183 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
JuliaGPU/KernelAbstractions.jl#897 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
oscar-system/GAP.jl#1455 ·
メンテナーはふだん 1 日以内に返信