-
-
Notifications
You must be signed in to change notification settings - Fork 65
Profiling vignette #435
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
Profiling vignette #435
Conversation
contents: | ||
- cmdstanr-internals | ||
- profiling |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When creating a new vignette you need to add the file name (without the .Rmd) to the articles section of _pkgdown.yml
--- | ||
|
||
```{r child="children/settings-knitr.Rmd"} | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
brings in the knitr settings we use in all the vignettes
vignettes/profiling.Rmd
Outdated
title: "Profiling Stan programs with CmdStanR" | ||
author: "Rok Češnovar and Jonah Gabry" | ||
output: | ||
rmarkdown::html_vignette: | ||
toc: true | ||
toc_depth: 4 | ||
params: | ||
EVAL: !r identical(Sys.getenv("NOT_CRAN"), "true") | ||
vignette: > | ||
%\VignetteIndexEntry{Profiling Stan programs with CmdStanR} | ||
%\VignetteEngine{knitr::rmarkdown} | ||
%\VignetteEncoding{UTF-8} | ||
--- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just copied all this from the other vignettes (but I put your name first in the authors)
vignettes/profiling.Rmd
Outdated
## Introduction | ||
|
||
As of version 2.26.0 CmdStan supports profiling Stan programs ... | ||
|
||
## Adding profiling statements to a Stan program | ||
|
||
Profiling Stan programs requires adding `profile` statements to the | ||
Stan program ... | ||
|
||
## Accessing profiling information after running Stan | ||
|
||
### Load profile data into R | ||
|
||
The `$profiles()` method ... | ||
|
||
### Saving profile files | ||
|
||
The `$save_profile_files()` method ... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to change these section titles and order. Just wanted to show that we've been using ## for the main sections (# is used automatically for the title) and ### for subsections (#### for subsubsections if necessary).
Note: I made this as a PR so I could add review comments |
Thank you so much! |
Oh and after you run withr::with_envvar(c("NOT_CRAN" = "true"), {
pkgdown::build_articles_index()
pkgdown::build_article("profiling")
}) you can run pkgdown::preview_site() to see what it looks like |
@jgabry two questions:
|
That's fine, although I would slightly prefer creating a separate folder (inside the vignettes folder) for those.
Yeah there's an example in the rstanarm vignettes: https://github.com/stan-dev/rstanarm/tree/master/vignettes Check out and then includes the citations like this: |
ecb0200
to
9bb5361
Compare
9bb5361
to
4cc51af
Compare
Codecov Report
@@ Coverage Diff @@
## master #435 +/- ##
==========================================
+ Coverage 92.22% 92.99% +0.76%
==========================================
Files 12 12
Lines 2870 2870
==========================================
+ Hits 2647 2669 +22
+ Misses 223 201 -22
Continue to review full report at Codecov.
|
Tests pass, should be ready for review. |
…tanr into profiling-vignette
Cool, taking a look now |
Technically I opened this PR so it won't let me add a review. But I pushed a few minor edits and I think this is ready to go. The only thing is that I think it will fail on testcoverage because that runs the vignettes but doesn't have the release candidate. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving for @jgabry
Thanks. Should pass now. |
Note: this branch branches off of the profiling branch (so it looks like there are more files changed than there really are)
@rok-cesnovar Here's a template for the profiling vignette. To generate the html run: