diff --git a/pkgdown.yml b/pkgdown.yml index c413854..2f546ca 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -2,7 +2,7 @@ pandoc: 2.19.2 pkgdown: 2.0.7 pkgdown_sha: ~ articles: {} -last_built: 2023-10-19T07:22Z +last_built: 2023-10-22T11:06Z urls: reference: https://mlr3.mlr-org.com/reference article: https://mlr3.mlr-org.com/articles diff --git a/reference/Rush.html b/reference/Rush.html index ac95856..3eb6eaa 100644 --- a/reference/Rush.html +++ b/reference/Rush.html @@ -206,6 +206,11 @@

Public fieldsActive bindings

n_workers

(integer(1))
+Number of workers.

+ + +
n_running_workers
+

(integer(1))
Number of running workers.

@@ -214,6 +219,31 @@

Active bindings +
running_worker_ids
+

(character())
+Ids of running workers.

+ + +
terminated_worker_ids
+

(character())
+Ids of terminated workers.

+ + +
killed_worker_ids
+

(character())
+Ids of killed workers.

+ + +
lost_worker_ids
+

(character())
+Ids of lost workers.

+ + +
tasks
+

(character())
+Keys of all tasks.

+ +
queued_tasks

(character())
Keys of queued tasks.

@@ -234,11 +264,6 @@

Active bindings -
tasks
-

(character())
-Keys of all tasks.

- -
n_queued_tasks

(integer(1))
Number of queued tasks.

@@ -585,8 +610,9 @@

ArgumentsMethod detect_lost_workers()

Detect lost workers. The state of the worker is changed to "lost". -Local workers without a heartbeat are checked with tools::pskill(). -Checking local workers on windows might be very slow. +Local workers without a heartbeat are checked by their process id. +Checking local workers on unix systems only takes a few microseconds per worker. +But checking local workers on windows might be very slow. Workers with a heartbeat process are checked with the heartbeat.

Usage

Rush$detect_lost_workers()

@@ -665,8 +691,9 @@

ReturnsMethod push_priority_tasks()

Pushes a task to the queue of a specific worker. Task is added to queued priority tasks. -A worker evaluates the tasks in the priority queue before the normal queue. -If priority is NA the task is added to the normal queue.

+A worker evaluates the tasks in the priority queue before the shared queue. +If priority is NA the task is added to the shared queue. +If the worker is lost or worker id is not known, the task is added to the shared queue.

Usage

Rush$push_priority_tasks(xss, extra = NULL, priority = NULL)

diff --git a/search.json b/search.json index 478b1ee..13429c3 100644 --- a/search.json +++ b/search.json @@ -1 +1 @@ -[{"path":"https://mlr3.mlr-org.com/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Marc Becker. Maintainer, author.","code":""},{"path":"https://mlr3.mlr-org.com/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Becker M (2023). rush: Parallele Programmierung. R package version 0.0.0.9000.","code":"@Manual{, title = {rush: Parallele Programmierung}, author = {Marc Becker}, year = {2023}, note = {R package version 0.0.0.9000}, }"},{"path":"https://mlr3.mlr-org.com/index.html","id":"rush","dir":"","previous_headings":"","what":"Parallele Programmierung","title":"Parallele Programmierung","text":"rush package parallel distributed computing R. evaluates R expression asynchronously cluster workers provides shared storage workers. shared storage Redis data base. Rush offers centralized decentralized network architecture. centralized network single controller (Rush) multiple workers (RushWorker). Tasks created centrally distributed workers controller. decentralized network controller. workers sample tasks communicate results asynchronously workers.","code":""},{"path":"https://mlr3.mlr-org.com/index.html","id":"features","dir":"","previous_headings":"","what":"Features","title":"Parallele Programmierung","text":"Parallelize arbitrary R expressions. Centralized decentralized network architecture. Small overhead milliseconds per task. Easy starting workers future package. Start workers platform batch script. Designed work data.table. Results cached R session minimize read write operations. Detect recover worker failures. Start heartbeats monitor workers remote machines. Snapshot -memory data base disk. Store lgr messages workers Redis data base. Light dependencies.","code":""},{"path":"https://mlr3.mlr-org.com/index.html","id":"install","dir":"","previous_headings":"","what":"Install","title":"Parallele Programmierung","text":"Install development version GitHub. install Redis.","code":"remotes::install_github(\"mlr-org/rush\")"},{"path":"https://mlr3.mlr-org.com/index.html","id":"centralized-rush-network","dir":"","previous_headings":"","what":"Centralized Rush Network","title":"Parallele Programmierung","text":"Centralized network single controller three workers. example shows evaluation simple function centralized network. network_id identifies instance workers network. config list parameters connection Redis. Next, define function want evaluate workers. start two workers future package. Now can push tasks workers. retrieve results.","code":"library(rush) config = redux::redis_config() rush = Rush$new(network_id = \"test\", config) rush ## ## * Running Workers: 0 ## * Queued Tasks: 0 ## * Queued Priority Tasks: 0 ## * Running Tasks: 0 ## * Finished Tasks: 0 ## * Failed Tasks: 0 fun = function(x1, x2, ...) { list(y = x1 + x2) } future::plan(\"multisession\", workers = 2) rush$start_workers(fun = fun) xss = list(list(x1 = 3, x2 = 5), list(x1 = 4, x2 = 6)) keys = rush$push_tasks(xss) rush$await_tasks(keys) rush$fetch_finished_tasks() ## x1 x2 pid worker_id y status ## 1: 3 5 224861 aaa9bbea-ab25-4c47-a9ef-2cde95ee7144 8 finished ## 2: 4 6 234065 858f7aa4-18bd-48e0-a69f-0f0297a9051c 10 finished ## keys ## 1: c37c5467-693d-4df9-a1f6-fd2a5d0aaf65 ## 2: 0bd23506-eecb-42ee-beba-a37be45b51b8"},{"path":"https://mlr3.mlr-org.com/index.html","id":"decentralized-rush-network","dir":"","previous_headings":"","what":"Decentralized Rush Network","title":"Parallele Programmierung","text":"Decentralized network four workers.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":null,"dir":"Reference","previous_headings":"","what":"Rush Controller — Rush","title":"Rush Controller — Rush","text":"Rush controller centralized rush network. controller starts stops workers, pushes tasks workers fetches results.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"local-workers","dir":"Reference","previous_headings":"","what":"Local Workers","title":"Rush Controller — Rush","text":"local worker runs machine controller. recommend use future package spawn local workers. future backend multisession spawns workers local machine. many rush workers can started future workers available.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"remote-workers","dir":"Reference","previous_headings":"","what":"Remote Workers","title":"Rush Controller — Rush","text":"remote worker runs different machine controller. Remote workers can started script future package. heartbeat process can kill remote workers. heartbeat process also monitors remote workers crashes.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"stopping-workers","dir":"Reference","previous_headings":"","what":"Stopping Workers","title":"Rush Controller — Rush","text":"Local remote workers can terminated $stop_workers(type = \"terminate\") method. workers evaluate currently running task terminate. option type = \"kill\" stops workers immediately. Killing local worker done tools::pskill() function. Remote workers killed pushing kill signal heartbeat process. Without heartbeat process remote worker killed (see section heartbeat).","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"heartbeat","dir":"Reference","previous_headings":"","what":"Heartbeat","title":"Rush Controller — Rush","text":"heartbeat process periodically signals worker still alive. implemented setting timeout heartbeat key. Furthermore, heartbeat process can kill worker.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"data-structure","dir":"Reference","previous_headings":"","what":"Data Structure","title":"Rush Controller — Rush","text":"Rush writes task result additional meta information Redis hash. key hash identifies task Rush. fields written different methods, e.g. $push_result() writes ys result available. value field serialized list e.g. unserializing xs gives list(x1 = 1, x2 = 2). data structure allows quickly convert hash row join multiple hashes table. example, three hashes example converted following table. Notice value field can store multiple columns table. methods $push_tasks() $push_results() write multiple hashes. example, $push_tasks(xss = list(list(x1 = 1, x2 = 2), list(x1 = 2, x2 = 2)) writes xs two hashes.","code":"key : xs | ys | extra | state | key | x1 | x2 | y | timestamp | state | | 1.. | 3 | 4 | 7 | 12:04:11 | finished | | 2.. | 1 | 4 | 5 | 12:04:12 | finished | | 3.. | 1 | 1 | 2 | 12:04:13 | finished |"},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"task-states","dir":"Reference","previous_headings":"","what":"Task States","title":"Rush Controller — Rush","text":"task can go four states \"queued\", \"running\", \"finished\" \"failed\". Internally, keys tasks pushed Redis lists sets keep track state. Queued tasks waiting evaluated. worker pops task queue changes state \"running\" evaluating task. task finished, state changed \"finished\" result written data base. task fails, state changed \"failed\"instead \"finished\"`.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"queues","dir":"Reference","previous_headings":"","what":"Queues","title":"Rush Controller — Rush","text":"Rush uses shared queue queue worker. shared queue used push tasks workers. first worker pops task shared queue evaluates task. worker queues used push tasks specific workers.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"fetch-tasks-and-results","dir":"Reference","previous_headings":"","what":"Fetch Tasks and Results","title":"Rush Controller — Rush","text":"$fetch_*() methods retrieve data Redis database. matching method defined task state e.g. $fetch_running_tasks() $fetch_finished_tasks(). result function evaluation needed, $fetch_results() $fetch_latest_results() faster. methods $fetch_results() $fetch_finished_tasks() cache already queried data. $block_*() variants wait new result available.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"error-handling","dir":"Reference","previous_headings":"","what":"Error Handling","title":"Rush Controller — Rush","text":"evaluating tasks distributed system, many things can go wrong. Simple R errors worker loop caught written archive. task marked \"failed\". connection worker lost, looks like task \"running\" forever. methods $detect_lost_workers() $detect_lost_tasks() detect lost workers. Running methods periodically adds small overhead.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"logging","dir":"Reference","previous_headings":"","what":"Logging","title":"Rush Controller — Rush","text":"worker logs messages written lgr package data base. lgr_thresholds argument defines logging level logger e.g. c(rush = \"debug\"). Saving log messages adds small overhead useful debugging. default, log messages stored.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"public-fields","dir":"Reference","previous_headings":"","what":"Public fields","title":"Rush Controller — Rush","text":"network_id (character(1)) Identifier rush network. config (redux::redis_config) Redis configuration options. connector (redux::redis_api) Returns connection Redis. promises (future::Future()) List futures running run_worker.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"Rush Controller — Rush","text":"n_workers (integer(1)) Number running workers. worker_ids (character()) Ids workers. queued_tasks (character()) Keys queued tasks. running_tasks (character()) Keys running tasks. finished_tasks (character()) Keys finished tasks. failed_tasks (character()) Keys failed tasks. tasks (character()) Keys tasks. n_queued_tasks (integer(1)) Number queued tasks. n_queued_priority_tasks (integer(1)) Number queued priority tasks. n_running_tasks (integer(1)) Number running tasks. n_finished_tasks (integer(1)) Number finished tasks. n_failed_tasks (integer(1)) Number failed tasks. n_tasks (integer(1)) Number tasks. data (data.table::data.table) Contains performed function calls. worker_info (data.table::data.table()) Contains information workers. worker_states (data.table::data.table()) Contains states workers. priority_info (data.table::data.table) Contains number tasks priority queues. snapshot_schedule (character()) Set snapshot schedule periodically save data base disk. example, c(60, 1000) saves data base every 60 seconds least 1000 changes. Overwrites redis configuration file. Set NULL disable snapshots. details see redis.io.","code":""},{"path":[]},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Rush Controller — Rush","text":"Rush$new() Rush$format() Rush$print() Rush$start_workers() Rush$create_worker_script() Rush$await_workers() Rush$stop_workers() Rush$detect_lost_workers() Rush$detect_lost_tasks() Rush$reset() Rush$read_log() Rush$push_tasks() Rush$push_priority_tasks() Rush$fetch_latest_results() Rush$block_latest_results() Rush$fetch_results() Rush$fetch_queued_tasks() Rush$fetch_priority_tasks() Rush$fetch_running_tasks() Rush$fetch_finished_tasks() Rush$block_finished_tasks() Rush$fetch_failed_tasks() Rush$fetch_tasks() Rush$await_tasks() Rush$write_hashes() Rush$read_hashes() Rush$clone()","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Rush Controller — Rush","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$new(network_id = NULL, config = NULL)"},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"network_id (character(1)) Identifier rush network. Controller workers must instance id. Keys Redis prefixed instance id. config (redux::redis_config) Redis configuration options. See redux::redis_config details.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"method-format-","dir":"Reference","previous_headings":"","what":"Method format()","title":"Rush Controller — Rush","text":"Helper print outputs.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$format(...)"},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"... (ignored).","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"(character()).","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"method-print-","dir":"Reference","previous_headings":"","what":"Method print()","title":"Rush Controller — Rush","text":"Print method.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$print()"},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"returns-1","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"(character()).","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"method-start-workers-","dir":"Reference","previous_headings":"","what":"Method start_workers()","title":"Rush Controller — Rush","text":"Start workers future package. Alternatively, use $create_worker_script() create script starting workers.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$start_workers( worker_loop = fun_loop, n_workers = NULL, globals = NULL, packages = NULL, host = \"local\", heartbeat_period = NULL, heartbeat_expire = NULL, lgr_thresholds = NULL, await_workers = TRUE, ... )"},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"arguments-2","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"worker_loop (function) Loop run workers. Defaults fun_loop called fun. Pass fun .... n_workers (integer(1)) Number workers started. NULL maximum number free workers used. globals (character()) Global variables loaded workers global environment. packages (character()) Packages loaded workers. host (character(1)) Worker started local remote host. See Rush details. heartbeat_period (integer(1)) Period heartbeat seconds. heartbeat_expire (integer(1)) Time live heartbeat seconds. lgr_thresholds (named character() | named numeric()) Logger threshold workers e.g. c(rush = \"debug\"). await_workers (logical(1)) Whether wait workers available. ... () Arguments passed worker_loop.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"returns-2","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"(character()) Worker ids.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"method-create-worker-script-","dir":"Reference","previous_headings":"","what":"Method create_worker_script()","title":"Rush Controller — Rush","text":"Create script start workers. worker started start_worker().","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"usage-4","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$create_worker_script( worker_loop = fun_loop, globals = NULL, packages = NULL, host = \"local\", heartbeat_period = NULL, heartbeat_expire = NULL, lgr_thresholds = NULL, ... )"},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"arguments-3","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"worker_loop (function) Loop run workers. Defaults fun_loop called fun. Pass fun .... globals (character()) Global variables loaded workers global environment. packages (character()) Packages loaded workers. host (character(1)) Worker started local remote host. See Rush details. heartbeat_period (integer(1)) Period heartbeat seconds. heartbeat_expire (integer(1)) Time live heartbeat seconds. lgr_thresholds (named character() | named numeric()) Logger threshold workers e.g. c(rush = \"debug\"). ... () Arguments passed worker_loop.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"method-await-workers-","dir":"Reference","previous_headings":"","what":"Method await_workers()","title":"Rush Controller — Rush","text":"Wait n workers available.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"usage-5","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$await_workers(n)"},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"arguments-4","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"n (integer(1)) Number workers wait .","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"method-stop-workers-","dir":"Reference","previous_headings":"","what":"Method stop_workers()","title":"Rush Controller — Rush","text":"Stop workers.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"usage-6","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$stop_workers(type = \"terminate\", worker_ids = NULL)"},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"arguments-5","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"type (character(1)) Type stopping. Either \"terminate\" \"kill\". \"terminate\" workers evaluate currently running task terminate. \"kill\" workers stopped immediately. worker_ids (character()) Worker ids stopped. NULL workers stopped.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"method-detect-lost-workers-","dir":"Reference","previous_headings":"","what":"Method detect_lost_workers()","title":"Rush Controller — Rush","text":"Detect lost workers. state worker changed \"lost\". Local workers without heartbeat checked tools::pskill(). Checking local workers windows might slow. Workers heartbeat process checked heartbeat.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"usage-7","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$detect_lost_workers()"},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"method-detect-lost-tasks-","dir":"Reference","previous_headings":"","what":"Method detect_lost_tasks()","title":"Rush Controller — Rush","text":"Detect lost tasks. Changes state tasks \"lost\" worker crashed.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"usage-8","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$detect_lost_tasks()"},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"method-reset-","dir":"Reference","previous_headings":"","what":"Method reset()","title":"Rush Controller — Rush","text":"Stop workers delete data stored redis.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"usage-9","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$reset()"},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"method-read-log-","dir":"Reference","previous_headings":"","what":"Method read_log()","title":"Rush Controller — Rush","text":"Read log messages written lgr package worker.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"usage-10","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$read_log(worker_ids = NULL)"},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"arguments-6","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"worker_ids (character(1)) Worker ids. NULL worker ids used.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"method-push-tasks-","dir":"Reference","previous_headings":"","what":"Method push_tasks()","title":"Rush Controller — Rush","text":"Pushes task queue. Task added queued tasks.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"usage-11","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$push_tasks(xss, extra = NULL, terminate_workers = FALSE)"},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"arguments-7","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"xss (list named list()) Lists arguments function e.g. list(list(x1, x2), list(x1, x2))). extra (list) List additional information stored along task e.g. list(list(timestamp), list(timestamp))). terminate_workers (logical(1)) Whether stop workers evaluating tasks.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"returns-3","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"(character()) Keys tasks.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"method-push-priority-tasks-","dir":"Reference","previous_headings":"","what":"Method push_priority_tasks()","title":"Rush Controller — Rush","text":"Pushes task queue specific worker. Task added queued priority tasks. worker evaluates tasks priority queue normal queue. priority NA task added normal queue.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"usage-12","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$push_priority_tasks(xss, extra = NULL, priority = NULL)"},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"arguments-8","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"xss (list named list()) Lists arguments function e.g. list(list(x1, x2), list(x1, x2))). extra (list) List additional information stored along task e.g. list(list(timestamp), list(timestamp))). priority (character()) Worker ids tasks pushed.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"returns-4","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"(character()) Keys tasks.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"method-fetch-latest-results-","dir":"Reference","previous_headings":"","what":"Method fetch_latest_results()","title":"Rush Controller — Rush","text":"Fetch latest results data base.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"usage-13","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$fetch_latest_results(fields = \"ys\")"},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"arguments-9","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"fields (character()) Fields read hashes.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"returns-5","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"data.table() Latest results.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"method-block-latest-results-","dir":"Reference","previous_headings":"","what":"Method block_latest_results()","title":"Rush Controller — Rush","text":"Block process new result available. Returns latest results NULL result available timeout seconds.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"usage-14","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$block_latest_results(fields = \"ys\", timeout = Inf)"},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"arguments-10","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"fields (character()) Fields read hashes. timeout (numeric(1)) Time wait result seconds.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"returns-6","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"data.table() Latest results.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"method-fetch-results-","dir":"Reference","previous_headings":"","what":"Method fetch_results()","title":"Rush Controller — Rush","text":"Fetch results data base. Results cached.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"usage-15","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$fetch_results(fields = \"ys\", reset_cache = FALSE)"},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"arguments-11","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"fields (character()) Fields read hashes. Defaults \"ys\". reset_cache (logical(1)) Whether reset cache.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"returns-7","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"data.table() Results.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"method-fetch-queued-tasks-","dir":"Reference","previous_headings":"","what":"Method fetch_queued_tasks()","title":"Rush Controller — Rush","text":"Fetch queued tasks data base.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"usage-16","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$fetch_queued_tasks(fields = c(\"xs\", \"xs_extra\", \"state\"))"},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"arguments-12","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"fields (character()) Fields read hashes. Defaults c(\"xs\", \"xs_extra\", \"state\").","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"returns-8","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"data.table() Table queued tasks.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"method-fetch-priority-tasks-","dir":"Reference","previous_headings":"","what":"Method fetch_priority_tasks()","title":"Rush Controller — Rush","text":"Fetch queued priority tasks data base.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"usage-17","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$fetch_priority_tasks(fields = c(\"xs\", \"xs_extra\", \"state\"))"},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"arguments-13","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"fields (character()) Fields read hashes. Defaults c(\"xs\", \"xs_extra\", \"state\").","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"returns-9","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"data.table() Table queued priority tasks.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"method-fetch-running-tasks-","dir":"Reference","previous_headings":"","what":"Method fetch_running_tasks()","title":"Rush Controller — Rush","text":"Fetch running tasks data base.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"usage-18","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$fetch_running_tasks(fields = c(\"xs\", \"xs_extra\", \"worker_extra\", \"state\"))"},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"arguments-14","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"fields (character()) Fields read hashes. Defaults c(\"xs\", \"xs_extra\", \"worker_extra\", \"state\").","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"returns-10","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"data.table() Table running tasks.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"method-fetch-finished-tasks-","dir":"Reference","previous_headings":"","what":"Method fetch_finished_tasks()","title":"Rush Controller — Rush","text":"Fetch finished tasks data base. Finished tasks cached.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"usage-19","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$fetch_finished_tasks( fields = c(\"xs\", \"xs_extra\", \"worker_extra\", \"ys\", \"ys_extra\", \"state\"), reset_cache = FALSE )"},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"arguments-15","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"fields (character()) Fields read hashes. Defaults c(\"xs\", \"xs_extra\", \"worker_extra\", \"ys\", \"ys_extra\", \"state\"). reset_cache (logical(1)) Whether reset cache.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"returns-11","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"data.table() Table finished tasks.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"method-block-finished-tasks-","dir":"Reference","previous_headings":"","what":"Method block_finished_tasks()","title":"Rush Controller — Rush","text":"Block process new finished task available. Returns finished tasks NULL new task available timeout seconds.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"usage-20","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$block_finished_tasks( fields = c(\"xs\", \"xs_extra\", \"worker_extra\", \"ys\", \"ys_extra\", \"state\"), timeout = Inf )"},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"arguments-16","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"fields (character()) Fields read hashes. Defaults c(\"xs\", \"xs_extra\", \"worker_extra\", \"ys\", \"ys_extra\", \"state\"). timeout (numeric(1)) Time wait result seconds.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"returns-12","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"data.table() Table finished tasks.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"method-fetch-failed-tasks-","dir":"Reference","previous_headings":"","what":"Method fetch_failed_tasks()","title":"Rush Controller — Rush","text":"Fetch failed tasks data base.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"usage-21","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$fetch_failed_tasks(fields = c(\"xs\", \"worker_extra\", \"condition\", \"state\"))"},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"arguments-17","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"fields (character()) Fields read hashes. Defaults c(\"xs\", \"xs_extra\", \"worker_extra\", \"condition\", \"state\").","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"returns-13","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"data.table() Table failed tasks.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"method-fetch-tasks-","dir":"Reference","previous_headings":"","what":"Method fetch_tasks()","title":"Rush Controller — Rush","text":"Fetch tasks data base.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"usage-22","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$fetch_tasks( fields = c(\"xs\", \"xs_extra\", \"worker_extra\", \"ys\", \"ys_extra\", \"condition\", \"state\") )"},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"arguments-18","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"fields (character()) Fields read hashes. Defaults c(\"xs\", \"xs_extra\", \"worker_extra\", \"ys\", \"ys_extra\", \"condition\", \"state\").","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"returns-14","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"data.table() Table tasks.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"method-await-tasks-","dir":"Reference","previous_headings":"","what":"Method await_tasks()","title":"Rush Controller — Rush","text":"Wait tasks finished.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"usage-23","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$await_tasks(keys, detect_lost_tasks = FALSE)"},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"arguments-19","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"keys (character()) Keys tasks wait . detect_lost_tasks (logical(1)) Whether detect failed tasks. Comes overhead.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"method-write-hashes-","dir":"Reference","previous_headings":"","what":"Method write_hashes()","title":"Rush Controller — Rush","text":"Writes list redis hashes. function serializes element writes new hash. name argument defines field serialized element written. example, xs = list(list(x1 = 1, x2 = 2), list(x1 = 3, x2 = 4)) writes serialize(list(x1 = 1, x2 = 2)) field xs hash serialize(list(x1 = 3, x2 = 4)) field xs another hash. function can iterate multiple lists simultaneously. example, xs = list(list(x1 = 1, x2 = 2), list(x1 = 3, x2 = 4)), ys = list(list(y = 3), list(y = 7)) creates two hashes fields xs ys. Different lengths recycled. stored elements lists . reading functions combine hashes table names inner lists column names. example, xs = list(list(x1 = 1, x2 = 2), list(x1 = 3, x2 = 4)), ys = list(list(y = 3), list(y = 7)) becomes data.table(x1 = c(1, 3), x2 = c(2, 4), y = c(3, 7)).","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"usage-24","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$write_hashes(..., .values = list(), keys = NULL, state = NA)"},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"arguments-20","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"... (named list()) Lists written hashes. names arguments used fields. .values (named list()) Lists written hashes. names list used fields. keys (character()) Keys hashes. NULL new keys generated. state (character(1)) Status hashes.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"returns-15","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"(character()) Keys hashes.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"method-read-hashes-","dir":"Reference","previous_headings":"","what":"Method read_hashes()","title":"Rush Controller — Rush","text":"Reads redis hashes written $write_hashes(). function reads values fields hashes stored keys. values hash deserialized combined single list.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"usage-25","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$read_hashes(keys, fields)"},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"arguments-21","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"keys (character()) Keys hashes. fields (character()) Fields read hashes.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"returns-16","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"(list list()) outer list contains one element key. inner list combination lists stored different fields.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Rush Controller — Rush","text":"objects class cloneable method.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"usage-26","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$clone(deep = FALSE)"},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"arguments-22","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3.mlr-org.com/reference/RushWorker.html","id":null,"dir":"Reference","previous_headings":"","what":"Rush Worker — RushWorker","title":"Rush Worker — RushWorker","text":"RushWorker evaluates tasks writes results data base. worker inherits Rush.","code":""},{"path":"https://mlr3.mlr-org.com/reference/RushWorker.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Rush Worker — RushWorker","text":"worker registers data base rush network.","code":""},{"path":"https://mlr3.mlr-org.com/reference/RushWorker.html","id":"super-class","dir":"Reference","previous_headings":"","what":"Super class","title":"Rush Worker — RushWorker","text":"rush::Rush -> RushWorker","code":""},{"path":"https://mlr3.mlr-org.com/reference/RushWorker.html","id":"public-fields","dir":"Reference","previous_headings":"","what":"Public fields","title":"Rush Worker — RushWorker","text":"worker_id (character(1)) Identifier worker. host (character(1)) Worker started local remote host. heartbeat (callr::r_process) Background process heartbeat. lgr_buffer (lgr::AppenderBuffer) Buffer saves log messages.","code":""},{"path":"https://mlr3.mlr-org.com/reference/RushWorker.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"Rush Worker — RushWorker","text":"terminated (logical(1)) Whether shutdown worker. Used worker loop determine whether continue. terminated_on_idle (logical(1)) Whether shutdown worker tasks queued. Used worker loop determine whether continue.","code":""},{"path":"https://mlr3.mlr-org.com/reference/RushWorker.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Rush Worker — RushWorker","text":"rush::Rush$await_tasks() rush::Rush$await_workers() rush::Rush$block_finished_tasks() rush::Rush$block_latest_results() rush::Rush$create_worker_script() rush::Rush$detect_lost_tasks() rush::Rush$detect_lost_workers() rush::Rush$fetch_failed_tasks() rush::Rush$fetch_finished_tasks() rush::Rush$fetch_latest_results() rush::Rush$fetch_priority_tasks() rush::Rush$fetch_queued_tasks() rush::Rush$fetch_results() rush::Rush$fetch_running_tasks() rush::Rush$fetch_tasks() rush::Rush$format() rush::Rush$print() rush::Rush$push_priority_tasks() rush::Rush$push_tasks() rush::Rush$read_hashes() rush::Rush$read_log() rush::Rush$reset() rush::Rush$start_workers() rush::Rush$stop_workers() rush::Rush$write_hashes()","code":""},{"path":"https://mlr3.mlr-org.com/reference/RushWorker.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Rush Worker — RushWorker","text":"RushWorker$new() RushWorker$push_running_task() RushWorker$pop_task() RushWorker$push_results() RushWorker$write_log() RushWorker$set_terminated() RushWorker$clone()","code":""},{"path":"https://mlr3.mlr-org.com/reference/RushWorker.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Rush Worker — RushWorker","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3.mlr-org.com/reference/RushWorker.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Worker — RushWorker","text":"","code":"RushWorker$new( network_id, config = redux::redis_config(), host, worker_id = NULL, heartbeat_period = NULL, heartbeat_expire = NULL, lgr_thresholds = NULL )"},{"path":"https://mlr3.mlr-org.com/reference/RushWorker.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Worker — RushWorker","text":"network_id (character(1)) Identifier rush network. Controller workers must instance id. Keys Redis prefixed instance id. config (redux::redis_config) Redis configuration options. See redux::redis_config details. host (character(1)) Worker started local remote host. See Rush details. worker_id (character(1)) Identifier worker. Keys redis specific worker prefixed worker id. heartbeat_period (integer(1)) Period heartbeat seconds. heartbeat_expire (integer(1)) Time live heartbeat seconds. lgr_thresholds (named character() | named numeric()) Logger threshold workers e.g. c(rush = \"debug\").","code":""},{"path":"https://mlr3.mlr-org.com/reference/RushWorker.html","id":"method-push-running-task-","dir":"Reference","previous_headings":"","what":"Method push_running_task()","title":"Rush Worker — RushWorker","text":"Push task running tasks without queue.","code":""},{"path":"https://mlr3.mlr-org.com/reference/RushWorker.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Worker — RushWorker","text":"","code":"RushWorker$push_running_task(xss, extra = NULL)"},{"path":"https://mlr3.mlr-org.com/reference/RushWorker.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Worker — RushWorker","text":"xss (list named list()) Lists arguments function e.g. list(list(x1, x2), list(x1, x2))). extra (list) List additional information stored along task e.g. list(list(timestamp), list(timestamp))).","code":""},{"path":"https://mlr3.mlr-org.com/reference/RushWorker.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Worker — RushWorker","text":"(character()) Keys tasks.","code":""},{"path":"https://mlr3.mlr-org.com/reference/RushWorker.html","id":"method-pop-task-","dir":"Reference","previous_headings":"","what":"Method pop_task()","title":"Rush Worker — RushWorker","text":"Pop task queue. Task moved running tasks.","code":""},{"path":"https://mlr3.mlr-org.com/reference/RushWorker.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Worker — RushWorker","text":"","code":"RushWorker$pop_task(timeout = 1)"},{"path":"https://mlr3.mlr-org.com/reference/RushWorker.html","id":"arguments-2","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Worker — RushWorker","text":"timeout (numeric(1)) Time wait task seconds.","code":""},{"path":"https://mlr3.mlr-org.com/reference/RushWorker.html","id":"method-push-results-","dir":"Reference","previous_headings":"","what":"Method push_results()","title":"Rush Worker — RushWorker","text":"Pushes results data base.","code":""},{"path":"https://mlr3.mlr-org.com/reference/RushWorker.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Worker — RushWorker","text":"","code":"RushWorker$push_results( keys, yss = list(), extra = list(), conditions = list(), state = \"finished\" )"},{"path":"https://mlr3.mlr-org.com/reference/RushWorker.html","id":"arguments-3","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Worker — RushWorker","text":"keys (character(1)) Keys associated tasks. yss (named list()) List lists named results. extra (named list()) List lists additional information stored along results. conditions (named list()) List lists conditions. state (character(1)) Status tasks. \"finished\" tasks moved finished tasks. \"error\" tasks moved failed tasks.","code":""},{"path":"https://mlr3.mlr-org.com/reference/RushWorker.html","id":"method-write-log-","dir":"Reference","previous_headings":"","what":"Method write_log()","title":"Rush Worker — RushWorker","text":"Write log message written lgr package database.","code":""},{"path":"https://mlr3.mlr-org.com/reference/RushWorker.html","id":"usage-4","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Worker — RushWorker","text":"","code":"RushWorker$write_log()"},{"path":"https://mlr3.mlr-org.com/reference/RushWorker.html","id":"method-set-terminated-","dir":"Reference","previous_headings":"","what":"Method set_terminated()","title":"Rush Worker — RushWorker","text":"Mark worker terminated. Last step worker loop worker terminates.","code":""},{"path":"https://mlr3.mlr-org.com/reference/RushWorker.html","id":"usage-5","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Worker — RushWorker","text":"","code":"RushWorker$set_terminated()"},{"path":"https://mlr3.mlr-org.com/reference/RushWorker.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Rush Worker — RushWorker","text":"objects class cloneable method.","code":""},{"path":"https://mlr3.mlr-org.com/reference/RushWorker.html","id":"usage-6","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Worker — RushWorker","text":"","code":"RushWorker$clone(deep = FALSE)"},{"path":"https://mlr3.mlr-org.com/reference/RushWorker.html","id":"arguments-4","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Worker — RushWorker","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3.mlr-org.com/reference/fun_heartbeat.html","id":null,"dir":"Reference","previous_headings":"","what":"Heartbeat Loop — fun_heartbeat","title":"Heartbeat Loop — fun_heartbeat","text":"heartbeat loop updates heartbeat key worker still alive. kill key set, worker killed.","code":""},{"path":"https://mlr3.mlr-org.com/reference/fun_heartbeat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Heartbeat Loop — fun_heartbeat","text":"","code":"fun_heartbeat( network_id, config, worker_id, heartbeat_period, heartbeat_expire, pid )"},{"path":"https://mlr3.mlr-org.com/reference/fun_heartbeat.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Heartbeat Loop — fun_heartbeat","text":"network_id (character(1)) Identifier rush network. Controller workers must instance id. Keys Redis prefixed instance id. config (redux::redis_config) Redis configuration options. See redux::redis_config details. worker_id (character(1)) Identifier worker. Keys redis specific worker prefixed worker id. heartbeat_period (integer(1)) Period heartbeat seconds. heartbeat_expire (integer(1)) Time live heartbeat seconds. pid (integer(1)) Process ID worker.","code":""},{"path":"https://mlr3.mlr-org.com/reference/fun_loop.html","id":null,"dir":"Reference","previous_headings":"","what":"Single Task Worker Loop — fun_loop","title":"Single Task Worker Loop — fun_loop","text":"Worker loop pops single task queue, executes function pushes results.","code":""},{"path":"https://mlr3.mlr-org.com/reference/fun_loop.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Single Task Worker Loop — fun_loop","text":"","code":"fun_loop(fun, rush)"},{"path":"https://mlr3.mlr-org.com/reference/fun_loop.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Single Task Worker Loop — fun_loop","text":"fun (function) Function executed. rush (RushWorker) Rush worker instance.","code":""},{"path":"https://mlr3.mlr-org.com/reference/rsh.html","id":null,"dir":"Reference","previous_headings":"","what":"Synctatic Sugar for Rush Controller Construction — rsh","title":"Synctatic Sugar for Rush Controller Construction — rsh","text":"Function construct Rush controller.","code":""},{"path":"https://mlr3.mlr-org.com/reference/rsh.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Synctatic Sugar for Rush Controller Construction — rsh","text":"","code":"rsh(network_id = NULL, config = NULL, ...)"},{"path":"https://mlr3.mlr-org.com/reference/rsh.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Synctatic Sugar for Rush Controller Construction — rsh","text":"network_id (character(1)) Identifier rush network. Controller workers must instance id. Keys Redis prefixed instance id. config (redux::redis_config) Redis configuration options. See redux::redis_config details. ... (ignored).","code":""},{"path":"https://mlr3.mlr-org.com/reference/rsh.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Synctatic Sugar for Rush Controller Construction — rsh","text":"","code":"rsh(network_id = \"benchmark\") #> Error in redis_connect_tcp(config$host, config$port, config$timeout): Failed to create context: Connection refused"},{"path":"https://mlr3.mlr-org.com/reference/run_worker.html","id":null,"dir":"Reference","previous_headings":"","what":"Run a Worker. — run_worker","title":"Run a Worker. — run_worker","text":"Runs worker. function initializes RushWorker instance invokes worker loop. function normally called user.","code":""},{"path":"https://mlr3.mlr-org.com/reference/run_worker.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Run a Worker. — run_worker","text":"","code":"run_worker( worker_loop, network_id, config, host, worker_id, heartbeat_period, heartbeat_expire, lgr_thresholds, args )"},{"path":"https://mlr3.mlr-org.com/reference/run_worker.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Run a Worker. — run_worker","text":"worker_loop (function) Loop run workers. Defaults fun_loop called fun. Pass fun .... network_id (character(1)) Identifier rush network. Controller workers must instance id. Keys Redis prefixed instance id. config (redux::redis_config) Redis configuration options. See redux::redis_config details. host (character(1)) Worker started local remote host. See Rush details. worker_id (character(1)) Identifier worker. Keys redis specific worker prefixed worker id. heartbeat_period (integer(1)) Period heartbeat seconds. heartbeat_expire (integer(1)) Time live heartbeat seconds. lgr_thresholds (named character() | named numeric()) Logger threshold workers e.g. c(rush = \"debug\"). args (named list()) Named arguments passed worker loop.","code":""},{"path":"https://mlr3.mlr-org.com/reference/rush-package.html","id":null,"dir":"Reference","previous_headings":"","what":"rush: Parallele Programmierung — rush-package","title":"rush: Parallele Programmierung — rush-package","text":"Parallel programmierung future redis.","code":""},{"path":"https://mlr3.mlr-org.com/reference/rush-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"rush: Parallele Programmierung — rush-package","text":"Maintainer: Marc Becker marcbecker@posteo.de (ORCID)","code":""},{"path":"https://mlr3.mlr-org.com/reference/start_worker.html","id":null,"dir":"Reference","previous_headings":"","what":"Start a worker — start_worker","title":"Start a worker — start_worker","text":"Starts worker. function called user creating worker script $create_worker_script() Rush. function started Rscript -e 'start_worker(network_id, url, ...)'.","code":""},{"path":"https://mlr3.mlr-org.com/reference/start_worker.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Start a worker — start_worker","text":"","code":"start_worker(network_id, ...)"},{"path":"https://mlr3.mlr-org.com/reference/start_worker.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Start a worker — start_worker","text":"network_id (character(1)) Identifier rush network. Controller workers must instance id. Keys Redis prefixed instance id. ... () Arguments passed redux::redis_config.","code":""},{"path":"https://mlr3.mlr-org.com/reference/start_worker.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Start a worker — start_worker","text":"function initializes connection Redis data base. loads packages copies globals global environment worker. function calls run_worker initialize RushWorker instance starts worker loop. function called worker started script.","code":""}] +[{"path":"https://mlr3.mlr-org.com/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Marc Becker. Maintainer, author.","code":""},{"path":"https://mlr3.mlr-org.com/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Becker M (2023). rush: Parallele Programmierung. R package version 0.0.0.9000.","code":"@Manual{, title = {rush: Parallele Programmierung}, author = {Marc Becker}, year = {2023}, note = {R package version 0.0.0.9000}, }"},{"path":"https://mlr3.mlr-org.com/index.html","id":"rush","dir":"","previous_headings":"","what":"Parallele Programmierung","title":"Parallele Programmierung","text":"rush package parallel distributed computing R. evaluates R expression asynchronously cluster workers provides shared storage workers. shared storage Redis data base. Rush offers centralized decentralized network architecture. centralized network single controller (Rush) multiple workers (RushWorker). Tasks created centrally distributed workers controller. decentralized network controller. workers sample tasks communicate results asynchronously workers.","code":""},{"path":"https://mlr3.mlr-org.com/index.html","id":"features","dir":"","previous_headings":"","what":"Features","title":"Parallele Programmierung","text":"Parallelize arbitrary R expressions. Centralized decentralized network architecture. Small overhead milliseconds per task. Easy starting workers future package. Start workers platform batch script. Designed work data.table. Results cached R session minimize read write operations. Detect recover worker failures. Start heartbeats monitor workers remote machines. Snapshot -memory data base disk. Store lgr messages workers Redis data base. Light dependencies.","code":""},{"path":"https://mlr3.mlr-org.com/index.html","id":"install","dir":"","previous_headings":"","what":"Install","title":"Parallele Programmierung","text":"Install development version GitHub. install Redis.","code":"remotes::install_github(\"mlr-org/rush\")"},{"path":"https://mlr3.mlr-org.com/index.html","id":"centralized-rush-network","dir":"","previous_headings":"","what":"Centralized Rush Network","title":"Parallele Programmierung","text":"Centralized network single controller three workers. example shows evaluation simple function centralized network. network_id identifies instance workers network. config list parameters connection Redis. Next, define function want evaluate workers. start two workers future package. Now can push tasks workers. retrieve results.","code":"library(rush) config = redux::redis_config() rush = Rush$new(network_id = \"test\", config) rush ## ## * Running Workers: 0 ## * Queued Tasks: 0 ## * Queued Priority Tasks: 0 ## * Running Tasks: 0 ## * Finished Tasks: 0 ## * Failed Tasks: 0 fun = function(x1, x2, ...) { list(y = x1 + x2) } future::plan(\"multisession\", workers = 2) rush$start_workers(fun = fun) xss = list(list(x1 = 3, x2 = 5), list(x1 = 4, x2 = 6)) keys = rush$push_tasks(xss) rush$await_tasks(keys) rush$fetch_finished_tasks() ## x1 x2 pid worker_id y status ## 1: 3 5 224861 aaa9bbea-ab25-4c47-a9ef-2cde95ee7144 8 finished ## 2: 4 6 234065 858f7aa4-18bd-48e0-a69f-0f0297a9051c 10 finished ## keys ## 1: c37c5467-693d-4df9-a1f6-fd2a5d0aaf65 ## 2: 0bd23506-eecb-42ee-beba-a37be45b51b8"},{"path":"https://mlr3.mlr-org.com/index.html","id":"decentralized-rush-network","dir":"","previous_headings":"","what":"Decentralized Rush Network","title":"Parallele Programmierung","text":"Decentralized network four workers.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":null,"dir":"Reference","previous_headings":"","what":"Rush Controller — Rush","title":"Rush Controller — Rush","text":"Rush controller centralized rush network. controller starts stops workers, pushes tasks workers fetches results.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"local-workers","dir":"Reference","previous_headings":"","what":"Local Workers","title":"Rush Controller — Rush","text":"local worker runs machine controller. recommend use future package spawn local workers. future backend multisession spawns workers local machine. many rush workers can started future workers available.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"remote-workers","dir":"Reference","previous_headings":"","what":"Remote Workers","title":"Rush Controller — Rush","text":"remote worker runs different machine controller. Remote workers can started script future package. heartbeat process can kill remote workers. heartbeat process also monitors remote workers crashes.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"stopping-workers","dir":"Reference","previous_headings":"","what":"Stopping Workers","title":"Rush Controller — Rush","text":"Local remote workers can terminated $stop_workers(type = \"terminate\") method. workers evaluate currently running task terminate. option type = \"kill\" stops workers immediately. Killing local worker done tools::pskill() function. Remote workers killed pushing kill signal heartbeat process. Without heartbeat process remote worker killed (see section heartbeat).","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"heartbeat","dir":"Reference","previous_headings":"","what":"Heartbeat","title":"Rush Controller — Rush","text":"heartbeat process periodically signals worker still alive. implemented setting timeout heartbeat key. Furthermore, heartbeat process can kill worker.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"data-structure","dir":"Reference","previous_headings":"","what":"Data Structure","title":"Rush Controller — Rush","text":"Rush writes task result additional meta information Redis hash. key hash identifies task Rush. fields written different methods, e.g. $push_result() writes ys result available. value field serialized list e.g. unserializing xs gives list(x1 = 1, x2 = 2). data structure allows quickly convert hash row join multiple hashes table. example, three hashes example converted following table. Notice value field can store multiple columns table. methods $push_tasks() $push_results() write multiple hashes. example, $push_tasks(xss = list(list(x1 = 1, x2 = 2), list(x1 = 2, x2 = 2)) writes xs two hashes.","code":"key : xs | ys | extra | state | key | x1 | x2 | y | timestamp | state | | 1.. | 3 | 4 | 7 | 12:04:11 | finished | | 2.. | 1 | 4 | 5 | 12:04:12 | finished | | 3.. | 1 | 1 | 2 | 12:04:13 | finished |"},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"task-states","dir":"Reference","previous_headings":"","what":"Task States","title":"Rush Controller — Rush","text":"task can go four states \"queued\", \"running\", \"finished\" \"failed\". Internally, keys tasks pushed Redis lists sets keep track state. Queued tasks waiting evaluated. worker pops task queue changes state \"running\" evaluating task. task finished, state changed \"finished\" result written data base. task fails, state changed \"failed\"instead \"finished\"`.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"queues","dir":"Reference","previous_headings":"","what":"Queues","title":"Rush Controller — Rush","text":"Rush uses shared queue queue worker. shared queue used push tasks workers. first worker pops task shared queue evaluates task. worker queues used push tasks specific workers.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"fetch-tasks-and-results","dir":"Reference","previous_headings":"","what":"Fetch Tasks and Results","title":"Rush Controller — Rush","text":"$fetch_*() methods retrieve data Redis database. matching method defined task state e.g. $fetch_running_tasks() $fetch_finished_tasks(). result function evaluation needed, $fetch_results() $fetch_latest_results() faster. methods $fetch_results() $fetch_finished_tasks() cache already queried data. $block_*() variants wait new result available.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"error-handling","dir":"Reference","previous_headings":"","what":"Error Handling","title":"Rush Controller — Rush","text":"evaluating tasks distributed system, many things can go wrong. Simple R errors worker loop caught written archive. task marked \"failed\". connection worker lost, looks like task \"running\" forever. methods $detect_lost_workers() $detect_lost_tasks() detect lost workers. Running methods periodically adds small overhead.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"logging","dir":"Reference","previous_headings":"","what":"Logging","title":"Rush Controller — Rush","text":"worker logs messages written lgr package data base. lgr_thresholds argument defines logging level logger e.g. c(rush = \"debug\"). Saving log messages adds small overhead useful debugging. default, log messages stored.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"public-fields","dir":"Reference","previous_headings":"","what":"Public fields","title":"Rush Controller — Rush","text":"network_id (character(1)) Identifier rush network. config (redux::redis_config) Redis configuration options. connector (redux::redis_api) Returns connection Redis. promises (future::Future()) List futures running run_worker.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"Rush Controller — Rush","text":"n_workers (integer(1)) Number workers. n_running_workers (integer(1)) Number running workers. worker_ids (character()) Ids workers. running_worker_ids (character()) Ids running workers. terminated_worker_ids (character()) Ids terminated workers. killed_worker_ids (character()) Ids killed workers. lost_worker_ids (character()) Ids lost workers. tasks (character()) Keys tasks. queued_tasks (character()) Keys queued tasks. running_tasks (character()) Keys running tasks. finished_tasks (character()) Keys finished tasks. failed_tasks (character()) Keys failed tasks. n_queued_tasks (integer(1)) Number queued tasks. n_queued_priority_tasks (integer(1)) Number queued priority tasks. n_running_tasks (integer(1)) Number running tasks. n_finished_tasks (integer(1)) Number finished tasks. n_failed_tasks (integer(1)) Number failed tasks. n_tasks (integer(1)) Number tasks. data (data.table::data.table) Contains performed function calls. worker_info (data.table::data.table()) Contains information workers. worker_states (data.table::data.table()) Contains states workers. priority_info (data.table::data.table) Contains number tasks priority queues. snapshot_schedule (character()) Set snapshot schedule periodically save data base disk. example, c(60, 1000) saves data base every 60 seconds least 1000 changes. Overwrites redis configuration file. Set NULL disable snapshots. details see redis.io.","code":""},{"path":[]},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Rush Controller — Rush","text":"Rush$new() Rush$format() Rush$print() Rush$start_workers() Rush$create_worker_script() Rush$await_workers() Rush$stop_workers() Rush$detect_lost_workers() Rush$detect_lost_tasks() Rush$reset() Rush$read_log() Rush$push_tasks() Rush$push_priority_tasks() Rush$fetch_latest_results() Rush$block_latest_results() Rush$fetch_results() Rush$fetch_queued_tasks() Rush$fetch_priority_tasks() Rush$fetch_running_tasks() Rush$fetch_finished_tasks() Rush$block_finished_tasks() Rush$fetch_failed_tasks() Rush$fetch_tasks() Rush$await_tasks() Rush$write_hashes() Rush$read_hashes() Rush$clone()","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Rush Controller — Rush","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$new(network_id = NULL, config = NULL)"},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"network_id (character(1)) Identifier rush network. Controller workers must instance id. Keys Redis prefixed instance id. config (redux::redis_config) Redis configuration options. See redux::redis_config details.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"method-format-","dir":"Reference","previous_headings":"","what":"Method format()","title":"Rush Controller — Rush","text":"Helper print outputs.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$format(...)"},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"... (ignored).","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"(character()).","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"method-print-","dir":"Reference","previous_headings":"","what":"Method print()","title":"Rush Controller — Rush","text":"Print method.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$print()"},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"returns-1","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"(character()).","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"method-start-workers-","dir":"Reference","previous_headings":"","what":"Method start_workers()","title":"Rush Controller — Rush","text":"Start workers future package. Alternatively, use $create_worker_script() create script starting workers.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$start_workers( worker_loop = fun_loop, n_workers = NULL, globals = NULL, packages = NULL, host = \"local\", heartbeat_period = NULL, heartbeat_expire = NULL, lgr_thresholds = NULL, await_workers = TRUE, ... )"},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"arguments-2","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"worker_loop (function) Loop run workers. Defaults fun_loop called fun. Pass fun .... n_workers (integer(1)) Number workers started. NULL maximum number free workers used. globals (character()) Global variables loaded workers global environment. packages (character()) Packages loaded workers. host (character(1)) Worker started local remote host. See Rush details. heartbeat_period (integer(1)) Period heartbeat seconds. heartbeat_expire (integer(1)) Time live heartbeat seconds. lgr_thresholds (named character() | named numeric()) Logger threshold workers e.g. c(rush = \"debug\"). await_workers (logical(1)) Whether wait workers available. ... () Arguments passed worker_loop.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"returns-2","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"(character()) Worker ids.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"method-create-worker-script-","dir":"Reference","previous_headings":"","what":"Method create_worker_script()","title":"Rush Controller — Rush","text":"Create script start workers. worker started start_worker().","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"usage-4","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$create_worker_script( worker_loop = fun_loop, globals = NULL, packages = NULL, host = \"local\", heartbeat_period = NULL, heartbeat_expire = NULL, lgr_thresholds = NULL, ... )"},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"arguments-3","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"worker_loop (function) Loop run workers. Defaults fun_loop called fun. Pass fun .... globals (character()) Global variables loaded workers global environment. packages (character()) Packages loaded workers. host (character(1)) Worker started local remote host. See Rush details. heartbeat_period (integer(1)) Period heartbeat seconds. heartbeat_expire (integer(1)) Time live heartbeat seconds. lgr_thresholds (named character() | named numeric()) Logger threshold workers e.g. c(rush = \"debug\"). ... () Arguments passed worker_loop.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"method-await-workers-","dir":"Reference","previous_headings":"","what":"Method await_workers()","title":"Rush Controller — Rush","text":"Wait n workers available.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"usage-5","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$await_workers(n)"},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"arguments-4","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"n (integer(1)) Number workers wait .","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"method-stop-workers-","dir":"Reference","previous_headings":"","what":"Method stop_workers()","title":"Rush Controller — Rush","text":"Stop workers.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"usage-6","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$stop_workers(type = \"terminate\", worker_ids = NULL)"},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"arguments-5","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"type (character(1)) Type stopping. Either \"terminate\" \"kill\". \"terminate\" workers evaluate currently running task terminate. \"kill\" workers stopped immediately. worker_ids (character()) Worker ids stopped. NULL workers stopped.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"method-detect-lost-workers-","dir":"Reference","previous_headings":"","what":"Method detect_lost_workers()","title":"Rush Controller — Rush","text":"Detect lost workers. state worker changed \"lost\". Local workers without heartbeat checked process id. Checking local workers unix systems takes microseconds per worker. checking local workers windows might slow. Workers heartbeat process checked heartbeat.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"usage-7","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$detect_lost_workers()"},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"method-detect-lost-tasks-","dir":"Reference","previous_headings":"","what":"Method detect_lost_tasks()","title":"Rush Controller — Rush","text":"Detect lost tasks. Changes state tasks \"lost\" worker crashed.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"usage-8","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$detect_lost_tasks()"},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"method-reset-","dir":"Reference","previous_headings":"","what":"Method reset()","title":"Rush Controller — Rush","text":"Stop workers delete data stored redis.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"usage-9","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$reset()"},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"method-read-log-","dir":"Reference","previous_headings":"","what":"Method read_log()","title":"Rush Controller — Rush","text":"Read log messages written lgr package worker.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"usage-10","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$read_log(worker_ids = NULL)"},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"arguments-6","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"worker_ids (character(1)) Worker ids. NULL worker ids used.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"method-push-tasks-","dir":"Reference","previous_headings":"","what":"Method push_tasks()","title":"Rush Controller — Rush","text":"Pushes task queue. Task added queued tasks.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"usage-11","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$push_tasks(xss, extra = NULL, terminate_workers = FALSE)"},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"arguments-7","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"xss (list named list()) Lists arguments function e.g. list(list(x1, x2), list(x1, x2))). extra (list) List additional information stored along task e.g. list(list(timestamp), list(timestamp))). terminate_workers (logical(1)) Whether stop workers evaluating tasks.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"returns-3","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"(character()) Keys tasks.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"method-push-priority-tasks-","dir":"Reference","previous_headings":"","what":"Method push_priority_tasks()","title":"Rush Controller — Rush","text":"Pushes task queue specific worker. Task added queued priority tasks. worker evaluates tasks priority queue shared queue. priority NA task added shared queue. worker lost worker id known, task added shared queue.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"usage-12","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$push_priority_tasks(xss, extra = NULL, priority = NULL)"},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"arguments-8","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"xss (list named list()) Lists arguments function e.g. list(list(x1, x2), list(x1, x2))). extra (list) List additional information stored along task e.g. list(list(timestamp), list(timestamp))). priority (character()) Worker ids tasks pushed.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"returns-4","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"(character()) Keys tasks.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"method-fetch-latest-results-","dir":"Reference","previous_headings":"","what":"Method fetch_latest_results()","title":"Rush Controller — Rush","text":"Fetch latest results data base.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"usage-13","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$fetch_latest_results(fields = \"ys\")"},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"arguments-9","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"fields (character()) Fields read hashes.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"returns-5","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"data.table() Latest results.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"method-block-latest-results-","dir":"Reference","previous_headings":"","what":"Method block_latest_results()","title":"Rush Controller — Rush","text":"Block process new result available. Returns latest results NULL result available timeout seconds.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"usage-14","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$block_latest_results(fields = \"ys\", timeout = Inf)"},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"arguments-10","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"fields (character()) Fields read hashes. timeout (numeric(1)) Time wait result seconds.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"returns-6","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"data.table() Latest results.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"method-fetch-results-","dir":"Reference","previous_headings":"","what":"Method fetch_results()","title":"Rush Controller — Rush","text":"Fetch results data base. Results cached.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"usage-15","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$fetch_results(fields = \"ys\", reset_cache = FALSE)"},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"arguments-11","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"fields (character()) Fields read hashes. Defaults \"ys\". reset_cache (logical(1)) Whether reset cache.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"returns-7","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"data.table() Results.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"method-fetch-queued-tasks-","dir":"Reference","previous_headings":"","what":"Method fetch_queued_tasks()","title":"Rush Controller — Rush","text":"Fetch queued tasks data base.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"usage-16","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$fetch_queued_tasks(fields = c(\"xs\", \"xs_extra\", \"state\"))"},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"arguments-12","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"fields (character()) Fields read hashes. Defaults c(\"xs\", \"xs_extra\", \"state\").","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"returns-8","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"data.table() Table queued tasks.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"method-fetch-priority-tasks-","dir":"Reference","previous_headings":"","what":"Method fetch_priority_tasks()","title":"Rush Controller — Rush","text":"Fetch queued priority tasks data base.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"usage-17","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$fetch_priority_tasks(fields = c(\"xs\", \"xs_extra\", \"state\"))"},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"arguments-13","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"fields (character()) Fields read hashes. Defaults c(\"xs\", \"xs_extra\", \"state\").","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"returns-9","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"data.table() Table queued priority tasks.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"method-fetch-running-tasks-","dir":"Reference","previous_headings":"","what":"Method fetch_running_tasks()","title":"Rush Controller — Rush","text":"Fetch running tasks data base.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"usage-18","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$fetch_running_tasks(fields = c(\"xs\", \"xs_extra\", \"worker_extra\", \"state\"))"},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"arguments-14","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"fields (character()) Fields read hashes. Defaults c(\"xs\", \"xs_extra\", \"worker_extra\", \"state\").","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"returns-10","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"data.table() Table running tasks.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"method-fetch-finished-tasks-","dir":"Reference","previous_headings":"","what":"Method fetch_finished_tasks()","title":"Rush Controller — Rush","text":"Fetch finished tasks data base. Finished tasks cached.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"usage-19","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$fetch_finished_tasks( fields = c(\"xs\", \"xs_extra\", \"worker_extra\", \"ys\", \"ys_extra\", \"state\"), reset_cache = FALSE )"},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"arguments-15","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"fields (character()) Fields read hashes. Defaults c(\"xs\", \"xs_extra\", \"worker_extra\", \"ys\", \"ys_extra\", \"state\"). reset_cache (logical(1)) Whether reset cache.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"returns-11","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"data.table() Table finished tasks.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"method-block-finished-tasks-","dir":"Reference","previous_headings":"","what":"Method block_finished_tasks()","title":"Rush Controller — Rush","text":"Block process new finished task available. Returns finished tasks NULL new task available timeout seconds.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"usage-20","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$block_finished_tasks( fields = c(\"xs\", \"xs_extra\", \"worker_extra\", \"ys\", \"ys_extra\", \"state\"), timeout = Inf )"},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"arguments-16","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"fields (character()) Fields read hashes. Defaults c(\"xs\", \"xs_extra\", \"worker_extra\", \"ys\", \"ys_extra\", \"state\"). timeout (numeric(1)) Time wait result seconds.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"returns-12","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"data.table() Table finished tasks.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"method-fetch-failed-tasks-","dir":"Reference","previous_headings":"","what":"Method fetch_failed_tasks()","title":"Rush Controller — Rush","text":"Fetch failed tasks data base.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"usage-21","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$fetch_failed_tasks(fields = c(\"xs\", \"worker_extra\", \"condition\", \"state\"))"},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"arguments-17","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"fields (character()) Fields read hashes. Defaults c(\"xs\", \"xs_extra\", \"worker_extra\", \"condition\", \"state\").","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"returns-13","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"data.table() Table failed tasks.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"method-fetch-tasks-","dir":"Reference","previous_headings":"","what":"Method fetch_tasks()","title":"Rush Controller — Rush","text":"Fetch tasks data base.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"usage-22","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$fetch_tasks( fields = c(\"xs\", \"xs_extra\", \"worker_extra\", \"ys\", \"ys_extra\", \"condition\", \"state\") )"},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"arguments-18","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"fields (character()) Fields read hashes. Defaults c(\"xs\", \"xs_extra\", \"worker_extra\", \"ys\", \"ys_extra\", \"condition\", \"state\").","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"returns-14","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"data.table() Table tasks.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"method-await-tasks-","dir":"Reference","previous_headings":"","what":"Method await_tasks()","title":"Rush Controller — Rush","text":"Wait tasks finished.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"usage-23","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$await_tasks(keys, detect_lost_tasks = FALSE)"},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"arguments-19","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"keys (character()) Keys tasks wait . detect_lost_tasks (logical(1)) Whether detect failed tasks. Comes overhead.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"method-write-hashes-","dir":"Reference","previous_headings":"","what":"Method write_hashes()","title":"Rush Controller — Rush","text":"Writes list redis hashes. function serializes element writes new hash. name argument defines field serialized element written. example, xs = list(list(x1 = 1, x2 = 2), list(x1 = 3, x2 = 4)) writes serialize(list(x1 = 1, x2 = 2)) field xs hash serialize(list(x1 = 3, x2 = 4)) field xs another hash. function can iterate multiple lists simultaneously. example, xs = list(list(x1 = 1, x2 = 2), list(x1 = 3, x2 = 4)), ys = list(list(y = 3), list(y = 7)) creates two hashes fields xs ys. Different lengths recycled. stored elements lists . reading functions combine hashes table names inner lists column names. example, xs = list(list(x1 = 1, x2 = 2), list(x1 = 3, x2 = 4)), ys = list(list(y = 3), list(y = 7)) becomes data.table(x1 = c(1, 3), x2 = c(2, 4), y = c(3, 7)).","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"usage-24","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$write_hashes(..., .values = list(), keys = NULL, state = NA)"},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"arguments-20","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"... (named list()) Lists written hashes. names arguments used fields. .values (named list()) Lists written hashes. names list used fields. keys (character()) Keys hashes. NULL new keys generated. state (character(1)) Status hashes.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"returns-15","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"(character()) Keys hashes.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"method-read-hashes-","dir":"Reference","previous_headings":"","what":"Method read_hashes()","title":"Rush Controller — Rush","text":"Reads redis hashes written $write_hashes(). function reads values fields hashes stored keys. values hash deserialized combined single list.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"usage-25","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$read_hashes(keys, fields)"},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"arguments-21","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"keys (character()) Keys hashes. fields (character()) Fields read hashes.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"returns-16","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"(list list()) outer list contains one element key. inner list combination lists stored different fields.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Rush Controller — Rush","text":"objects class cloneable method.","code":""},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"usage-26","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$clone(deep = FALSE)"},{"path":"https://mlr3.mlr-org.com/reference/Rush.html","id":"arguments-22","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3.mlr-org.com/reference/RushWorker.html","id":null,"dir":"Reference","previous_headings":"","what":"Rush Worker — RushWorker","title":"Rush Worker — RushWorker","text":"RushWorker evaluates tasks writes results data base. worker inherits Rush.","code":""},{"path":"https://mlr3.mlr-org.com/reference/RushWorker.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Rush Worker — RushWorker","text":"worker registers data base rush network.","code":""},{"path":"https://mlr3.mlr-org.com/reference/RushWorker.html","id":"super-class","dir":"Reference","previous_headings":"","what":"Super class","title":"Rush Worker — RushWorker","text":"rush::Rush -> RushWorker","code":""},{"path":"https://mlr3.mlr-org.com/reference/RushWorker.html","id":"public-fields","dir":"Reference","previous_headings":"","what":"Public fields","title":"Rush Worker — RushWorker","text":"worker_id (character(1)) Identifier worker. host (character(1)) Worker started local remote host. heartbeat (callr::r_process) Background process heartbeat. lgr_buffer (lgr::AppenderBuffer) Buffer saves log messages.","code":""},{"path":"https://mlr3.mlr-org.com/reference/RushWorker.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"Rush Worker — RushWorker","text":"terminated (logical(1)) Whether shutdown worker. Used worker loop determine whether continue. terminated_on_idle (logical(1)) Whether shutdown worker tasks queued. Used worker loop determine whether continue.","code":""},{"path":"https://mlr3.mlr-org.com/reference/RushWorker.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Rush Worker — RushWorker","text":"rush::Rush$await_tasks() rush::Rush$await_workers() rush::Rush$block_finished_tasks() rush::Rush$block_latest_results() rush::Rush$create_worker_script() rush::Rush$detect_lost_tasks() rush::Rush$detect_lost_workers() rush::Rush$fetch_failed_tasks() rush::Rush$fetch_finished_tasks() rush::Rush$fetch_latest_results() rush::Rush$fetch_priority_tasks() rush::Rush$fetch_queued_tasks() rush::Rush$fetch_results() rush::Rush$fetch_running_tasks() rush::Rush$fetch_tasks() rush::Rush$format() rush::Rush$print() rush::Rush$push_priority_tasks() rush::Rush$push_tasks() rush::Rush$read_hashes() rush::Rush$read_log() rush::Rush$reset() rush::Rush$start_workers() rush::Rush$stop_workers() rush::Rush$write_hashes()","code":""},{"path":"https://mlr3.mlr-org.com/reference/RushWorker.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Rush Worker — RushWorker","text":"RushWorker$new() RushWorker$push_running_task() RushWorker$pop_task() RushWorker$push_results() RushWorker$write_log() RushWorker$set_terminated() RushWorker$clone()","code":""},{"path":"https://mlr3.mlr-org.com/reference/RushWorker.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Rush Worker — RushWorker","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3.mlr-org.com/reference/RushWorker.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Worker — RushWorker","text":"","code":"RushWorker$new( network_id, config = redux::redis_config(), host, worker_id = NULL, heartbeat_period = NULL, heartbeat_expire = NULL, lgr_thresholds = NULL )"},{"path":"https://mlr3.mlr-org.com/reference/RushWorker.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Worker — RushWorker","text":"network_id (character(1)) Identifier rush network. Controller workers must instance id. Keys Redis prefixed instance id. config (redux::redis_config) Redis configuration options. See redux::redis_config details. host (character(1)) Worker started local remote host. See Rush details. worker_id (character(1)) Identifier worker. Keys redis specific worker prefixed worker id. heartbeat_period (integer(1)) Period heartbeat seconds. heartbeat_expire (integer(1)) Time live heartbeat seconds. lgr_thresholds (named character() | named numeric()) Logger threshold workers e.g. c(rush = \"debug\").","code":""},{"path":"https://mlr3.mlr-org.com/reference/RushWorker.html","id":"method-push-running-task-","dir":"Reference","previous_headings":"","what":"Method push_running_task()","title":"Rush Worker — RushWorker","text":"Push task running tasks without queue.","code":""},{"path":"https://mlr3.mlr-org.com/reference/RushWorker.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Worker — RushWorker","text":"","code":"RushWorker$push_running_task(xss, extra = NULL)"},{"path":"https://mlr3.mlr-org.com/reference/RushWorker.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Worker — RushWorker","text":"xss (list named list()) Lists arguments function e.g. list(list(x1, x2), list(x1, x2))). extra (list) List additional information stored along task e.g. list(list(timestamp), list(timestamp))).","code":""},{"path":"https://mlr3.mlr-org.com/reference/RushWorker.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Worker — RushWorker","text":"(character()) Keys tasks.","code":""},{"path":"https://mlr3.mlr-org.com/reference/RushWorker.html","id":"method-pop-task-","dir":"Reference","previous_headings":"","what":"Method pop_task()","title":"Rush Worker — RushWorker","text":"Pop task queue. Task moved running tasks.","code":""},{"path":"https://mlr3.mlr-org.com/reference/RushWorker.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Worker — RushWorker","text":"","code":"RushWorker$pop_task(timeout = 1)"},{"path":"https://mlr3.mlr-org.com/reference/RushWorker.html","id":"arguments-2","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Worker — RushWorker","text":"timeout (numeric(1)) Time wait task seconds.","code":""},{"path":"https://mlr3.mlr-org.com/reference/RushWorker.html","id":"method-push-results-","dir":"Reference","previous_headings":"","what":"Method push_results()","title":"Rush Worker — RushWorker","text":"Pushes results data base.","code":""},{"path":"https://mlr3.mlr-org.com/reference/RushWorker.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Worker — RushWorker","text":"","code":"RushWorker$push_results( keys, yss = list(), extra = list(), conditions = list(), state = \"finished\" )"},{"path":"https://mlr3.mlr-org.com/reference/RushWorker.html","id":"arguments-3","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Worker — RushWorker","text":"keys (character(1)) Keys associated tasks. yss (named list()) List lists named results. extra (named list()) List lists additional information stored along results. conditions (named list()) List lists conditions. state (character(1)) Status tasks. \"finished\" tasks moved finished tasks. \"error\" tasks moved failed tasks.","code":""},{"path":"https://mlr3.mlr-org.com/reference/RushWorker.html","id":"method-write-log-","dir":"Reference","previous_headings":"","what":"Method write_log()","title":"Rush Worker — RushWorker","text":"Write log message written lgr package database.","code":""},{"path":"https://mlr3.mlr-org.com/reference/RushWorker.html","id":"usage-4","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Worker — RushWorker","text":"","code":"RushWorker$write_log()"},{"path":"https://mlr3.mlr-org.com/reference/RushWorker.html","id":"method-set-terminated-","dir":"Reference","previous_headings":"","what":"Method set_terminated()","title":"Rush Worker — RushWorker","text":"Mark worker terminated. Last step worker loop worker terminates.","code":""},{"path":"https://mlr3.mlr-org.com/reference/RushWorker.html","id":"usage-5","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Worker — RushWorker","text":"","code":"RushWorker$set_terminated()"},{"path":"https://mlr3.mlr-org.com/reference/RushWorker.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Rush Worker — RushWorker","text":"objects class cloneable method.","code":""},{"path":"https://mlr3.mlr-org.com/reference/RushWorker.html","id":"usage-6","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Worker — RushWorker","text":"","code":"RushWorker$clone(deep = FALSE)"},{"path":"https://mlr3.mlr-org.com/reference/RushWorker.html","id":"arguments-4","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Worker — RushWorker","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3.mlr-org.com/reference/fun_heartbeat.html","id":null,"dir":"Reference","previous_headings":"","what":"Heartbeat Loop — fun_heartbeat","title":"Heartbeat Loop — fun_heartbeat","text":"heartbeat loop updates heartbeat key worker still alive. kill key set, worker killed.","code":""},{"path":"https://mlr3.mlr-org.com/reference/fun_heartbeat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Heartbeat Loop — fun_heartbeat","text":"","code":"fun_heartbeat( network_id, config, worker_id, heartbeat_period, heartbeat_expire, pid )"},{"path":"https://mlr3.mlr-org.com/reference/fun_heartbeat.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Heartbeat Loop — fun_heartbeat","text":"network_id (character(1)) Identifier rush network. Controller workers must instance id. Keys Redis prefixed instance id. config (redux::redis_config) Redis configuration options. See redux::redis_config details. worker_id (character(1)) Identifier worker. Keys redis specific worker prefixed worker id. heartbeat_period (integer(1)) Period heartbeat seconds. heartbeat_expire (integer(1)) Time live heartbeat seconds. pid (integer(1)) Process ID worker.","code":""},{"path":"https://mlr3.mlr-org.com/reference/fun_loop.html","id":null,"dir":"Reference","previous_headings":"","what":"Single Task Worker Loop — fun_loop","title":"Single Task Worker Loop — fun_loop","text":"Worker loop pops single task queue, executes function pushes results.","code":""},{"path":"https://mlr3.mlr-org.com/reference/fun_loop.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Single Task Worker Loop — fun_loop","text":"","code":"fun_loop(fun, rush)"},{"path":"https://mlr3.mlr-org.com/reference/fun_loop.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Single Task Worker Loop — fun_loop","text":"fun (function) Function executed. rush (RushWorker) Rush worker instance.","code":""},{"path":"https://mlr3.mlr-org.com/reference/rsh.html","id":null,"dir":"Reference","previous_headings":"","what":"Synctatic Sugar for Rush Controller Construction — rsh","title":"Synctatic Sugar for Rush Controller Construction — rsh","text":"Function construct Rush controller.","code":""},{"path":"https://mlr3.mlr-org.com/reference/rsh.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Synctatic Sugar for Rush Controller Construction — rsh","text":"","code":"rsh(network_id = NULL, config = NULL, ...)"},{"path":"https://mlr3.mlr-org.com/reference/rsh.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Synctatic Sugar for Rush Controller Construction — rsh","text":"network_id (character(1)) Identifier rush network. Controller workers must instance id. Keys Redis prefixed instance id. config (redux::redis_config) Redis configuration options. See redux::redis_config details. ... (ignored).","code":""},{"path":"https://mlr3.mlr-org.com/reference/rsh.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Synctatic Sugar for Rush Controller Construction — rsh","text":"","code":"rsh(network_id = \"benchmark\") #> Error in redis_connect_tcp(config$host, config$port, config$timeout): Failed to create context: Connection refused"},{"path":"https://mlr3.mlr-org.com/reference/run_worker.html","id":null,"dir":"Reference","previous_headings":"","what":"Run a Worker. — run_worker","title":"Run a Worker. — run_worker","text":"Runs worker. function initializes RushWorker instance invokes worker loop. function normally called user.","code":""},{"path":"https://mlr3.mlr-org.com/reference/run_worker.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Run a Worker. — run_worker","text":"","code":"run_worker( worker_loop, network_id, config, host, worker_id, heartbeat_period, heartbeat_expire, lgr_thresholds, args )"},{"path":"https://mlr3.mlr-org.com/reference/run_worker.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Run a Worker. — run_worker","text":"worker_loop (function) Loop run workers. Defaults fun_loop called fun. Pass fun .... network_id (character(1)) Identifier rush network. Controller workers must instance id. Keys Redis prefixed instance id. config (redux::redis_config) Redis configuration options. See redux::redis_config details. host (character(1)) Worker started local remote host. See Rush details. worker_id (character(1)) Identifier worker. Keys redis specific worker prefixed worker id. heartbeat_period (integer(1)) Period heartbeat seconds. heartbeat_expire (integer(1)) Time live heartbeat seconds. lgr_thresholds (named character() | named numeric()) Logger threshold workers e.g. c(rush = \"debug\"). args (named list()) Named arguments passed worker loop.","code":""},{"path":"https://mlr3.mlr-org.com/reference/rush-package.html","id":null,"dir":"Reference","previous_headings":"","what":"rush: Parallele Programmierung — rush-package","title":"rush: Parallele Programmierung — rush-package","text":"Parallel programmierung future redis.","code":""},{"path":"https://mlr3.mlr-org.com/reference/rush-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"rush: Parallele Programmierung — rush-package","text":"Maintainer: Marc Becker marcbecker@posteo.de (ORCID)","code":""},{"path":"https://mlr3.mlr-org.com/reference/start_worker.html","id":null,"dir":"Reference","previous_headings":"","what":"Start a worker — start_worker","title":"Start a worker — start_worker","text":"Starts worker. function called user creating worker script $create_worker_script() Rush. function started Rscript -e 'start_worker(network_id, url, ...)'.","code":""},{"path":"https://mlr3.mlr-org.com/reference/start_worker.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Start a worker — start_worker","text":"","code":"start_worker(network_id, ...)"},{"path":"https://mlr3.mlr-org.com/reference/start_worker.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Start a worker — start_worker","text":"network_id (character(1)) Identifier rush network. Controller workers must instance id. Keys Redis prefixed instance id. ... () Arguments passed redux::redis_config.","code":""},{"path":"https://mlr3.mlr-org.com/reference/start_worker.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Start a worker — start_worker","text":"function initializes connection Redis data base. loads packages copies globals global environment worker. function calls run_worker initialize RushWorker instance starts worker loop. function called worker started script.","code":""}]