{"id":13857285,"url":"https://github.com/juliasilge/deploytidymodels","last_synced_at":"2025-07-13T21:32:10.295Z","repository":{"id":66205304,"uuid":"376197447","full_name":"juliasilge/deploytidymodels","owner":"juliasilge","description":"Version, share, and deploy tidymodels workflows","archived":true,"fork":false,"pushed_at":"2021-11-16T20:03:33.000Z","size":120,"stargazers_count":21,"open_issues_count":0,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-08-06T03:03:25.338Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/juliasilge.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-12T04:00:50.000Z","updated_at":"2023-09-28T18:14:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"88b0e6a2-62c2-4e26-94a0-57acc0b62b33","html_url":"https://github.com/juliasilge/deploytidymodels","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juliasilge%2Fdeploytidymodels","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juliasilge%2Fdeploytidymodels/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juliasilge%2Fdeploytidymodels/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juliasilge%2Fdeploytidymodels/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/juliasilge","download_url":"https://codeload.github.com/juliasilge/deploytidymodels/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225920256,"owners_count":17545459,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-05T03:01:32.475Z","updated_at":"2024-11-22T15:30:23.814Z","avatar_url":"https://github.com/juliasilge.png","language":"R","funding_links":[],"categories":["R"],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n\n\n# deploytidymodels\n\n\u003c!-- badges: start --\u003e\n\u003c!-- badges: end --\u003e\n\n**This repo is archived in favor of the [vetiver](https://github.com/tidymodels/vetiver/) package.**\n\nThe goal of deploytidymodels is to provide fluent tooling to version, share, and deploy a trained model [workflow](https://workflows.tidymodels.org/) using the [vetiver](https://github.com/tidymodels/vetiver) framework. Functions handle both recording and checking the model's input data prototype, and loading the packages needed for prediction.\n\n## Installation\n\n~~You can install the released version of deploytidymodels from [CRAN](https://CRAN.R-project.org) with:~~\n\n``` r\ninstall.packages(\"deploytidymodels\") ## not yet\n```\n\nAnd the development version from [GitHub](https://github.com/) with:\n\n``` r\n# install.packages(\"devtools\")\ndevtools::install_github(\"juliasilge/deploytidymodels\")\n```\n\n## Example\n\nYou can use the [tidymodels](https://www.tidymodels.org/) ecosystem to train a model, with a wide variety of preprocessing and model estimation options.\n\n```{r}\nlibrary(parsnip)\nlibrary(workflows)\ndata(Sacramento, package = \"modeldata\")\n\nrf_spec \u003c- rand_forest(mode = \"regression\")\nrf_form \u003c- price ~ type + sqft + beds + baths\n\nrf_fit \u003c- \n    workflow(rf_form, rf_spec) %\u003e%\n    fit(Sacramento)\n```\n\nYou can **version** and **share** your model by [pinning](https://pins.rstudio.com/dev/) it, to a local folder, RStudio Connect, Amazon S3, and more.\n\n```{r}\nlibrary(deploytidymodels)\nlibrary(pins)\n\nmodel_board \u003c- board_temp()\nm \u003c- vetiver_model(rf_fit, \"sacramento_rf\", model_board)\nvetiver_pin_write(m)\n```\n\nYou can **deploy** your pinned model via a [Plumber API](https://www.rplumber.io/), which can be [hosted in a variety of ways](https://www.rplumber.io/articles/hosting.html).\n\n```{r, eval=FALSE}\nlibrary(plumber)\n\npr() %\u003e%\n    vetiver_pr_predict(m) %\u003e%\n    pr_run(port = 8088)\n```\n\nMake predictions with your deployed model by creating an endpoint object:\n\n```{r}\nendpoint \u003c- vetiver_endpoint(\"http://127.0.0.1:8088/predict\")\nendpoint\n```\n\nA model API endpoint deployed with `vetiver_pr_predict()` will return predictions with appropriate new data.\n\n``` r\nlibrary(tidyverse)\nnew_sac \u003c- Sacramento %\u003e% \n    slice_sample(n = 20) %\u003e% \n    select(type, sqft, beds, baths)\n\npredict(endpoint, new_sac)\n#\u003e # A tibble: 20 x 1\n#\u003e      .pred\n#\u003e      \u003cdbl\u003e\n#\u003e  1 165042.\n#\u003e  2 212461.\n#\u003e  3 119008.\n#\u003e  4 201752.\n#\u003e  5 223096.\n#\u003e  6 115696.\n#\u003e  7 191262.\n#\u003e  8 211706.\n#\u003e  9 259336.\n#\u003e 10 206826.\n#\u003e 11 234952.\n#\u003e 12 221993.\n#\u003e 13 204983.\n#\u003e 14 548052.\n#\u003e 15 151186.\n#\u003e 16 299365.\n#\u003e 17 213439.\n#\u003e 18 287993.\n#\u003e 19 272017.\n#\u003e 20 226629.\n```\n\n## Contributing\n\nThis project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.\n\n- For questions and discussions about tidymodels packages, modeling, and machine learning, please [post on RStudio Community](https://community.rstudio.com/new-topic?category_id=15\u0026tags=tidymodels,question).\n\n- If you think you have encountered a bug, please [submit an issue](https://github.com/juliasilge/deploytidymodels/issues).\n\n- Either way, learn how to create and share a [reprex](https://reprex.tidyverse.org/articles/articles/learn-reprex.html) (a minimal, reproducible example), to clearly communicate about your code.\n\n- Check out further details on [contributing guidelines for tidymodels packages](https://www.tidymodels.org/contribute/) and [how to get help](https://www.tidymodels.org/help/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuliasilge%2Fdeploytidymodels","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuliasilge%2Fdeploytidymodels","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuliasilge%2Fdeploytidymodels/lists"}