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

Add vetiver_dashboard template and function #98

Merged
merged 13 commits into from
Jun 13, 2022
Merged

Add vetiver_dashboard template and function #98

merged 13 commits into from
Jun 13, 2022

Conversation

juliasilge
Copy link
Member

This PR adds a new dashboard for model monitoring. This includes an output format (vetiver_dashboard()) and an R Markdown template.

@juliasilge juliasilge requested a review from cderv May 31, 2022 19:28
@juliasilge
Copy link
Member Author

Closes #5

@juliasilge
Copy link
Member Author

Closes #103

Thank you so much @cderv! 🙏

@juliasilge
Copy link
Member Author

juliasilge commented Jun 10, 2022

TODO:

  • The pin URL doesn't seem to be working
  • Make a better error if the pin doesn't exist and the user tries to knit the dashboard

Copy link
Collaborator

@cderv cderv left a 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()
Copy link
Collaborator

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 ?

R/dashboard.R Outdated Show resolved Hide resolved
R/dashboard.R Show resolved Hide resolved
R/dashboard.R Show resolved Hide resolved
Comment on lines +89 to +91
get_vetiver_dashboard_pins <- function() {
knitr::opts_knit$get("vetiver_dashboard.pins")
}
Copy link
Collaborator

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.

R/dashboard.R Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants