ropensci-books / targets Goto Github PK
View Code? Open in Web Editor NEWUser manual of the targets R pacakge
Home Page: https://books.ropensci.org/targets
License: Other
User manual of the targets R pacakge
Home Page: https://books.ropensci.org/targets
License: Other
Even if the targetopia is mentioned twice in the book, I'd find it useful to see a sentence about it in the introduction, especially to put tarchetypes on readers' radar early on?
The issue of managing sub-projects comes up a lot, and I think I should write a chapter to explain best practices. This chapter would also cover YAML-based configuration, e.g. _targets.yaml
/tar_config_get()
/tar_config_set()
. I plan to write it sometime after I address these issues:
Chapter 2 mentions a targets-minimal repo that contains the source code and data for the walkthrough example, but the link fails.
Please describe the potential feature.
To help us read any code you include (optional) please try to follow the tidyverse style guide. The style_text()
and style_file()
functions from the styler
package make it easier.
The current comparison with drake does not include the many arguments of drake::make
that may or may not have been implemented elsewhere in targets
. For example, I recently learned about tar_option_set(storage = "remote", retrieval = "remote")
. The proposal is to include the arguments of make
in the "What about drake?" section.
After tarchetypes
becomes open source.
I propose adding a new "Edge cases that fail" subsection to the walkthrough chapter (or elsewhere), and collating all code dependencies failure cases there.
This could include:
pkg::func()
breaking thingstargets
does not correctly invalidate targets generated by S3 methods when those methods get updated.For the second, consider
library(targets)
my_generic <- function(x) {
UseMethod("my_generic")
}
my_generic.default <- function(x) {
sum(x^3)
}
list(
tar_target(
vec,
rnorm(100)
),
tar_target(
result,
my_generic(vec)
)
)
Run tar_make()
, change my_generic.default()
to anything you want, and note that running tar_make()
again does not re-run the result
target.
I will be on vacation from September 13 through 20, and I will not have internet access most of the time. If you have experience with targets
, it would be great if you would help answer new questions posted to issues and discussions. There are few new posts in a typical week. Thanks in advance.
Line 5 in e88de5e
Suggested changes in bold here:
targets
is the successor of drake
, an older pipeline tool. drake
is superseded, which means there are no plans for new features or discretionary enhancements, but basic maintenance and support and will continue indefinitely. Existing projects that use drake
can safely continue to use drake
, and there is no need to retrofit targets
. New projects should use targets
because it is friendlier and more robust.
Chapter 5 header in table of contents hyperlinks to Section 2.2.
code of conduct issue templates, etc.
The section "Target script file" from Ch. 2 suggests loading packages other than targets via tar_option_set
instead of library
.
https://books.ropensci.org/targets/walkthrough.html#target-script-file
However, the section "Workspace" from Ch. 4 is using library(tidyverse)
in _targets.R
.
https://books.ropensci.org/targets/debugging.html#workspaces
I'd suggest the change below.
Please describe the issue.
To help us read any code you include (optional) please try to follow the tidyverse style guide. The style_text()
and style_file()
functions from the styler
package make it easier.
Looks like there's just a typo here:
I would even just say targets::tar_make(callr_function = NULL)
there
tar_rep()
, tar_map()
, and tar_combine()
in tarchetypes
.
There is a community misconception that targets
(and drake
) do not have HPC capabilities beyond parallel computing over the cores of a single local machine. On the contrary, both tools support distributed computing on clusters (guides here and here) and the workers do not necessarily need access to the file system of the master process. (In fact, I designed targets
with an efficient dynamic branching model to go beyond the inherent limitations of map-reduce-like scheduling algorithms and conserve computing resources.) However, I do realize that data scientists from smaller institutions do not always have access to clusters, and an increasing number of folks use AWS. AWS ParallelCluster could be a way to deploy pipelines to the cloud without any need to modify targets
itself. If it works, we should probably write a tutorial either in the existing HPC chapter or a chapter of its own.
ropensci/tarchetypes#8 could be an alternative way to deploy to AWS. The advantage of ropensci/tarchetypes#8 is that we should also get the data versioning capabilities of Metaflow for free, and Metaflow may take care of a lot of the AWS setup. However, each new tar_metaflow()
will require its own local R worker in order to avoid blocking the master process, which is not ideal.
I am getting started with targets (such a cool package / ecosystem of packages!) and started wondering how to create a target with a cue that'd be different from the ones in targets, then I discovered https://docs.ropensci.org/tarchetypes/reference/index.html#section-targets-with-custom-invalidation-rules which is exactly what I need. Should these functions be mentioned from
Talk about https://stackoverflow.com/questions/63293094/how-do-i-read-dynamic-files-in-drake in branching.Rmd
.
The hyperlink is faulty in Chapter 2.4 due to a missing "s" in the hyperlink.
Line 155 in 850c778
The same sentence should be fixed in both lines, "workers do no have access" to "workers do not have access".
Line 322 in efdb2d4
Line 323 in efdb2d4
Explain how to debug tar_rep()
and friends, especially after ropensci/tarchetypes#111. Also explain how to get help: GitHub discussions, reprexes, etc.
The link to Appendix C (Target Markdown) is broken because the heading hash identifier (#markdown
) is not defined in markdown.qmd
. I will create a pull request; please review.
In https://books.ropensci.org/targets/walkthrough.html#read-your-data it seems tar_read()
is only for exploratory analysis, but it's actually recommended for R Markdown reports. Maybe this section should have a footnote/link to the section about literate programming?
Then, I've learnt (in rOpenSci slack) that using tar_read()
in a helper function is an anti-pattern, that if a function uses a target the target should be an argument. Would this tip/warning have its place somewhere? (maybe in best practice; as well as in https://books.ropensci.org/targets/practices.html#dependencies?)
Hi,
I was just having a read through of this documentation. It seems to me like perhaps this link should point to https://books.ropensci.org/targets/functions.html and not https://books.ropensci.org/targets/debugging.html#functions
Please ignore if I'm mistaken about this!
Thanks ๐
Please describe the bug.
The user manual is a great resource. Thanks for putting it together. Noticed this minor repeated word typo in the debugging chapter the other day.
Provide a minimal reproducible example with code and output that demonstrates the problem. The reprex()
function from the reprex
package is extremely helpful for this.
To help us read your code, please follow the tidyverse style guide. The style_text()
and style_file()
functions from the styler
package make it easier.
What should have happened? Please be as specific as possible.
sessionInfo()
or reprex(si = TRUE)
.traceback()
or rlang::trace_back()
.targets
currently installed. packageDescription("targets")$GithubSHA1
shows you this.A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.