document ReverseDiff.jl integration's need to opt-in

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

メンテナーはふだん 1 日以内に返信

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

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
45/100
issue の種類
ドキュメント
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
julia
領域
documentation

調査の方向性

まず、issue にリンクされている ChainRules のロールアウト状況に関するドキュメントを確認し、次に ReverseDiff の macros.jl の 298-315 行付近のセクションと、324 行目で報告されているエラーを確認してください。ReverseDiff はデフォルトではルールを使用しないこと、ルールごとのオプトインがどのように使われるか、そして指摘されているスコープ上の制限を文書化し、既存のドキュメントと表現を照合してください。

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

説明

documentation

From Slack:

[Fredrik Bagge Carlson](https://app.slack.com/team/UJ7DVTVQ8) [Today at 3:48 PM](https://julialang.slack.com/archives/C6G240ENA/p1646063331166529)
I'm looking at
https://juliadiff.org/ChainRulesCore.jl/stable/index.html#ChainRules-roll-out-status
and it seems like ReverseDiff.jl is supposed to work with ChainRules, but i can't seem to figure out how, my rules are never called


4 replies

[Seth Axen](https://app.slack.com/team/UHDQQ4GN6):axe:  [7 minutes ago](https://julialang.slack.com/archives/C6G240ENA/p1646063442894469?thread_ts=1646063331.166529&cid=C6G240ENA)
By default ReverseDiff opts out of all rules for now. Use https://github.com/JuliaDiff/ReverseDiff.jl/blob/df0067465ca436b05377054ac7a184da691db1a3/src/macros.jl#L298-L315 to opt-in on a per-rule basis.

[Fredrik Bagge Carlson](https://app.slack.com/team/UJ7DVTVQ8)  [6 minutes ago](https://julialang.slack.com/archives/C6G240ENA/p1646063506399249?thread_ts=1646063331.166529&cid=C6G240ENA)
ok thanks for answering :slightly_smiling_face: Perhaps that should be made clear in the docs for chain rules? I couldn't find anything in the docs for RD either

[Seth Axen](https://app.slack.com/team/UHDQQ4GN6):axe:  [5 minutes ago](https://julialang.slack.com/archives/C6G240ENA/p1646063571928219?thread_ts=1646063331.166529&cid=C6G240ENA)
Yeah, the CR docs could be made more specific there. RD should document it. Not certain if this is considered an API macro.

[Fredrik Bagge Carlson](https://app.slack.com/team/UJ7DVTVQ8)  [2 minutes ago](https://julialang.slack.com/archives/C6G240ENA/p1646063717720879?thread_ts=1646063331.166529&cid=C6G240ENA)
It looks like the macro has some scoping issue
julia> ControlSystems
ControlSystems

julia> ReverseDiff.@grad_from_chainrules RobustAndOptimalControl.hinfnorm2(T::ControlSystems.StateSpace{Continuous, ReverseDiff.TrackedReal})
ERROR: UndefVarError: ControlSystems not defined
Stacktrace:
 [1] top-level scope
   @ ~/.julia/packages/ReverseDiff/Y5qec/src/macros.jl:324
主要言語
Julia
スター
267
フォーク
66
平均マージ
1日 1時間
マージ済み PR(30日)
9

環境構築

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

はじめの一歩

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

JuliaDiff/ChainRulesCore.jl のほかの issue

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

似ている issue

Julia の issue をもっと見る

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

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