stan-dev / stan-dev/rstan

`vb` function fails to create the model.

Open
#478 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
R
Stars
1.1k
Forks
266
Avg merge
2h 56m
Merged PRs (30d)
1

Description

Summary:

vb function fails to create the model.

Description:

I'm using the vb function having previously constructed a Stan model using stan_model, but I get the following error message:

trying deprecated constructor; please alert package maintainer Error in new_CppObject_xp(fields$.module, fields$.pointer, ...) : c++ exception (unknown reason) failed to create the model; variational Bayes not done

Reproducible Steps:

my_stan_model <- stan_model(model_code = my_stan_code)

variational_posterior <- vb(
object = my_stan_model,
data = stan_data,
pars = parameters,
output_samples = 250,
adapt_engaged = F, eta = 0.01)

Current Output:

trying deprecated constructor; please alert package maintainer Error in new_CppObject_xp(fields$.module, fields$.pointer, ...) : c++ exception (unknown reason) failed to create the model; variational Bayes not done

RStan Version:

> packageVersion("rstan") [1] ‘2.17.2’

R Version:

R version 3.4.3 (2017-11-30) -- "Kite-Eating Tree"

Operating System:

MacOS High Sierra 10.13.2

Any help would be most appreciated!

Contributor guide

No contributing guide indexed for this repository

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 reproducing the supplied stan_model and vb calls in RStan 2.17.2 on the reported R and macOS versions, then trace the vb model-creation path and the deprecated-constructor error. Done means the same model reaches variational Bayes and produces the requested posterior samples without the constructor or model-creation failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, r
Domain
data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.