You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`EPIDATR_USE_CACHE` controls whether `epidatr` functions use the cache.
25
-
-`DEBUG_MODE` controls whether `targets::tar_make` is run with the `callr_function=NULL`, which allows for debugging. This only works if parallelization has been turned off in `scripts/targets-common.R` by setting the default controller to serial on line 51.
26
-
-`USE_SHINY` controls whether we start a Shiny server after producing the targets.
27
-
-`TAR_PROJECT` controls which `targets` project is run by `run.R`. Likely either `covid_hosp_explore` or `flu_hosp_explore`
28
-
-`EXTERNAL_SCORES_PATH` controls where external scores are loaded from. If not set, external scores are not used.
29
-
-`AWS_S3_PREFIX` controls the prefix to use in the AWS S3 bucket (a prefix is a pseudo-directory in a bucket).
24
+
-`EPIDATR_USE_CACHE` controls whether `epidatr` functions use the cache.
25
+
-`DEBUG_MODE` controls whether `targets::tar_make` is run with the `callr_function=NULL`, which allows for debugging. This only works if parallelization has been turned off in `scripts/targets-common.R` by setting the default controller to serial on line 51.
26
+
-`USE_SHINY` controls whether we start a Shiny server after producing the targets.
27
+
-`TAR_PROJECT` controls which `targets` project is run by `run.R`. Likely either `covid_hosp_explore` or `flu_hosp_explore`
28
+
-`EXTERNAL_SCORES_PATH` controls where external scores are loaded from. If not set, external scores are not used.
29
+
-`AWS_S3_PREFIX` controls the prefix to use in the AWS S3 bucket (a prefix is a pseudo-directory in a bucket).
30
30
31
31
Run the pipeline using:
32
32
@@ -53,26 +53,26 @@ make upload
53
53
make push
54
54
```
55
55
56
-
-`EPIDATR_USE_CACHE` controls whether `epidatr` functions use the cache.
57
-
-`DEBUG_MODE` controls whether `targets::tar_make` is run with the `callr_function=NULL`, which allows for `browser()`. It also disables parallelization. If you are developing, it is recommended to set this to true. If you are just running, it is recommended to set it to false.
58
-
-`USE_SHINY` controls whether we start a Shiny server after producing the targets.
59
-
-`TAR_PROJECT` controls which `targets` project is run by `run.R`.
60
-
-`EXTERNAL_SCORES_PATH` controls where external scores are loaded from. If not set, external scores are not used.
61
-
-`AWS_S3_PREFIX` controls the prefix to use in the AWS S3 bucket (a prefix is a pseudo-directory in a bucket).
56
+
-`EPIDATR_USE_CACHE` controls whether `epidatr` functions use the cache.
57
+
-`DEBUG_MODE` controls whether `targets::tar_make` is run with the `callr_function=NULL`, which allows for `browser()`. It also disables parallelization. If you are developing, it is recommended to set this to true. If you are just running, it is recommended to set it to false.
58
+
-`USE_SHINY` controls whether we start a Shiny server after producing the targets.
59
+
-`TAR_PROJECT` controls which `targets` project is run by `run.R`.
60
+
-`EXTERNAL_SCORES_PATH` controls where external scores are loaded from. If not set, external scores are not used.
61
+
-`AWS_S3_PREFIX` controls the prefix to use in the AWS S3 bucket (a prefix is a pseudo-directory in a bucket).
62
62
63
63
## Development
64
64
65
65
### Directory Layout
66
66
67
-
-`run.R` and `Makefile`: the main entrypoint for all pipelines
68
-
-`R/`: R package code to be reused
69
-
-`scripts/`: plotting, code, and misc.
70
-
-`tests/`: package tests
71
-
-`covid_hosp_explore/` and `covid_hosp_explore.R`: a `targets` project for exploring covid hospitalization forecasters
72
-
-`flu_hosp_explore/` and `flu_hosp_explore.R`: a `targets` project for exploring flu hospitalization forecasters
73
-
-`covid_hosp_prod/` and `covid_hosp_prod.R`: a `targets` project for predicting covid hospitalizations
74
-
-`flu_hosp_prod/` and `flu_hosp_prod.R`: a `targets` project for predicting flu hospitalizations
75
-
-`forecaster_testing/` and `forecaster_testing.R`: a `targets` project for testing forecasters
67
+
-`run.R` and `Makefile`: the main entrypoint for all pipelines
68
+
-`R/`: R package code to be reused
69
+
-`scripts/`: plotting, code, and misc.
70
+
-`tests/`: package tests
71
+
-`covid_hosp_explore/` and `covid_hosp_explore.R`: a `targets` project for exploring covid hospitalization forecasters
72
+
-`flu_hosp_explore/` and `flu_hosp_explore.R`: a `targets` project for exploring flu hospitalization forecasters
73
+
-`covid_hosp_prod/` and `covid_hosp_prod.R`: a `targets` project for predicting covid hospitalizations
74
+
-`flu_hosp_prod/` and `flu_hosp_prod.R`: a `targets` project for predicting flu hospitalizations
75
+
-`forecaster_testing/` and `forecaster_testing.R`: a `targets` project for testing forecasters
76
76
77
77
### Parallelization Gotchas
78
78
@@ -84,6 +84,7 @@ It is safest to develop with parallelism disabled.
84
84
Targets in parallel mode has two problems when it comes to debugging: 1) it ignores browsers, so you can't step through functions and 2) reloading any changes requires both `renv::install(".")` and restarting R.
85
85
86
86
To debug a target named `yourTarget`:
87
+
87
88
1. set `DEBUG_MODE=true`
88
89
2. insert a browser in the relevant function
89
90
3. run an R session, and call `tar_make(yourTarget)`
0 commit comments