stan-dev / pystan

PyStan, a Python interface to Stan, a platform for statistical modeling. Documentation: https://pystan.readthedocs.io
ISC License
342 stars 59 forks source link

pystan 3 far worse than pystan 2? #391

Closed ideasrule closed 1 year ago

ideasrule commented 1 year ago

I've been using pystan 2, but recently upgraded to pystan 3. In my opinion, v3 is far, far worse than v2, to such an extent that it's nearly unusable. The "upgrade" felt like going from a new luxury car to a Ford Model T. Many critical features are missing:

  1. check_hmc_diagnostics. Validating convergence is not an optional step, especially not for NUTS, where the ability to accurately check convergence is a major selling point
  2. "pars". I can't tell pystan 3 what parameters to keep and which to discard. I have a few very big transformed_parameters that would eat up all the memory if I can't tell pystan not to save them.
  3. I can't find the way to pass the other control parameters either: max_treedepth, adapt_delta, chain thinning factor...
  4. As the documentation states, variational inference, maximization algorithms, and other sampling algorithms are not supported.

IMHO, pystan 3 was a very bad idea. Having fewer lines of code is not a benefit if half of the mission-critical features are missing. If the features exist and I simply missed them, I'd appreciate a pointer to where I can find them.

ahartikainen commented 1 year ago

Thanks for the feedback.

PyStan 2 codebase was outdated and did not really work with the latest changes in Stan C++ side.

For any custom stuff, have you tried using CmdStanPy + ArviZ?

riddell-stan commented 1 year ago

Discussion happens on the Stan forums. This issue tracker is for bug reports and documentation improvements. You were told this when you clicked on "New issue."

ideasrule commented 1 year ago

Discussion happens on the Stan forums. This issue tracker is for bug reports and documentation improvements. You were told this when you clicked on "New issue."

Not having multiple core functionalities IS a bug, as far as I'm concerned, and a very serious one. In addition, your description is not accurate. When I clicked on "new issue", I see "Blank issue: Please note that the Stan Forums should be used in most cases". Note "most" and not "all".

ideasrule commented 1 year ago

Thanks for the feedback.

PyStan 2 codebase was outdated and did not really work with the latest changes in Stan C++ side.

For any custom stuff, have you tried using CmdStanPy + ArviZ?

Thank you. I'm currently using pystan 2, but I'll try out CmdStanPy + arviz.