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 utility to list needed engine packages #1113

Closed
simonpcouch opened this issue Apr 22, 2024 · 3 comments
Closed

add utility to list needed engine packages #1113

simonpcouch opened this issue Apr 22, 2024 · 3 comments
Labels
feature a feature request or enhancement

Comments

@simonpcouch
Copy link
Contributor

For installation/setup purposes, it'd be great to have some kind of utility to find all of the engine package installs needed to plausibly fit any model in the parsnip model env. In other words, if parsnip listed all engines it supports in Suggests, what would they be?

I used this while setting up a new machine the other day to do so with a version of the model env that includes all engines supported by parsnip extensions:

library(tidyverse)
library(tidymodels)
lapply(parsnip:::extensions(), require, character.only = TRUE)
env <- parsnip::get_model_env()
pkgs_list <- as.list(env)[grepl("_pkgs", names(env), fixed= TRUE)]

all_possible_dependencies <-
  pkgs_list %>% 
  bind_rows() %>% 
  pull(pkg) %>% 
  list_flatten() %>% 
  unlist() %>% 
  unique()
@simonpcouch simonpcouch added the feature a feature request or enhancement label Apr 22, 2024
@EmilHvitfeldt
Copy link
Member

Is this different than parsnip:::install_engine_packages()? https://github.com/tidymodels/parsnip/blob/main/R/install_packages.R

@simonpcouch
Copy link
Contributor Author

Not different enough to warrant this issue--thanks. :)

Copy link

github-actions bot commented May 7, 2024

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.

@github-actions github-actions bot locked and limited conversation to collaborators May 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature a feature request or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants