stan-dev / stan

Stan development repository. The master branch contains the current release. The develop branch contains the latest stable development. See the Developer Process Wiki for details.
https://mc-stan.org
BSD 3-Clause "New" or "Revised" License
2.57k stars 368 forks source link

Laplace sampling service output is inconsistent with other services. #3183

Closed WardBrian closed 1 year ago

WardBrian commented 1 year ago

The laplace service method added in #3148 produces a CSV file where the final two columns are log_p and log_q. This has two issues:

  1. All other services have "algorithmic parameters" (e.g. lp__ for sampling, log_g__ for ADVI) output before the model's parameters
  2. These names are not suffixed with the usual two underscores, which means a user can write a model with a parameter named log_p and receive a confounding CSV header which many libraries will refuse to parse:
    log_p,log_p,log_q
    0.281593,-6.77835,-0.194159

Current Version:

v2.32.0