-
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
enhanced wrapper to pin_versions #261
Comments
Thanks for the feedback @tbowling87! This is related to rstudio/pins-r#758 and rstudio/pins-r#769. One thing that I notice is that folks really have heterogeneous needs in terms of what they want to combine with In your specific case, I would recommend using library(tidyverse)
library(pins)
b <- board_connect()
#> Connecting to Posit Connect 2023.10.0 at <https://colorado.posit.co/rsc>
all_versions <- b |> pin_versions("julia.silge/sacramento-rf")
all_versions |>
mutate(all_meta = map(version,
~ pin_meta(b,
"julia.silge/sacramento-rf",
version = .))) |>
mutate(title = map_chr(all_meta, pluck, "description"))
#> # A tibble: 4 × 6
#> version created active size all_meta title
#> <chr> <dttm> <lgl> <dbl> <list> <chr>
#> 1 75699 2023-06-09 15:42:00 TRUE 614776 <pins_met> A ranger regression mode…
#> 2 75698 2023-06-09 15:42:00 FALSE 606027 <pins_met> A ranger regression mode…
#> 3 66761 2022-12-10 09:55:00 FALSE 616737 <pins_met> A ranger regression mode…
#> 4 66749 2022-12-09 20:01:00 FALSE 601787 <pins_met> A ranger regression mode… Created on 2023-11-16 with reprex v2.0.2 |
thanks @juliasilge that sounds like a nice way to address the problem. I'll take a look at changing my helper function to use pin_meta as well |
Big fan of the package. One addition I think would be really helpful would be to get a bit of a model description included in the output of the call to pin_versions - which I think might fit best inside of vetiver. As if you've iterated many times over the model selection process you might not remember exactly what version 1 was, and unless I'm missing something, you currently have to read the model pin for each version to see the specifics.
I created a very minimal example of this that I've found helpful in keeping track of things. Other things like a list of the model terms could also be useful but not critical
`vetiver_pin_versions <- function(board, name){
versions <- pins::pin_versions(board, name)
versions <- versions |>
dplyr::mutate(description = purrr::map_chr(version,
~format(vetiver_pin_read(board, name, version = .x))[3]))
return(versions)
}`
The text was updated successfully, but these errors were encountered: