Skip to content

Commit

Permalink
bundle testing_data
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinykuo committed Apr 1, 2020
1 parent 9c42471 commit 513def8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@ jobs:
- uses: r-lib/actions/setup-r@master
- name: Download dependencies
run: |
install.packages(c("piggyback", "remotes"))
install.packages(c("piggyback", "remotes", "pins"))
remotes::install_github("rstudio/connectapi")
piggyback::pb_download(file = "model_artifacts/toy-model.tar.gz", repo = "kasaai/cork")
untar("model_artifacts/toy-model.tar.gz", exdir = "app")
pins::board_register_github(name = "cork", repo = "kasaai/cork")
testing_data <- pins::pin_get("toy-model-testing-data", board = "cork")
saveRDS(testing_data, "app/testing_data.rds")
shell: Rscript {0}
- name: Deploy
env:
Expand Down
7 changes: 1 addition & 6 deletions app/app.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,8 @@ library(iBreakDown)
library(reticulate)
library(tensorflow)
library(keras)
library(pins)

# Need to use the following branch of {ingredients}
# remotes::install_github("kevinykuo/ingredients", ref = "weights")

pins::board_register_github(name = "cork", repo = "kasaai/cork")
testing_data <- pins::pin_get("toy-model-testing-data", board = "cork")
testing_data <- readRDS("testing_data.rds")

toy_model <- keras::load_model_tf("model_artifacts/toy-model")
predictors <- c(
Expand Down

0 comments on commit 513def8

Please sign in to comment.