optimizing save_iterations should save iterations
Open
Nobody has claimed this yet.
bug
feature
- Dominant language
- R
- Stars
- 1.1k
- Forks
- 266
- Avg merge
- 2h 56m
- Merged PRs (30d)
- 1
Description
Summary:
When using optimizing,
fit <- optimizing(model, save_iterations = TRUE)
does not save the iterations.
Description:
It should save iterations and make them available somehow in the fit object that is produced.
Reproducible Steps:
> code <- "parameters { real x; } model { x ~ normal(3, 2); }"
> model <- stan_model(model_code = code)
> fit <- optimizing(model, save_iterations = TRUE)
Current Output:
> str(fit)
List of 4
$ par : Named num 3
..- attr(*, "names")= chr "x"
$ value : num 0
$ return_code: int 0
$ theta_tilde: num [1, 1] 3
..- attr(*, "dimnames")=List of 2
.. ..$ : NULL
.. ..$ : chr "x"
Expected Output:
Something with the saved iterations.
RStan Version:
> packageVersion('rstan')
[1] ‘2.19.2’
R Version:
> R.version.string
[1] "R version 3.5.0 (2018-04-23)"
Operating System:
OS X 10.13.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 by running the reported optimizing(model, save_iterations = TRUE) example and inspect the resulting fit object fields. Trace the optimizing entry point to determine where iteration output is discarded; done means saved iterations are exposed through the fit object and covered by a regression test.
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
- Mostly clear
- Newbie friendliness
- 35/100