Direct use of Projector is never annotated on the pyadjoint tape
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
adjoint_utils/blocks/solving.py から始め、ProjectorBase.project と ProjectBlock を読み、#4638 の CachedSolverBlock のリファクタリングも確認します。自由関数 project、Function.project、Projector の直接使用がどのようにアノテーションされ、リプレイされるかを追跡します。完了条件は、3 つすべての経路が pyadjoint tape に記録され、リプレイ時に Projector のキャッシュ済み solver、slate inverse、constant_jacobian の挙動が再利用されることです。
索引モデルが issue の本文から書いたものです。
説明
While fixing #5172 (PR #5175) I noticed that using Projector directly records nothing on the pyadjoint tape. Only the free function project and Function.project are annotated; ProjectorBase.project is not, so the projector that the documentation recommends precisely when one wants to reuse the mass solver across repeated projections is invisible to the adjoint. A model that switches from project(f, V) to p = Projector(f, V) plus p.project() for performance silently loses those operations from the tape, with no warning.
The natural fix seems to be to move the annotation onto ProjectorBase.project itself, with the block holding the Projector so that replay reuses its cached solver, slate inverse and constant_jacobian behaviour. SupermeshProjectBlock already works this way. That would give a single annotation point for all three entry paths and would make the replay reproduce the forward computation exactly, rather than reconstructing it from recorded parameters as #5175 does. Since this means restructuring ProjectBlock, which lives in the same part of adjoint_utils/blocks/solving.py that the CachedSolverBlock work in #4638 is reshaping, it probably makes sense to do it on top of that refactor, where a cached projector block would be the natural analogue of the cached solver block.
- 主要言語
- Python
- スター
- 684
- フォーク
- 204
- 平均マージ
- 4日 14時間
- マージ済み PR(30日)
- 46
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
firedrakeproject/firedrake のほかの issue
-
BUG: NonlinearVariationalSolver errors with adj_kwargs対応中かも @dham が 151 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
firedrakeproject/firedrake#5186 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
firedrakeproject/firedrake#5091 ·
メンテナーはふだん 1 日以内に返信
-
documentation
難易度 1/5 1〜3時間 初心者へのやさしさ 82/100
firedrakeproject/firedrake#3556 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 22/100
firedrakeproject/firedrake#5644 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Function.assign on a subset fails with a Constant, a Real Function or abs in the expression対応中かも @connorjward が 2 日前に担当しました。 オープン
firedrakeproject/firedrake#5643 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
firedrakeproject/firedrake の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
alltheplaces/alltheplaces#20570 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
area:ci bug
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
catincloud-labs/dagster-dex#206 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
number_to_words raises ValueError with threshold= for ordinals ("12th") and comma-grouped strings ("1,000")対応中かも @hemtilva が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
providers security
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
agentbreeder/agentbreeder#1031 ·
メンテナーはふだん 1 日以内に返信