CompositeLikelihood subsets have data-dependent shapes and cannot compile under JAX
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 22/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- python
- Ambito
- machine-learning
Direzione di ricerca
The problem is in CompositeLikelihood, which selects each row's sub-likelihood with nonzero(group == k), producing data-dependent shapes that JAX cannot compile. Start by reproducing the failure: build a model using CompositeLikelihood and compile it with mode="JAX". The issue leaves the fix open, so agreeing on an approach with the maintainers comes first. Done means the model compiles under JAX and its predictions match the C and Numba backends.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
CompositeLikelihood (#42, being ported onto the likelihood-graph design from #50) picks each observation's sub-likelihood from group labels computed from the inputs, e.g. group=X[:, kind_col]. Each evaluation selects the rows of group k with nonzero(group == k), whose length depends on the data. The C and Numba backends handle this, but JAX needs static shapes, so a model using CompositeLikelihood will not compile with mode="JAX".
A possible fix is to evaluate every sub-likelihood on every row and keep each row's own term with switch(group == k, value_k, 0). Shapes stay static, at K times the work. Rows outside a sub-likelihood's support can produce inf or NaN values whose gradients become NaN even where masked, so the inputs of masked rows need to be replaced with safe values before evaluation (the "double where" pattern).
This is just a guess at a fix. Numba works fine. Open to other options for fixing this. Only hits someone doing prediction with a CompositeLilkelihood using JAX.
- Lingua principale
- Jupyter Notebook
- Stelle
- 15
- Fork
- 5
- Merge medio
- 2g 10h
- PR unite (30g)
- 5
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
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 pymc-devs/ptgp
-
Expose and document VGP variational parameters for fit diagnosticsForse già presa @bwengals l’ha presa 54 giorni fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
-
Add VGP: variational Gaussian inference for non-Gaussian likelihoods without inducing pointsForse già presa @bwengals l’ha presa 151 giorni fa. Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
-
Is the API functional?Apertapymc
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
-
Rename library to GPTAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
Tutte le issue di pymc-devs/ptgp
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
[Bug]: PSNR overflows with a float16 tensor data range for 10-bit imagesForse già presa @AkshatPal2007 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
bug good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
callstackincubator/ai#378 ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG] KVarN assertion failure in build_inp_mem_hybrid_iswa() due to uninitialized self_kvarn_rotAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Anbeeld/beellama.cpp#205 ·