Skip to content

Commit

Permalink
Add print statements to finalize step to debug S3 failures
Browse files Browse the repository at this point in the history
  • Loading branch information
jeancochrane committed Nov 13, 2023
1 parent 8bd4983 commit 8e5a417
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions pipeline/05-finalize.R
Original file line number Diff line number Diff line change
Expand Up @@ -210,18 +210,36 @@ if (params$toggle$upload_to_s3) {

## 4.1. Train ----------------------------------------------------------------

sprintf(
"Uploading %s to %s",
paths$output$workflow_fit$local,
paths$output$workflow_fit$s3
)

# Upload lightgbm fit
aws.s3::put_object(
paths$output$workflow_fit$local,
paths$output$workflow_fit$s3
)

sprintf(
"Uploading %s to %s",
paths$output$workflow_recipe$local,
paths$output$workflow_recipe$s3
)

# Upload Tidymodels recipe
aws.s3::put_object(
paths$output$workflow_recipe$local,
paths$output$workflow_recipe$s3
)

sprintf(
"Uploading %s to %s",
paths$output$parameter_final$local,
paths$output$parameter_final$s3
)

# Upload finalized run parameters
read_parquet(paths$output$parameter_final$local) %>%
mutate(run_id = run_id) %>%
Expand All @@ -239,6 +257,12 @@ if (params$toggle$upload_to_s3) {
}) %>%
write_parquet(paths$output$parameter_final$s3)

sprintf(
"Uploading %s to %s",
paths$output$test_card$local,
paths$output$test_card$s3
)

# Upload the test set predictions
read_parquet(paths$output$test_card$local) %>%
mutate(run_id = run_id) %>%
Expand Down

0 comments on commit 8e5a417

Please sign in to comment.