stan-dev / stan-dev/cmdstan

utility to check inits

Open
#967 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Feature user experience
Dominant language
C++
Stars
238
Forks
106
Avg merge
2h 29m
Merged PRs (30d)
6

Description

Summary:

Conceptually, the model fitting process consists of 3 steps:

  1. compile the Stan program to a C++ executable via a call to GNU-make
  2. (instantiate the model with the data)
  3. do inference

Steps 2 and 3 are conflated by the command-line interface. Allow the user to do step 2.
This would only be useful as a way to diagnose problems with initialization, as we don't provide a way to serialize the instantiated model; it would solve the perennial problem of bad data init files; it would allow the user to see what the initial parameter values are.

Description:

The command line interface conflates steps 2 and 3 because it is a very lightweight wrapper which determines which of the stan::services methods to call, and all of the stan::services methods then in turn call function stan::services::initialize as part of doing inference.

Add a method or utility that calls initialize directly. As part of this, report initial parameter values supplied and if the parameters can be initialized given inits and constraints, report the set of valid initial values chosen (possibly at random).

Additional Information:

most recent discussion here: https://discourse.mc-stan.org/t/saving-reusing-adaptation-in-cmdstanr/19166/45

user ran into problems, couldn't figure out why intializing parameters wasn't working as expected.

Current Version:

v2.25.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how the command-line interface calls stan::services methods and how those methods invoke stan::services::initialize. Define a utility that calls initialize directly, reports supplied initial values, and reports valid values selected under the constraints; done means initialization can be diagnosed without running inference.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.