Couple of issues with variational...
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 1.1k
- Forks
- 266
- Avg merge
- 2h 56m
- Merged PRs (30d)
- 1
Description
Summary:
- With certain models, calling
vb(model, data)will run properly with some datasets, but produce ano valid constructorerrors with others. - Running the same model using
cmdstan variationaland trying to import the results into R withread_stan_csv, produces anot all are integerserror.
Description:
Describe the issue as clearly as possible.
I made and compiled a model, and would like to run variational bayes on it. I first try to do this with a subset of my data (3000 rows), and I am able to do it using vb() from inside R. I then try to run vb() using the full dataset (60000 rows) and get this error:
> vbout_all <- vb(model, data_all_arima$data_bundle)
trying deprecated constructor; please alert package maintainer
Error in new_CppObject_xp(fields$.module, fields$.pointer, ...) :
no valid constructor available for the argument list
failed to create the model; variational Bayes not done
To be clear, this is exactly the same model, run in the same session. The two datasets are generated using the same code, the only difference being that in one, only the first 3000 rows are used.
I therefore try to run variational using cmdstan, outputting the same dataset using stan_rdump. This runs fine (on the full 60k dataset). However, when I then try to import the output into R with read_stan_csv, I get this error:
> vb_arima <- read_stan_csv("./vb_arima")
Error in all_int_eq(warmup) : not all are integers
In addition: Warning message:
In FUN(X[[i]], ...) : line with "Elapsed Time" not found
Reproducible Steps:
Please report steps to reproduce the issue. If it's not possible to reproduce, please include a description of how you discovered the issue.
See above. I would prefer not to share my model publicly, and am not permitted to share the dataset. I am happy to go over the details and share privately with a developer looking at the issue.
If you have a reproducible example, please include it.
Current Output:
If applicable, any relevant output from RStan.
See above.
Expected Output:
If applicable, the output you expected from RStan.
RStan Version:
The version of RStan you are running (e.g., from packageVersion("rstan"))
2.17.2
R Version:
The version of R you are running (e.g., from R.version.string)
R version 3.4.3 (2017-11-30)
Operating System:
Your operating system (e.g., OS X 10.11.3)
10.12.6
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the two reported entry points, vb(model, data) and read_stan_csv(), using the supplied RStan 2.17.2 and R 3.4.3 environment while comparing the 3,000-row and 60,000-row cases. Inspect the cmdstan variational output produced via stan_rdump, including the missing “Elapsed Time” line and warmup parsing. Done means both variational paths complete and the generated CSV imports without either reported error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- data
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100