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

have predict() load required packages #308

Closed
topepo opened this issue May 15, 2020 · 4 comments · Fixed by #322
Closed

have predict() load required packages #308

topepo opened this issue May 15, 2020 · 4 comments · Fixed by #322
Labels
bug an unexpected problem or unintended behavior

Comments

@topepo
Copy link
Member

topepo commented May 15, 2020

We check for installed packages when fitting a model and attach them. The same should occur when using predict().

@blairj09
Copy link
Contributor

blairj09 commented May 29, 2020

This also presents a challenge when models are bundled and referenced in content deployed to RStudio Connect. Since the packages required for the model aren't explicit dependencies (even if they are autoloaded with predict()) they won't be made available to the RStudio Connect environment.

A current workaround is to manually specify the dependency (ie library(ranger)) in the content being published. This may be the preferred route, but it would be nice if there was some way to expose these dependencies automatically when parsnip objects are included in content deployed to RStudio Connect.

@juliasilge
Copy link
Member

Similar issues may arise when we work on model monitoring + updating + organization, I expect.

@topepo
Copy link
Member Author

topepo commented May 31, 2020

The merged PR will check for installs and load them when predict() is used. reg_pkg() is new and will list the packages (besides parsnip) required for prediction. This assumes that a recipe was not used (but we can extend it to work with recipes and workflows if needed).

@github-actions
Copy link

github-actions bot commented Mar 6, 2021

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 Mar 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants