Direct use of Projector is never annotated on the pyadjoint tape
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 45/100
Direzione di ricerca
Inizia da adjoint_utils/blocks/solving.py, leggendo ProjectorBase.project e ProjectBlock, insieme al refactoring di CachedSolverBlock in #4638. Traccia come vengono annotate e rieseguite la funzione libera project, Function.project e l’uso diretto di Projector. Il lavoro è completo quando tutti e tre i percorsi vengono registrati sul tape di pyadjoint e la riesecuzione riutilizza il solver memorizzato nella cache di Projector, l’inversa di slate e il comportamento di constant_jacobian.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Python
- Stelle
- 684
- Fork
- 204
- Merge medio
- 4g 14h
- PR unite (30g)
- 46
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di firedrakeproject/firedrake
-
BUG: NonlinearVariationalSolver errors with adj_kwargsForse già presa @dham l’ha presa 151 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
firedrakeproject/firedrake#5186 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
firedrakeproject/firedrake#5091 ·
I maintainer di solito rispondono entro 1 giorno
-
documentation
Difficoltà 1/5 1-3 ore Idoneità per principianti 82/100
firedrakeproject/firedrake#3556 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 22/100
firedrakeproject/firedrake#5644 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Function.assign on a subset fails with a Constant, a Real Function or abs in the expressionForse già presa @connorjward l’ha presa 2 giorni fa. Aperta
firedrakeproject/firedrake#5643 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di firedrakeproject/firedrake
Issue simili
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
Sienna-Platform/SiennaSchemas#130 ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
firedrakeproject/Irksome#293 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
ida-arbeitszeit/workers-control#1578 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
aws-samples/sample-per-model-bedrock#898 ·
I maintainer di solito rispondono entro 1 giorno