Skip to content
Discussion options

You must be logged in to vote

The targets in the pipeline depend on the global objects in memory that _targets.R populates. Most of those objects are functions, but in your case, you also have a large model. To properly track dependencies, targets hashes those in-memory dependencies. So if you create the model as an object in memory, every call to tar_make() will hash the object. I would recommend including it in the pipeline and tracking the input file for changes.

library(targets)
library(tarchetypes)

list(
  tar_target(large_model_file, "large_model.rds", format = "file"),
  tar_target(large_model, readRDS(large_model_file))
)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@eheinzen
Comment options

Answer selected by eheinzen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants