View source: R/progress_iter.R
| tulpa_iter_progress | R Documentation |
Build a progress reporter for a counted R loop (an EM iteration, a
per-species outer loop, ...) – the R-side counterpart of the C++
tulpa_progress::GridProgress reporter, sharing its wire format so a
detached reader sees the same heartbeat file regardless of which kind of
loop produced it. Config comes from the scoped tulpa.nl_progress option
(progress, progress_file, progress_every, progress_throttle); a
caller outside tulpa's own control$progress machinery sets the same
option to opt in.
Two independently gated channels: a console bar, emitted when progress
is set on the option, and a heartbeat file, written whenever
progress_file is non-empty regardless of progress – a file write
survives a detached Start-Process / nohup stdout buffer where a
console flush does not, so it is the only liveness signal on a headless
box.
tulpa_iter_progress(label, total, unit = "iter", threads = 1L)
label |
Short name for the loop, shown in the console line. |
total |
Iteration denominator (e.g. |
unit |
Name for one step in the console line ( |
threads |
Active outer-thread count. When |
A list of two closures: tick(), called once per completed step,
and finish(), called once after the loop (forces a final
100%/heartbeat emit). When neither channel is requested both are
zero-overhead no-ops.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.