Optional profiling
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- cpp
- Ambito
- cli, performance
Direzione di ricerca
Partite dal punto di ingresso del sampling del modello compilato e dalla gestione del profiling di CmdStan; l'issue non indica file o test specifici. Confrontate il comportamento richiesto di profile=FALSE/TRUE con il workaround documentato e verificate che il sampling possa saltare il profiling senza modificare manualmente il programma Stan o mantenere una seconda versione del modello.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Profiling is a great tool for debugging and performance optimization, but it also adds a bit of overhead to the execution of the Stan program. So it would be nice to skip the profiling statements whenever you don't need them and want the model to run as fast as possible - without the need to manually remove them from the stan program or to always keep two version of the same program (one with and one without profiling statements).
Ideal solution
Ideally, there would be an additonal profile = FALSE/TRUE argument to the sample function of a compiled stan model that would be passed on to CmdStan.
Workaround
As a workaround, one can automatically create a temporary copy of the stan program with all profiling statements removed, compile this temporary copy, and sample from this model without profiling. This requires no changes to CmdStan. The disadvantage is of course that this requires a second compiling of the stan model.
I have implemented this workaround as a wrapper of cmdstan_model in this repo. We have been using it during the development work for epinowcast and it has been quite robust. It also supports included files. It would also be possible to use this workaround for a profile = FALSE/TRUE argument in the sample function.
Context
Regarding the ideal solution of integrating this functionality with CmdStan, I lack the expertise to judge how difficult that would be and probably could not do it myself. If people think a workaround like above is acceptable, I'm happy to help implementing it for cmdstanr, but would need some guidance (and a few details still need to be sorted out).
- Lingua principale
- C++
- Stelle
- 240
- Fork
- 105
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un 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 stan-dev/cmdstan
-
Release CmdStan 2.40Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 55/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 45/100
-
code-cleanup
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
-
diagnose exit codeAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 52/100
Tutte le issue di stan-dev/cmdstan
Issue simili
-
Upstream changes to reviewAperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
rhalbersma/xstd-ints#395 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug] Root filesystem scope (/) incorrectly rejects all descendant pathsForse già presa @mugenkyou l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
neutralinojs/neutralino.js#304 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
FuSa
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
tenstorrent/tt-umd#3851 ·
I maintainer di solito rispondono entro 3 giorni
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
mattgodbolt/zindex#67 ·
I maintainer di solito rispondono entro 1 giorno