Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overwrite pipeline at every execute_pipeline call #51

Open
stemangiola opened this issue Apr 9, 2024 · 4 comments
Open

Overwrite pipeline at every execute_pipeline call #51

stemangiola opened this issue Apr 9, 2024 · 4 comments
Assignees

Comments

@stemangiola
Copy link
Collaborator

@susansjy22 for the reasons we have discussed at the meeting let's overwrite the pipeline scraped every time we call the function so the bugging option can work properly.

We do not need to touch the store, just the R target script

@susansjy22
Copy link
Collaborator

Would using tar_invalidate(names = target_to_overwrite, store = store) address this? I think Targets caches the results of each pipeline run for efficiency when debugging a specific target, because not all of the previous targets to be re-run. Documentation for tar_invalidate: https://rdrr.io/cran/targets/man/tar_invalidate.html

@stemangiola
Copy link
Collaborator Author

stemangiola commented May 22, 2024

Nom, to overwrite the pipeline (not the targets) ()the pipeline is a R file, you do tar_script(ask=FALSE), which you already doing.

So if you remove the debug , the pipeline should not consider it anymore.

you can actually verify it, by opening manually your

script = glue("{store}.R")

after doing debug (you should see the debug call)

and after not using debug

that debug call must disappear from the file, automatically

@myushen
Copy link
Contributor

myushen commented May 23, 2024

so the idea of this issue is to overwrite the script.R every time running the pipeline right? In your example @stemangiola , if removing a parameter e.g debug_step entirely in a second run , it should not exist in script.R

@stemangiola
Copy link
Collaborator Author

so the idea of this issue is to overwrite the script.R every time running the pipeline right? In your example @stemangiola , if removing a parameter e.g debug_step entirely in a second run , it should not exist in script.R

correct.

The script glue("{store}.R")

should be updated to reflect that we switch on and off the debug

but this should already be happening! according to the code in github

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants