Skip to content

Commit

Permalink
Deploying to gh-pages from @ 48dc0b1 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
wlandau committed Mar 29, 2024
1 parent feab81b commit 744d4ba
Show file tree
Hide file tree
Showing 23 changed files with 151 additions and 122 deletions.
2 changes: 1 addition & 1 deletion cloud-storage.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>

<meta charset="utf-8">
<meta name="generator" content="quarto-1.4.551">
<meta name="generator" content="quarto-1.4.552">

<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">

Expand Down
21 changes: 11 additions & 10 deletions crew.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>

<meta charset="utf-8">
<meta name="generator" content="quarto-1.4.551">
<meta name="generator" content="quarto-1.4.552">

<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">

Expand Down Expand Up @@ -102,6 +102,7 @@
"search-label": "Search"
}
}</script>
<link href="site_libs/htmltools-fill-0.5.8/fill.css" rel="stylesheet">
<script src="site_libs/htmlwidgets-1.6.4/htmlwidgets.js"></script>
<link href="site_libs/vis-9.1.0/vis-network.min.css" rel="stylesheet">
<script src="site_libs/vis-9.1.0/vis-network.min.js"></script>
Expand Down Expand Up @@ -427,10 +428,10 @@ <h1 class="title"><span id="crew" class="quarto-section-identifier"><span class=
<section id="how-it-works" class="level2" data-number="13.1">
<h2 data-number="13.1" class="anchored" data-anchor-id="how-it-works"><span class="header-section-number">13.1</span> How it works</h2>
<ol type="1">
<li>Write your pipeline as usual, but set the <code>controller</code> argument of <a href="https://docs.ropensci.org/targets/reference/tar_option_set.html"><code>tar_option_set</code></a> to the <a href="https://books.ropensci.org/crew/"><code>crew</code></a> controller of your choice.</li>
<li>Write your pipeline as usual, but set the <code>controller</code> argument of <a href="https://docs.ropensci.org/targets/reference/tar_option_set.html"><code>tar_option_set</code></a> to the <a href="https://wlandau.github.io/crew/"><code>crew</code></a> controller of your choice.</li>
<li>Run the pipeline with a simple <a href="https://docs.ropensci.org/targets/reference/tar_make.html"><code>tar_make()</code></a>.</li>
</ol>
<p>The <a href="https://books.ropensci.org/crew/"><code>crew</code></a> controller from (1) allows <a href="https://docs.ropensci.org/targets/reference/tar_make.html"><code>tar_make()</code></a> to launch external R processes called “workers” which can each run one or more targets. By delegating long-running targets to these workers, the local R session is free to focus on other tasks, and the pipeline finishes faster.</p>
<p>The <a href="https://wlandau.github.io/crew/"><code>crew</code></a> controller from (1) allows <a href="https://docs.ropensci.org/targets/reference/tar_make.html"><code>tar_make()</code></a> to launch external R processes called “workers” which can each run one or more targets. By delegating long-running targets to these workers, the local R session is free to focus on other tasks, and the pipeline finishes faster.</p>
</section>
<section id="example" class="level2" data-number="13.2">
<h2 data-number="13.2" class="anchored" data-anchor-id="example"><span class="header-section-number">13.2</span> Example</h2>
Expand All @@ -457,8 +458,8 @@ <h2 data-number="13.2" class="anchored" data-anchor-id="example"><span class="he
<div class="sourceCode cell-code" id="cb3"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="co"># R console</span></span>
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a><span class="fu">tar_visnetwork</span>(<span class="at">targets_only =</span> <span class="cn">TRUE</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output-display">
<div class="visNetwork html-widget html-fill-item" id="htmlwidget-53657be8cf9c4418922a" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-53657be8cf9c4418922a">{"x":{"nodes":{"name":["data","model1","model2","model3","plot1","plot2","plot3"],"type":["stem","stem","stem","stem","stem","stem","stem"],"description":[null,null,null,null,null,null,null],"status":["outdated","outdated","outdated","outdated","outdated","outdated","outdated"],"seconds":[null,null,null,null,null,null,null],"bytes":[null,null,null,null,null,null,null],"branches":[null,null,null,null,null,null,null],"label":["data","model1","model2","model3","plot1","plot2","plot3"],"color":["#78B7C5","#78B7C5","#78B7C5","#78B7C5","#78B7C5","#78B7C5","#78B7C5"],"id":["data","model1","model2","model3","plot1","plot2","plot3"],"level":[1,2,2,2,3,3,3],"shape":["dot","dot","dot","dot","dot","dot","dot"]},"edges":{"from":["data","model1","data","model2","data","model3"],"to":["model1","plot1","model2","plot2","model3","plot3"],"arrows":["to","to","to","to","to","to"]},"nodesToDataframe":true,"edgesToDataframe":true,"options":{"width":"100%","height":"100%","nodes":{"shape":"dot","physics":false},"manipulation":{"enabled":false},"edges":{"smooth":{"type":"cubicBezier","forceDirection":"horizontal"}},"physics":{"stabilization":false},"interaction":{"zoomSpeed":1},"layout":{"hierarchical":{"enabled":true,"direction":"LR"}}},"groups":null,"width":null,"height":null,"idselection":{"enabled":false,"style":"width: 150px; height: 26px","useLabels":true,"main":"Select by id"},"byselection":{"enabled":false,"style":"width: 150px; height: 26px","multiple":false,"hideColor":"rgba(200,200,200,0.5)","highlight":false},"main":{"text":"","style":"font-family:Georgia, Times New Roman, Times, serif;font-weight:bold;font-size:20px;text-align:center;"},"submain":null,"footer":null,"background":"rgba(0, 0, 0, 0)","highlight":{"enabled":true,"hoverNearest":false,"degree":{"from":1,"to":1},"algorithm":"hierarchical","hideColor":"rgba(200,200,200,0.5)","labelOnly":true},"collapse":{"enabled":true,"fit":false,"resetHighlight":true,"clusterOptions":null,"keepCoord":true,"labelSuffix":"(cluster)"},"legend":{"width":0.2,"useGroups":false,"position":"right","ncol":1,"stepX":100,"stepY":100,"zoom":true,"nodes":{"label":["Outdated","Stem"],"color":["#78B7C5","#899DA4"],"shape":["dot","dot"]},"nodesToDataframe":true},"tooltipStay":300,"tooltipStyle":"position: fixed;visibility:hidden;padding: 5px;white-space: nowrap;font-family: verdana;font-size:14px;font-color:#000000;background-color: #f5f4ed;-moz-border-radius: 3px;-webkit-border-radius: 3px;border-radius: 3px;border: 1px solid #808074;box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2);"},"evals":[],"jsHooks":[]}</script>
<div class="visNetwork html-widget html-fill-item" id="htmlwidget-e8bcea5161fde5108fb5" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-e8bcea5161fde5108fb5">{"x":{"nodes":{"name":["data","model1","model2","model3","plot1","plot2","plot3"],"type":["stem","stem","stem","stem","stem","stem","stem"],"description":[null,null,null,null,null,null,null],"status":["outdated","outdated","outdated","outdated","outdated","outdated","outdated"],"seconds":[null,null,null,null,null,null,null],"bytes":[null,null,null,null,null,null,null],"branches":[null,null,null,null,null,null,null],"label":["data","model1","model2","model3","plot1","plot2","plot3"],"color":["#78B7C5","#78B7C5","#78B7C5","#78B7C5","#78B7C5","#78B7C5","#78B7C5"],"id":["data","model1","model2","model3","plot1","plot2","plot3"],"level":[1,2,2,2,3,3,3],"shape":["dot","dot","dot","dot","dot","dot","dot"]},"edges":{"from":["data","model1","data","model2","data","model3"],"to":["model1","plot1","model2","plot2","model3","plot3"],"arrows":["to","to","to","to","to","to"]},"nodesToDataframe":true,"edgesToDataframe":true,"options":{"width":"100%","height":"100%","nodes":{"shape":"dot","physics":false},"manipulation":{"enabled":false},"edges":{"smooth":{"type":"cubicBezier","forceDirection":"horizontal"}},"physics":{"stabilization":false},"interaction":{"zoomSpeed":1},"layout":{"hierarchical":{"enabled":true,"direction":"LR"}}},"groups":null,"width":null,"height":null,"idselection":{"enabled":false,"style":"width: 150px; height: 26px","useLabels":true,"main":"Select by id"},"byselection":{"enabled":false,"style":"width: 150px; height: 26px","multiple":false,"hideColor":"rgba(200,200,200,0.5)","highlight":false},"main":{"text":"","style":"font-family:Georgia, Times New Roman, Times, serif;font-weight:bold;font-size:20px;text-align:center;"},"submain":null,"footer":null,"background":"rgba(0, 0, 0, 0)","highlight":{"enabled":true,"hoverNearest":false,"degree":{"from":1,"to":1},"algorithm":"hierarchical","hideColor":"rgba(200,200,200,0.5)","labelOnly":true},"collapse":{"enabled":true,"fit":false,"resetHighlight":true,"clusterOptions":null,"keepCoord":true,"labelSuffix":"(cluster)"},"legend":{"width":0.2,"useGroups":false,"position":"right","ncol":1,"stepX":100,"stepY":100,"zoom":true,"nodes":{"label":["Outdated","Stem"],"color":["#78B7C5","#899DA4"],"shape":["dot","dot"]},"nodesToDataframe":true},"tooltipStay":300,"tooltipStyle":"position: fixed;visibility:hidden;padding: 5px;white-space: nowrap;font-family: verdana;font-size:14px;font-color:#000000;background-color: #f5f4ed;-moz-border-radius: 3px;-webkit-border-radius: 3px;border-radius: 3px;border: 1px solid #808074;box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2);"},"evals":[],"jsHooks":[]}</script>
</div>
</div>
<p>Run the pipeline with a simple call to <a href="https://docs.ropensci.org/targets/reference/tar_make.html"><code>tar_make()</code></a>. Please note that real-life pipelines will have longer execution times, especially for the models.</p>
Expand All @@ -468,20 +469,20 @@ <h2 data-number="13.2" class="anchored" data-anchor-id="example"><span class="he
</div>
<div class="cell">
<pre><code>#&gt; ▶ dispatched target data
#&gt; ● completed target data [0.001 seconds]
#&gt; ● completed target data [0 seconds]
#&gt; ▶ dispatched target model1
#&gt; ● completed target model1 [0 seconds]
#&gt; ▶ dispatched target model2
#&gt; ● completed target model2 [0 seconds]
#&gt; ▶ dispatched target model3
#&gt; ● completed target model3 [0 seconds]
#&gt; ▶ dispatched target plot1
#&gt; ● completed target plot1 [0 seconds]
#&gt; ● completed target plot1 [0.001 seconds]
#&gt; ▶ dispatched target plot2
#&gt; ● completed target plot2 [0 seconds]
#&gt; ● completed target plot2 [0.001 seconds]
#&gt; ▶ dispatched target plot3
#&gt; ● completed target plot3 [0 seconds]
#&gt; ▶ ended pipeline [0.083 seconds]</code></pre>
#&gt; ▶ ended pipeline [0.086 seconds]</code></pre>
</div>
<p>Let’s talk through what happens in the above call to <a href="https://docs.ropensci.org/targets/reference/tar_make.html"><code>tar_make()</code></a>. First, a new worker launches and sends the <code>data</code> target to the <code>crew</code> queue. After the <code>data</code> target completes, all three models are ready to begin. A second worker automatically launches to meet the increased demand of the workload, and each of the two workers starts to run a model. After one of the models finishes, its worker is free to either run the downstream plot or the third model. The process continues until all the targets are complete. The workers shut down when the pipeline is done.</p>
</section>
Expand Down Expand Up @@ -637,7 +638,7 @@ <h2 data-number="13.5" class="anchored" data-anchor-id="heterogeneous-workers"><
</section>
<section id="thanks" class="level2" data-number="13.6">
<h2 data-number="13.6" class="anchored" data-anchor-id="thanks"><span class="header-section-number">13.6</span> Thanks</h2>
<p>The <a href="https://books.ropensci.org/crew/"><code>crew</code></a> package is an extension of <a href="https://github.com/shikokuchuo/mirai"><code>mirai</code></a>, a sleek and sophisticated task scheduler that efficiently processes intense workloads. <a href="https://books.ropensci.org/crew/"><code>crew</code></a> is only possible because of the amazing work by <a href="https://github.com/shikokuchuo">Charlie Gao</a> in packages <a href="https://github.com/shikokuchuo/mirai"><code>mirai</code></a> and <a href="https://github.com/shikokuchuo/nanonext"><code>nanonext</code></a>.</p>
<p>The <a href="https://wlandau.github.io/crew/"><code>crew</code></a> package is an extension of <a href="https://github.com/shikokuchuo/mirai"><code>mirai</code></a>, a sleek and sophisticated task scheduler that efficiently processes intense workloads. <a href="https://wlandau.github.io/crew/"><code>crew</code></a> is only possible because of the amazing work by <a href="https://github.com/shikokuchuo">Charlie Gao</a> in packages <a href="https://github.com/shikokuchuo/mirai"><code>mirai</code></a> and <a href="https://github.com/shikokuchuo/nanonext"><code>nanonext</code></a>.</p>


</section>
Expand Down
9 changes: 5 additions & 4 deletions data.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>

<meta charset="utf-8">
<meta name="generator" content="quarto-1.4.551">
<meta name="generator" content="quarto-1.4.552">

<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">

Expand Down Expand Up @@ -102,6 +102,7 @@
"search-label": "Search"
}
}</script>
<link href="site_libs/htmltools-fill-0.5.8/fill.css" rel="stylesheet">
<script src="site_libs/htmlwidgets-1.6.4/htmlwidgets.js"></script>
<link href="site_libs/vis-9.1.0/vis-network.min.css" rel="stylesheet">
<script src="site_libs/vis-9.1.0/vis-network.min.js"></script>
Expand Down Expand Up @@ -447,7 +448,7 @@ <h2 data-number="10.2" class="anchored" data-anchor-id="local-data-store"><span
<p><code>tar_make()</code> does the following:</p>
<ol type="1">
<li>Run the command of <code>target1</code> and observe a return value of <code>57</code>.</li>
<li>Save the value <code>57</code> to <code>_targets/objects/target1</code> using <a href="https://stat.ethz.ch/R-manual/R-devel/library/base/html/saveRDS.html">saveRDS()</a>.</li>
<li>Save the value <code>57</code> to <code>_targets/objects/target1</code> using <a href="https://stat.ethz.ch/R-manual/R-devel/library/base/help/readRDS.html">saveRDS()</a>.</li>
<li>Append a line to <code>_targets/meta/meta</code> containing the hash, time stamp, file size, warnings, errors, and execution time of <code>target1</code>.</li>
<li>Append a line to <code>_targets/meta/progress</code> to indicate that <code>target1</code> finished.</li>
</ol>
Expand Down Expand Up @@ -489,8 +490,8 @@ <h2 data-number="10.3" class="anchored" data-anchor-id="external-files"><span cl
</div>
<div class="cell">
<div class="cell-output-display">
<div class="visNetwork html-widget html-fill-item" id="htmlwidget-82451a6de1c8a6682279" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-82451a6de1c8a6682279">{"x":{"nodes":{"name":["input","output","create_output"],"type":["stem","stem","function"],"description":[null,null,null],"status":["outdated","outdated","outdated"],"seconds":[null,null,null],"bytes":[null,null,null],"branches":[null,null,null],"label":["input","output","create_output"],"color":["#78B7C5","#78B7C5","#78B7C5"],"id":["input","output","create_output"],"level":[1,2,1],"shape":["dot","dot","triangle"]},"edges":{"from":["create_output","input"],"to":["output","output"],"arrows":["to","to"]},"nodesToDataframe":true,"edgesToDataframe":true,"options":{"width":"100%","height":"100%","nodes":{"shape":"dot","physics":false},"manipulation":{"enabled":false},"edges":{"smooth":{"type":"cubicBezier","forceDirection":"horizontal"}},"physics":{"stabilization":false},"interaction":{"zoomSpeed":1},"layout":{"hierarchical":{"enabled":true,"direction":"LR"}}},"groups":null,"width":null,"height":null,"idselection":{"enabled":false,"style":"width: 150px; height: 26px","useLabels":true,"main":"Select by id"},"byselection":{"enabled":false,"style":"width: 150px; height: 26px","multiple":false,"hideColor":"rgba(200,200,200,0.5)","highlight":false},"main":{"text":"","style":"font-family:Georgia, Times New Roman, Times, serif;font-weight:bold;font-size:20px;text-align:center;"},"submain":null,"footer":null,"background":"rgba(0, 0, 0, 0)","highlight":{"enabled":true,"hoverNearest":false,"degree":{"from":1,"to":1},"algorithm":"hierarchical","hideColor":"rgba(200,200,200,0.5)","labelOnly":true},"collapse":{"enabled":true,"fit":false,"resetHighlight":true,"clusterOptions":null,"keepCoord":true,"labelSuffix":"(cluster)"},"legend":{"width":0.2,"useGroups":false,"position":"right","ncol":1,"stepX":100,"stepY":100,"zoom":true,"nodes":{"label":["Outdated","Stem","Function"],"color":["#78B7C5","#899DA4","#899DA4"],"shape":["dot","dot","triangle"]},"nodesToDataframe":true},"tooltipStay":300,"tooltipStyle":"position: fixed;visibility:hidden;padding: 5px;white-space: nowrap;font-family: verdana;font-size:14px;font-color:#000000;background-color: #f5f4ed;-moz-border-radius: 3px;-webkit-border-radius: 3px;border-radius: 3px;border: 1px solid #808074;box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2);"},"evals":[],"jsHooks":[]}</script>
<div class="visNetwork html-widget html-fill-item" id="htmlwidget-80f582d101a2dade4314" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-80f582d101a2dade4314">{"x":{"nodes":{"name":["input","output","create_output"],"type":["stem","stem","function"],"description":[null,null,null],"status":["outdated","outdated","outdated"],"seconds":[null,null,null],"bytes":[null,null,null],"branches":[null,null,null],"label":["input","output","create_output"],"color":["#78B7C5","#78B7C5","#78B7C5"],"id":["input","output","create_output"],"level":[1,2,1],"shape":["dot","dot","triangle"]},"edges":{"from":["create_output","input"],"to":["output","output"],"arrows":["to","to"]},"nodesToDataframe":true,"edgesToDataframe":true,"options":{"width":"100%","height":"100%","nodes":{"shape":"dot","physics":false},"manipulation":{"enabled":false},"edges":{"smooth":{"type":"cubicBezier","forceDirection":"horizontal"}},"physics":{"stabilization":false},"interaction":{"zoomSpeed":1},"layout":{"hierarchical":{"enabled":true,"direction":"LR"}}},"groups":null,"width":null,"height":null,"idselection":{"enabled":false,"style":"width: 150px; height: 26px","useLabels":true,"main":"Select by id"},"byselection":{"enabled":false,"style":"width: 150px; height: 26px","multiple":false,"hideColor":"rgba(200,200,200,0.5)","highlight":false},"main":{"text":"","style":"font-family:Georgia, Times New Roman, Times, serif;font-weight:bold;font-size:20px;text-align:center;"},"submain":null,"footer":null,"background":"rgba(0, 0, 0, 0)","highlight":{"enabled":true,"hoverNearest":false,"degree":{"from":1,"to":1},"algorithm":"hierarchical","hideColor":"rgba(200,200,200,0.5)","labelOnly":true},"collapse":{"enabled":true,"fit":false,"resetHighlight":true,"clusterOptions":null,"keepCoord":true,"labelSuffix":"(cluster)"},"legend":{"width":0.2,"useGroups":false,"position":"right","ncol":1,"stepX":100,"stepY":100,"zoom":true,"nodes":{"label":["Outdated","Stem","Function"],"color":["#78B7C5","#899DA4","#899DA4"],"shape":["dot","dot","triangle"]},"nodesToDataframe":true},"tooltipStay":300,"tooltipStyle":"position: fixed;visibility:hidden;padding: 5px;white-space: nowrap;font-family: verdana;font-size:14px;font-color:#000000;background-color: #f5f4ed;-moz-border-radius: 3px;-webkit-border-radius: 3px;border-radius: 3px;border: 1px solid #808074;box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2);"},"evals":[],"jsHooks":[]}</script>
</div>
</div>
<p>Before the pipeline first runs, <code>data.csv</code> exists, but <code>output.csv</code> does not. During <code>tar_make()</code>, the <code>input</code> target tracks <code>data.csv</code>, and the <code>output</code> target creates and tracks <code>output.csv</code>. If <code>data.csv</code> changes before the next <code>tar_make()</code>, then both <code>input</code> and <code>output</code> rerun. If something outside the pipeline changes <code>output.csv</code>, then <code>output</code> reruns.</p>
Expand Down
2 changes: 1 addition & 1 deletion debugging.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>

<meta charset="utf-8">
<meta name="generator" content="quarto-1.4.551">
<meta name="generator" content="quarto-1.4.552">

<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">

Expand Down
Loading

0 comments on commit 744d4ba

Please sign in to comment.