Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Support MutableTangent automatically

オープン
#286 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
julia
領域
testing

調査の方向性

リンクされた issue のコメントと PR 626 を読み、続いて StructuralTangent と test_frule のエントリポイントを調べてください。mutable primals が forward mode で自動的に MutableTangent を選択することを確認し、reverse mode も同じ扱いにすべきか判断してください。提供された setfield! の例が明示的な tangent type なしで動作すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

mutation

This is a follow up to https://github.com/JuliaDiff/ChainRulesCore.jl/issues/105#issuecomment-1655958008

Right now, using https://github.com/JuliaDiff/ChainRulesCore.jl/pull/626 if you want to test something that MutableTangent that does work e.g.:
test_frule(setfield!, MDemo(3.5)⊢MutableTangent{MDemo}(x=2.0), :x, 5.0)

But if you just do:
test_frule(setfield!, MDemo(3.5), :x, 5.0)
you get an error because the default type we use for structural tangents is the immutable Tangent

We could use the StructuralTangent constructor to automatically chose MutableTangent for mutable primals.
we would want to do that forwardward mode, at least. Not sure if we should also do that in reverse

主要言語
Julia
スター
50
フォーク
18
平均マージ
1時間 54分
マージ済み PR(30日)
1

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

JuliaDiff/ChainRulesTestUtils.jl のほかの issue

JuliaDiff/ChainRulesTestUtils.jl の issue をすべて見る

似ている issue

Julia の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。