Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update r-markdown.Rmd #854

Merged
merged 5 commits into from
Sep 26, 2023
Merged

Update r-markdown.Rmd #854

merged 5 commits into from
Sep 26, 2023

Conversation

jgcolman
Copy link
Contributor

Redraft aimed at clarifying when override = FALSE must be used.

Submission Checklist

  • Run unit tests
  • Declare copyright holder and agree to license (see below)

Summary

Please describe the purpose of the pull request.

Copyright and Licensing

Please list the copyright holder for the work you are submitting
(this will be you or your assignee, such as a university or company):
INSERT COPYRIGHT HOLDER HERE

By submitting this pull request, the copyright holder is agreeing to
license the submitted work under the following licenses:

Redraft aimed at clarifying when `override = FALSE` must be used.
@jgabry
Copy link
Member

jgabry commented Sep 21, 2023

Thanks! I will probably take a look at this next week when I have more time.

@jgabry jgabry self-requested a review September 21, 2023 15:41
@codecov-commenter
Copy link

codecov-commenter commented Sep 21, 2023

Codecov Report

Merging #854 (4183237) into master (17678d5) will decrease coverage by 1.59%.
Report is 31 commits behind head on master.
The diff coverage is 91.82%.

❗ Current head 4183237 differs from pull request most recent head 421d28f. Consider uploading reports for the commit 421d28f to get more accurate results

@@            Coverage Diff             @@
##           master     #854      +/-   ##
==========================================
- Coverage   88.19%   86.61%   -1.59%     
==========================================
  Files          12       12              
  Lines        4218     4362     +144     
==========================================
+ Hits         3720     3778      +58     
- Misses        498      584      +86     
Files Coverage Δ
R/args.R 97.87% <100.00%> (+0.11%) ⬆️
R/csv.R 93.04% <100.00%> (-3.39%) ⬇️
R/example.R 97.56% <ø> (ø)
R/run.R 93.44% <100.00%> (-0.44%) ⬇️
R/utils.R 70.21% <100.00%> (-2.27%) ⬇️
R/fit.R 96.06% <88.88%> (-0.16%) ⬇️
R/model.R 92.19% <98.41%> (+0.37%) ⬆️
R/install.R 54.62% <47.61%> (-9.45%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@jgabry jgabry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually had a few moments so I took a look now. I think this is an improvement, I only noticed two issues. One I will just go ahead and fix and the other relates to the use of the term "in-memory", for which I proposed an alternative that I'd like your feedback on.

I will also take another look at this next week (I'll be traveling the next few days) to see if I notice anything else.

vignettes/r-markdown.Rmd Outdated Show resolved Hide resolved
in-memory `stanmodel`, which is assigned to a variable with the name given by
the `output.var` chunk option. For example:
Behind the scenes in each option, the engine compiles the model code in each chunk into an
in-memory model: a `stanmodel` if Rstan is being used, or a `CmdStanModel` in the CmdStanR case. The in-memory model is assigned to a variable with the name given by the `output.var` chunk option.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One subtlety is that CmdStanR creates a compiled executable that technically isn't in-memory (from R's perspective). The CmdStanModel object itself is in-memory (so what you say here isn't wrong), but to run Stan it runs the compiled executable outside of R and reads the results back in (unlike RStan which does everything in-memory in R via Rcpp). To avoid any confusion about this maybe we should just remove "in-memory" and instead say something like the following, which I hope gets the idea across:

Behind the scenes in each option, the engine compiles the model code in each chunk and creates an object that provides methods to run the model: a stanmodel if Rstan is being used, or a CmdStanModel in the CmdStanR case. This model object is assigned to a variable with the name given by the output.var chunk option.

If you're ok with that change I can make it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am entirely content with that change.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok great, I just went ahead and made that change. I also just read through the updated vignette again and I think it's much clearer now than before. Thank you again for bringing this to our attention and making the edits.

Once all the unit tests pass (they got triggered again because of my edit) I will merge this pull request.

@jgabry jgabry merged commit 021049b into stan-dev:master Sep 26, 2023
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants