Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Feature idea: cache results of `CmdStanMCMC.summary()`

Aperta
#845 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
45/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python
Ambito
backend

Direzione di ricerca

Inizia dal punto di ingresso CmdStanMCMC.summary() e analizza come l’oggetto fit carica e conserva attualmente i draws. Verifica l’invocazione corrente di stansummary e individua dove sia possibile conservare un dataframe di riepilogo. Il lavoro è completato quando chiamate ripetute a summary() sullo stesso oggetto fit evitano di eseguire nuovamente stansummary restituendo al contempo il dataframe previsto.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

The CmdStanMCMC.summary() method runs stansummary under the hood (passing appropriate arguments to the command call). In large models with draws from thousands of quantities, computing this summary can be pretty slow. If one wants to re-use the summary results, the output dataframe needs to stored in a new variable. I think a small quality-of-life feature would be to cache the results of this call within the fit object so in code where .summary() is called more than once on a single fit, we don't re-run the summary (this is something I run into quite often in models I run).

In comparison to the loading we do of draws into memory when accessed via the fit object, the extra memory cost of also storing the summary would be minimal.

Should be an easy implementation if this is something we want to do.

Lingua principale
Python
Stelle
198
Fork
81
Merge medio
6g 5h
PR unite (30g)
1

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di stan-dev/cmdstanpy

Tutte le issue di stan-dev/cmdstanpy

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.