-
Notifications
You must be signed in to change notification settings - Fork 28
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
Add vetiver_dashboard
template and function
#98
Conversation
inst/rmarkdown/templates/vetiver_dashboard/skeleton/skeleton.Rmd
Outdated
Show resolved
Hide resolved
inst/rmarkdown/templates/vetiver_dashboard/skeleton/skeleton.Rmd
Outdated
Show resolved
Hide resolved
Closes #5 |
TODO:
|
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 think I missed something important that we need to rediscuss. Please see my comment below.
library(workflows) | ||
|
||
knitr::opts_chunk$set(echo = FALSE) | ||
pins <- get_vetiver_dashboard_pins() |
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.
Ok I think I have missed something important.
pins <- get_vetiver_dashboard_pins()
This will work well during knitting only and not interactively as the knitr option knitr::opts_knit$get("vetiver_dashboard.pins")
won't be populated by the IDE - it will only be populated when the document is knitted and vetiver::vetiver_dashboard()
is effectively evaluated.
This may not be what you wanted considering that is was working as expected for you using params
. Am I right ?
Sorry for the oversight on this. The RStudio IDE in fact do a specific processing of the YAML params
fields to make it available in the global environment for interactive execution of chunk.
So we probably need to reconsider the current solution, aren't we ?
get_vetiver_dashboard_pins <- function() { | ||
knitr::opts_knit$get("vetiver_dashboard.pins") | ||
} |
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.
See my comment above, this will return a non-NULL value only during knitting. In interactive mode (without rendering the all doc but running chunk by chunk), the knitr options won't be populated.
I'll probably need to find another solution as you may not want this behavior.
This PR adds a new dashboard for model monitoring. This includes an output format (
vetiver_dashboard()
) and an R Markdown template.