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

Suggestions for tidymodels + vetiver code #31

Open
juliasilge opened this issue Jun 21, 2022 · 2 comments
Open

Suggestions for tidymodels + vetiver code #31

juliasilge opened this issue Jun 21, 2022 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@juliasilge
Copy link
Collaborator

juliasilge commented Jun 21, 2022

Hello! 👋 This demo is looking so great; thank you for creating this to show folks how to use our tools. I have a couple of minor suggestions for tidymodels and vetiver code in 01-train-and-deploy-model:

Can you use initial_time_split() here, instead of the manual splitting? Then you can use training() and testing() from tidymodels:

n_days_test <- 2
n_days_to_train <- 10
train_end_date <- dates[n_days_test + 1]

I don't believe you need to manually save the ptype here (or save versioned = TRUE). This should be grabbed automatically from the model_fit:

versioned = TRUE,
save_ptype = train_data %>%
head(1) %>%
select(-n_bikes),

If you'd like a PR for either of these, I would be happy to do it!

@juliasilge
Copy link
Collaborator Author

I edited because I realized that we are predicting on the endpoint here and it doesn't have an augment() method yet, as tracked in rstudio/vetiver-r#10. Apologies!

@SamEdwardes SamEdwardes self-assigned this Jun 29, 2022
@SamEdwardes
Copy link
Contributor

Thank you Julia - this is great, I did not know about these functions. I will update the code to include them :)

@SamEdwardes SamEdwardes added the enhancement New feature or request label Jun 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants