VNT: VarInfo mop-up
I maintainer di solito rispondono entro 2 giorni
Nessuno ha ancora preso questa issue.
- #1468 di @yebai — chiusa senza merge
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Refactoring
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- julia
- Ambito
- backend, performance
Direzione di ricerca
Inizia dallo script di benchmarking collegato da PR #1183 ed esamina l’implementazione attuale di VarInfo e la suite di benchmark. Determina quali casi di benchmark possono essere incorporati, quindi valuta gli elementi di vettorializzazione e pulizia ancora non spuntati. Il lavoro è completo quando i benchmark selezionati sono integrati e qualsiasi ambito rimanente è stato risolto o suddiviso in issue mirate.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Due to time constraints on my part, and to avoid ballooning the PR, we are merging #1183 into its base branch (though not breaking) even though some issues remain. Listing those issues here:
-
unflatten!!andlink!!remain surprisingly slow for models that have IndexLenses. I spent an hour on this but failed to understand why. I tried improving type stability within those functions by getting rid of some closures, and I also improvedextract_priorsthatlink!!uses, but they weren't the culprit. I think this warrants more careful profiling. (Edit: Both functions are significantly faster, often by over 10x.) -
mergecould be optimised to not revert toLinked=nothingso easily. This probably warrants writing a function to check the link status of all variables and use that to setLinked. (A bit likeconcretise_eltypein a way.) - Try removing all or some of the
@inboundsannotations and see how they affect performance. See https://github.com/TuringLang/DynamicPPL.jl/pull/1183#issuecomment-3755257644. -
keyscould be made it faster. Not a priority. (Edit:keysis 2-10x faster than when this issue was written.) -
subsetcould be made faster, see the comment in it. It's already faster than the old version in most cases though, so not a priority. (Edit:subsetis 1-2x faster than when this issue was written.) - See the benchmarking script I wrote and see if some of it could feed into our benchmark suite.
- Check that AD performance is fine. I've been benchmarking primal evals so far. I don't expect anything to go wrong there, but should do a quick check.
- Reimplement
Base.rand(::Model)using a VAIMAcc, and make it return a VNT. That will allow removingvalues_as(::VarInfo, ::NamedTuple), which shouldn't exist. - Once the performance optimisations are all done, add a note in HISTORY.md for what's changed performance-wise. There's a placeholder in there already.
There are also bigger issues that might not make it to this release, and probably deserve their own issues:
- Stop vectorising all values in VarInfo, now that the backend storage no longer requires it.
- Stop storing
transformin VarInfo. We almost always pull the transform from the distribution intilde_assume!!anyway, because the stored transform may be out of date. Safer to not even store it, and makes type stability easier because linking doesn't have to change the type ofTransformedValueanymore. - The above will also allow to get rid of some dangerous functions like
unflatten!!andvalues_as(::VarInfo, ::Colon). - Start using shadow arrays, see #1194
- Reimplement
StaticTransformation. It was a bit broken/risky, and now it's broken/risky in a slightly different way. See comments in the function.
- Lingua principale
- Julia
- Stelle
- 291
- Fork
- 43
- Merge medio
- 1g 23h
- PR unite (30g)
- 15
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la 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 TuringLang/DynamicPPL.jl
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 64/100
TuringLang/DynamicPPL.jl#1499 ·
I maintainer di solito rispondono entro 2 giorni
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
TuringLang/DynamicPPL.jl#1480 ·
I maintainer di solito rispondono entro 2 giorni
-
Separate model-evaluation inputs from outputsForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Apertadata-structures enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 30/100
TuringLang/DynamicPPL.jl#1469 ·
I maintainer di solito rispondono entro 2 giorni
-
enhancement
Difficoltà 3/5 1-2 giorni Idoneità per principianti 64/100
TuringLang/DynamicPPL.jl#1466 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
documentation
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
TuringLang/DynamicPPL.jl#1390 · 2 commenti ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di TuringLang/DynamicPPL.jl
Issue simili
-
Release CorleoneInverse as 0.1.1Forse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
SciML/Corleone.jl#200 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
JuliaAI/MLJTransforms.jl#120 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
exercism/julia#1205 · 3 commenti · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
SciML/OrdinaryDiffEq.jl#5175 ·
I maintainer di solito rispondono entro 1 giorno