@@ -64,7 +70,7 @@
diff --git a/search.json b/search.json
index 76ca0b7..48bbbfd 100644
--- a/search.json
+++ b/search.json
@@ -1 +1 @@
-[{"path":"https://rush.mlr-org.com/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Marc Becker. Maintainer, author, copyright holder.","code":""},{"path":"https://rush.mlr-org.com/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Becker M (2024). rush: Rapid Parallel Distributed Computing. R package version 0.0.0.9000.","code":"@Manual{, title = {rush: Rapid Parallel and Distributed Computing}, author = {Marc Becker}, year = {2024}, note = {R package version 0.0.0.9000}, }"},{"path":"https://rush.mlr-org.com/index.html","id":"rush","dir":"","previous_headings":"","what":"Rapid Parallel and Distributed Computing","title":"Rapid Parallel and Distributed Computing","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://rush.mlr-org.com/index.html","id":"features","dir":"","previous_headings":"","what":"Features","title":"Rapid Parallel and Distributed Computing","text":"Parallelize arbitrary R expressions. Centralized decentralized network architecture. Small overhead milliseconds per task. Easy start local workers processx 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://rush.mlr-org.com/index.html","id":"install","dir":"","previous_headings":"","what":"Install","title":"Rapid Parallel and Distributed Computing","text":"Install development version GitHub. install Redis.","code":"remotes::install_github(\"mlr-org/rush\")"},{"path":"https://rush.mlr-org.com/index.html","id":"centralized-rush-network","dir":"","previous_headings":"","what":"Centralized Rush Network","title":"Rapid Parallel and Distributed Computing","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. 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) } rush$start_local_workers(fun = fun, n_workers = 2) ## INFO [16:06:19.324] [rush] Starting 2 worker(s) xss = list(list(x1 = 3, x2 = 5), list(x1 = 4, x2 = 6)) keys = rush$push_tasks(xss) rush$wait_for_tasks(keys) rush$fetch_finished_tasks() ## x1 x2 y pid worker_id keys ## ## 1: 4 6 10 448184 ebb0d9b4-3... 37ba4683-5... ## 2: 3 5 8 448173 f49aad09-a... 27b4b03b-d..."},{"path":"https://rush.mlr-org.com/index.html","id":"decentralized-rush-network","dir":"","previous_headings":"","what":"Decentralized Rush Network","title":"Rapid Parallel and Distributed Computing","text":"Decentralized network four workers.","code":""},{"path":"https://rush.mlr-org.com/reference/AppenderRedis.html","id":null,"dir":"Reference","previous_headings":"","what":"Log to Redis Database — AppenderRedis","title":"Log to Redis Database — AppenderRedis","text":"AppenderRedis writes log messages Redis data base. lgr::Appender created internally RushWorker logger thresholds passed via rush_plan().","code":""},{"path":"https://rush.mlr-org.com/reference/AppenderRedis.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Log to Redis Database — AppenderRedis","text":"lgr::Filterable -> lgr::Appender -> lgr::AppenderMemory -> AppenderRedis","code":""},{"path":"https://rush.mlr-org.com/reference/AppenderRedis.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Log to Redis Database — AppenderRedis","text":"lgr::Filterable$add_filter() lgr::Filterable$filter() lgr::Filterable$remove_filter() lgr::Filterable$set_filters() lgr::Appender$set_layout() lgr::Appender$set_threshold() lgr::AppenderMemory$append() lgr::AppenderMemory$clear() lgr::AppenderMemory$format() lgr::AppenderMemory$set_buffer_size() lgr::AppenderMemory$set_flush_on_exit() lgr::AppenderMemory$set_flush_on_rotate() lgr::AppenderMemory$set_flush_threshold() lgr::AppenderMemory$set_should_flush() lgr::AppenderMemory$show()","code":""},{"path":"https://rush.mlr-org.com/reference/AppenderRedis.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Log to Redis Database — AppenderRedis","text":"AppenderRedis$new() AppenderRedis$flush()","code":""},{"path":"https://rush.mlr-org.com/reference/AppenderRedis.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Log to Redis Database — AppenderRedis","text":"Creates new instance R6 class.","code":""},{"path":"https://rush.mlr-org.com/reference/AppenderRedis.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Log to Redis Database — AppenderRedis","text":"","code":"AppenderRedis$new( config, key, threshold = NA_integer_, layout = lgr::LayoutJson$new(), buffer_size = 0, flush_threshold = \"error\", flush_on_exit = TRUE, flush_on_rotate = TRUE, should_flush = NULL, filters = NULL )"},{"path":"https://rush.mlr-org.com/reference/AppenderRedis.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Log to Redis Database — AppenderRedis","text":"config (redux::redis_config) Redis configuration options. key (character(1)) Key list holding log messages Redis data store. threshold (integer(1) | character(1)) Threshold log messages. layout (lgr::Layout) Layout log messages. buffer_size (integer(1)) Size buffer. flush_threshold (character(1)) Threshold flushing buffer. flush_on_exit (logical(1)) Flush buffer exit. flush_on_rotate (logical(1)) Flush buffer rotate. should_flush (function) Function determines buffer flushed. filters (list) List filters.","code":""},{"path":"https://rush.mlr-org.com/reference/AppenderRedis.html","id":"method-flush-","dir":"Reference","previous_headings":"","what":"Method flush()","title":"Log to Redis Database — AppenderRedis","text":"Sends buffer's contents Redis data store, clears buffer.","code":""},{"path":"https://rush.mlr-org.com/reference/AppenderRedis.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Log to Redis Database — AppenderRedis","text":"","code":"AppenderRedis$flush()"},{"path":"https://rush.mlr-org.com/reference/AppenderRedis.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Log to Redis Database — AppenderRedis","text":"","code":"# \\donttest{ config_local = redux::redis_config() rush_plan( config = config_local, n_workers = 2, lgr_thresholds = c(rush = \"info\")) #> Error in rush_plan(config = config_local, n_workers = 2, lgr_thresholds = c(rush = \"info\")): Can't connect to Redis. Check the configuration. rush = rsh(network_id = \"test_network\") #> Error in initialize(...): Can't connect to Redis. Check the configuration. rush #> Error in eval(expr, envir, enclos): object 'rush' not found # }"},{"path":"https://rush.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://rush.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. Local workers spawned $start_local_workers() method via processx` package.","code":""},{"path":"https://rush.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 started manually $create_worker_script() $start_remote_workers() methods. Remote workers can started system long system access Redis required packages installed. heartbeat process can kill remote workers. heartbeat process also monitors remote workers crashes.","code":""},{"path":"https://rush.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 processx package. Remote workers killed pushing kill signal heartbeat process. Without heartbeat process remote worker killed (see section heartbeat).","code":""},{"path":"https://rush.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://rush.mlr-org.com/reference/Rush.html","id":"data-structure","dir":"Reference","previous_headings":"","what":"Data Structure","title":"Rush Controller — Rush","text":"Tasks stored Redis hashes. Hashes collections field-value pairs. key hash identifies task Redis rush. field-value pairs written different methods, e.g. $push_tasks() writes xs $push_results() writes ys. values fields serialized lists atomic values e.g. unserializing xs gives list(x1 = 1, x2 = 2) data structure allows quick converting hash row joining multiple hashes table. value field named list, field can store cells multiple columns table. value field atomic value, field stores single cell column named field. 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 | xs_extra | key | x1 | x2 | y | timestamp | | 1.. | 3 | 4 | 7 | 12:04:11 | | 2.. | 1 | 4 | 5 | 12:04:12 | | 3.. | 1 | 1 | 2 | 12:04:13 |"},{"path":"https://rush.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://rush.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://rush.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(). methods $fetch_new_tasks() $fetch_finished_tasks() cache already queried data. $wait_for_finished_tasks() variant wait new result available.","code":""},{"path":"https://rush.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. method $detect_lost_workers() identifies lost workers. Running method periodically adds small overhead.","code":""},{"path":"https://rush.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://rush.mlr-org.com/reference/Rush.html","id":"seed","dir":"Reference","previous_headings":"","what":"Seed","title":"Rush Controller — Rush","text":"Setting seed important reproducibility. tasks can evaluated specific L'Ecuyer-CMRG seed. initial seed passed, seed used generate L'Ecuyer-CMRG seeds task. task evaluated separate RNG stream. See parallel::nextRNGStream details.","code":""},{"path":"https://rush.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. processes (processx::process) List processes started $start_local_workers().","code":""},{"path":"https://rush.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. n_terminated_workers (integer(1)) Number terminated workers. n_killed_workers (integer(1)) Number killed workers. n_lost_workers (integer(1)) Number lost workers. Run $detect_lost_workers() update number lost workers. n_pre_workers (integer(1)) Number workers yet completely started. 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. pre_worker_ids (character()) Ids workers yet completely started. 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. worker_info (data.table::data.table()) Contains information workers. worker_states (data.table::data.table()) Contains states workers. all_workers_terminated (logical(1)) Whether workers terminated. all_workers_lost (logical(1)) Whether workers lost. Runs $detect_lost_workers() detect lost 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. redis_info (list()) Information Redis server.","code":""},{"path":[]},{"path":"https://rush.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_local_workers() Rush$restart_local_workers() Rush$create_worker_script() Rush$start_remote_workers() Rush$wait_for_workers() Rush$stop_workers() Rush$detect_lost_workers() Rush$reset() Rush$read_log() Rush$print_log() Rush$push_tasks() Rush$push_priority_tasks() Rush$push_failed() Rush$retry_tasks() Rush$fetch_queued_tasks() Rush$fetch_priority_tasks() Rush$fetch_running_tasks() Rush$fetch_finished_tasks() Rush$wait_for_finished_tasks() Rush$fetch_new_tasks() Rush$wait_for_new_tasks() Rush$fetch_failed_tasks() Rush$fetch_tasks() Rush$fetch_tasks_with_state() Rush$wait_for_tasks() Rush$write_hashes() Rush$read_hashes() Rush$read_hash() Rush$is_running_task() Rush$is_failed_task() Rush$tasks_with_state() Rush$clone()","code":""},{"path":"https://rush.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://rush.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, seed = NULL)"},{"path":"https://rush.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. NULL, configuration set rush_plan() used. rush_plan() called, REDIS_URL environment variable parsed. REDIS_URL set, default configuration used. See redux::redis_config details. seed (integer()) Initial seed random number generator. Either L'Ecuyer-CMRG seed (integer(7)) regular RNG seed (integer(1)). later converted L'Ecuyer-CMRG seed. NULL, seed used random number generator.","code":""},{"path":"https://rush.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://rush.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://rush.mlr-org.com/reference/Rush.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"... (ignored).","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"(character()).","code":""},{"path":"https://rush.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://rush.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://rush.mlr-org.com/reference/Rush.html","id":"returns-1","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"(character()).","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"method-start-local-workers-","dir":"Reference","previous_headings":"","what":"Method start_local_workers()","title":"Rush Controller — Rush","text":"Start workers locally processx. processx::process stored $processes. Alternatively, use $create_worker_script() create script starting workers remote machines. default, worker_loop_default() used worker loop. function takes arguments fun optionally constants passed ....","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$start_local_workers( n_workers = NULL, wait_for_workers = TRUE, timeout = Inf, globals = NULL, packages = NULL, heartbeat_period = NULL, heartbeat_expire = NULL, lgr_thresholds = NULL, lgr_buffer_size = 0, supervise = TRUE, worker_loop = worker_loop_default, ... )"},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"arguments-2","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"n_workers (integer(1)) Number workers started. wait_for_workers (logical(1)) Whether wait workers available. timeout (numeric(1)) Timeout wait workers seconds. globals (character()) Global variables loaded workers global environment. packages (character()) Packages loaded workers. 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\"). lgr_buffer_size (integer(1)) default (lgr_buffer_size = 0), log messages directly saved Redis data store. lgr_buffer_size > 0, log messages buffered saved Redis data store buffer full. improves performance logging. supervise (logical(1)) Whether kill workers main R process shut . worker_loop (function) Loop run workers. Defaults worker_loop_default called fun. Pass fun .... Use worker_loop_callr run fun external callr session. ... () Arguments passed worker_loop.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"method-restart-local-workers-","dir":"Reference","previous_headings":"","what":"Method restart_local_workers()","title":"Rush Controller — Rush","text":"Restart local workers. worker still running, killed restarted.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"usage-4","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$restart_local_workers(worker_ids, supervise = TRUE)"},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"arguments-3","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"worker_ids (character()) Worker ids restarted. supervise (logical(1)) Whether kill workers main R process shut .","code":""},{"path":"https://rush.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 remote start workers. Run command pre-start worker. worker wait start arguments pushed $start_remote_workers().","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"usage-5","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$create_worker_script()"},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"method-start-remote-workers-","dir":"Reference","previous_headings":"","what":"Method start_remote_workers()","title":"Rush Controller — Rush","text":"Push start arguments remote workers. Remote workers must pre-started $create_worker_script().","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"usage-6","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$start_remote_workers( globals = NULL, packages = NULL, heartbeat_period = NULL, heartbeat_expire = NULL, lgr_thresholds = NULL, lgr_buffer_size = 0, worker_loop = worker_loop_default, ... )"},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"arguments-4","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"globals (character()) Global variables loaded workers global environment. packages (character()) Packages loaded workers. 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\"). lgr_buffer_size (integer(1)) default (lgr_buffer_size = 0), log messages directly saved Redis data store. lgr_buffer_size > 0, log messages buffered saved Redis data store buffer full. improves performance logging. worker_loop (function) Loop run workers. Defaults worker_loop_default called fun. Pass fun .... Use worker_loop_callr run fun external callr session. ... () Arguments passed worker_loop.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"method-wait-for-workers-","dir":"Reference","previous_headings":"","what":"Method wait_for_workers()","title":"Rush Controller — Rush","text":"Wait n workers available.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"usage-7","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$wait_for_workers(n, timeout = Inf)"},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"arguments-5","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"n (integer(1)) Number workers wait . timeout (numeric(1)) Timeout seconds. Default Inf.","code":""},{"path":"https://rush.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://rush.mlr-org.com/reference/Rush.html","id":"usage-8","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$stop_workers(type = \"terminate\", worker_ids = NULL)"},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"arguments-6","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://rush.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. Lost tasks marked \"lost\".","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"usage-9","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$detect_lost_workers(restart_local_workers = FALSE)"},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"arguments-7","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"restart_local_workers (logical(1)) Whether restart lost workers.","code":""},{"path":"https://rush.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://rush.mlr-org.com/reference/Rush.html","id":"usage-10","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$reset(type = \"kill\")"},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"arguments-8","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.","code":""},{"path":"https://rush.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://rush.mlr-org.com/reference/Rush.html","id":"usage-11","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$read_log(worker_ids = NULL)"},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"arguments-9","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"worker_ids (character(1)) Worker ids. NULL worker ids used.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"method-print-log-","dir":"Reference","previous_headings":"","what":"Method print_log()","title":"Rush Controller — Rush","text":"Print log messages written lgr package worker.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"usage-12","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$print_log()"},{"path":"https://rush.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://rush.mlr-org.com/reference/Rush.html","id":"usage-13","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$push_tasks( xss, extra = NULL, seeds = NULL, timeouts = NULL, max_retries = NULL, terminate_workers = FALSE )"},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"arguments-10","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))). seeds (list()) List L'Ecuyer-CMRG seeds task e.g list(list(c(104071, 490840688, 1690070564, -495119766, 503491950, 1801530932, -1629447803))). NULL initial seed set, L'Ecuyer-CMRG seeds generated initial seed. NULL initial seed set, seeds used random number generator. timeouts (integer()) Timeouts task seconds e.g. c(10, 15). single number used timeout tasks. NULL timeout set. max_retries (integer()) Number retries task. single number used number retries tasks. NULL tasks retried. terminate_workers (logical(1)) Whether stop workers evaluating tasks.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"returns-2","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"(character()) Keys tasks.","code":""},{"path":"https://rush.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://rush.mlr-org.com/reference/Rush.html","id":"usage-14","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$push_priority_tasks(xss, extra = NULL, priority = NULL)"},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"arguments-11","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://rush.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://rush.mlr-org.com/reference/Rush.html","id":"method-push-failed-","dir":"Reference","previous_headings":"","what":"Method push_failed()","title":"Rush Controller — Rush","text":"Pushes failed tasks data base.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"usage-15","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$push_failed(keys, conditions)"},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"arguments-12","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"keys (character(1)) Keys associated tasks. conditions (named list()) List lists conditions.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"method-retry-tasks-","dir":"Reference","previous_headings":"","what":"Method retry_tasks()","title":"Rush Controller — Rush","text":"Retry failed tasks.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"usage-16","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$retry_tasks(keys, ignore_max_retries = FALSE, next_seed = FALSE)"},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"arguments-13","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"keys (character()) Keys tasks retried. ignore_max_retries (logical(1)) Whether ignore maximum number retries. next_seed (logical(1)) Whether change seed task.","code":""},{"path":"https://rush.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://rush.mlr-org.com/reference/Rush.html","id":"usage-17","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$fetch_queued_tasks( fields = c(\"xs\", \"xs_extra\"), data_format = \"data.table\" )"},{"path":"https://rush.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\"). data_format (character()) Returned data format. Choose \"data.table\" \"list\". default \"data.table\" \"list\" easier list columns present.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"returns-4","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"data.table() Table queued tasks.","code":""},{"path":"https://rush.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://rush.mlr-org.com/reference/Rush.html","id":"usage-18","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$fetch_priority_tasks( fields = c(\"xs\", \"xs_extra\"), data_format = \"data.table\" )"},{"path":"https://rush.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\"). data_format (character()) Returned data format. Choose \"data.table\" \"list\". default \"data.table\" \"list\" easier list columns present.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"returns-5","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"data.table() Table queued priority tasks.","code":""},{"path":"https://rush.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://rush.mlr-org.com/reference/Rush.html","id":"usage-19","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$fetch_running_tasks( fields = c(\"xs\", \"xs_extra\", \"worker_extra\"), data_format = \"data.table\" )"},{"path":"https://rush.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\"). data_format (character()) Returned data format. Choose \"data.table\" \"list\". default \"data.table\" \"list\" easier list columns present.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"returns-6","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"data.table() Table running tasks.","code":""},{"path":"https://rush.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://rush.mlr-org.com/reference/Rush.html","id":"usage-20","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$fetch_finished_tasks( fields = c(\"xs\", \"ys\", \"xs_extra\", \"worker_extra\", \"ys_extra\", \"condition\"), reset_cache = FALSE, data_format = \"data.table\" )"},{"path":"https://rush.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\", \"ys\", \"ys_extra\"). reset_cache (logical(1)) Whether reset cache. data_format (character()) Returned data format. Choose \"data.table\" \"list\". default \"data.table\" \"list\" easier list columns present.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"returns-7","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"data.table() Table finished tasks.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"method-wait-for-finished-tasks-","dir":"Reference","previous_headings":"","what":"Method wait_for_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://rush.mlr-org.com/reference/Rush.html","id":"usage-21","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$wait_for_finished_tasks( fields = c(\"xs\", \"ys\", \"xs_extra\", \"worker_extra\", \"ys_extra\"), timeout = Inf, data_format = \"data.table\" )"},{"path":"https://rush.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\"). timeout (numeric(1)) Time wait result seconds. data_format (character()) Returned data format. Choose \"data.table\" \"list\". default \"data.table\" \"list\" easier list columns present.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"returns-8","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"data.table() Table finished tasks.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"method-fetch-new-tasks-","dir":"Reference","previous_headings":"","what":"Method fetch_new_tasks()","title":"Rush Controller — Rush","text":"Fetch finished tasks data base finished last fetch. Updates cache finished tasks.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"usage-22","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$fetch_new_tasks( fields = c(\"xs\", \"ys\", \"xs_extra\", \"worker_extra\", \"ys_extra\", \"condition\"), data_format = \"data.table\" )"},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"arguments-19","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"fields (character()) Fields read hashes. data_format (character()) Returned data format. Choose \"data.table\" \"list\". default \"data.table\" \"list\" easier list columns present.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"returns-9","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"data.table() Latest results.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"method-wait-for-new-tasks-","dir":"Reference","previous_headings":"","what":"Method wait_for_new_tasks()","title":"Rush Controller — Rush","text":"Block process new finished task available. Returns new tasks NULL new task available timeout seconds.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"usage-23","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$wait_for_new_tasks( fields = c(\"xs\", \"ys\", \"xs_extra\", \"worker_extra\", \"ys_extra\", \"condition\"), timeout = Inf, data_format = \"data.table\" )"},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"arguments-20","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\"). timeout (numeric(1)) Time wait new result seconds. data_format (character()) Returned data format. Choose \"data.table\" \"list\". default \"data.table\" \"list\" easier list columns present.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"returns-10","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"data.table() | list().","code":""},{"path":"https://rush.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://rush.mlr-org.com/reference/Rush.html","id":"usage-24","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$fetch_failed_tasks( fields = c(\"xs\", \"worker_extra\", \"condition\"), data_format = \"data.table\" )"},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"arguments-21","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"fields (character()) Fields read hashes. Defaults c(\"xs\", \"xs_extra\", \"worker_extra\", \"condition\". data_format (character()) Returned data format. Choose \"data.table\" \"list\". default \"data.table\" \"list\" easier list columns present.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"returns-11","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"data.table() Table failed tasks.","code":""},{"path":"https://rush.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://rush.mlr-org.com/reference/Rush.html","id":"usage-25","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$fetch_tasks( fields = c(\"xs\", \"ys\", \"xs_extra\", \"worker_extra\", \"ys_extra\", \"condition\"), data_format = \"data.table\" )"},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"arguments-22","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\"). data_format (character()) Returned data format. Choose \"data.table\" \"list\". default \"data.table\" \"list\" easier list columns present.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"returns-12","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"data.table() Table tasks.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"method-fetch-tasks-with-state-","dir":"Reference","previous_headings":"","what":"Method fetch_tasks_with_state()","title":"Rush Controller — Rush","text":"Fetch tasks different states data base. tasks different states queried time, function prevents tasks appearing twice. case worker changes state task tasks fetched. Finished tasks cached.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"usage-26","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$fetch_tasks_with_state( fields = c(\"xs\", \"ys\", \"xs_extra\", \"worker_extra\", \"ys_extra\", \"condition\"), states = c(\"queued\", \"running\", \"finished\", \"failed\"), reset_cache = FALSE, data_format = \"data.table\" )"},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"arguments-23","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"fields (character()) Fields read hashes. Defaults c(\"xs\", \"ys\", \"xs_extra\", \"worker_extra\", \"ys_extra\"). states (character()) States tasks fetched. Defaults c(\"queued\", \"running\", \"finished\", \"failed\"). reset_cache (logical(1)) Whether reset cache finished tasks. data_format (character()) Returned data format. Choose \"data.table\" \"list\". default \"data.table\" \"list\" easier list columns present.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"method-wait-for-tasks-","dir":"Reference","previous_headings":"","what":"Method wait_for_tasks()","title":"Rush Controller — Rush","text":"Wait tasks finished. function also unblocks worker running tasks failed.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"usage-27","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$wait_for_tasks(keys, detect_lost_workers = FALSE)"},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"arguments-24","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"keys (character()) Keys tasks wait . detect_lost_workers (logical(1)) Whether detect failed tasks. Comes overhead.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"method-write-hashes-","dir":"Reference","previous_headings":"","what":"Method write_hashes()","title":"Rush Controller — Rush","text":"Writes R objects Redis hashes. function takes vectors ... input writes element field-value pair 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 vectors 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. vectors recycled length longest vector. lists atomic vectors supported. Arguments NULL ignored.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"usage-28","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$write_hashes(..., .values = list(), keys = NULL)"},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"arguments-25","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.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"returns-13","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"(character()) Keys hashes.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"method-read-hashes-","dir":"Reference","previous_headings":"","what":"Method read_hashes()","title":"Rush Controller — Rush","text":"Reads R Objects Redis hashes. function reads field-value pairs hashes stored keys. values hash deserialized combined list. flatten TRUE, values flattened single list e.g. list(xs = list(x1 = 1, x2 = 2), ys = list(y = 3)) becomes list(x1 = 1, x2 = 2, y = 3). 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://rush.mlr-org.com/reference/Rush.html","id":"usage-29","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$read_hashes(keys, fields, flatten = TRUE)"},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"arguments-26","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"keys (character()) Keys hashes. fields (character()) Fields read hashes. flatten (logical(1)) Whether flatten list.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"returns-14","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://rush.mlr-org.com/reference/Rush.html","id":"method-read-hash-","dir":"Reference","previous_headings":"","what":"Method read_hash()","title":"Rush Controller — Rush","text":"Reads single Redis hash returns values list named fields.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"usage-30","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$read_hash(key, fields)"},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"arguments-27","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"key (character(1)) Key hash. fields (character()) Fields read hash.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"returns-15","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://rush.mlr-org.com/reference/Rush.html","id":"method-is-running-task-","dir":"Reference","previous_headings":"","what":"Method is_running_task()","title":"Rush Controller — Rush","text":"Checks whether tasks status \"running\".","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"usage-31","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$is_running_task(keys)"},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"arguments-28","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"keys (character()) Keys tasks.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"method-is-failed-task-","dir":"Reference","previous_headings":"","what":"Method is_failed_task()","title":"Rush Controller — Rush","text":"Checks whether tasks status \"failed\".","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"usage-32","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$is_failed_task(keys)"},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"arguments-29","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"keys (character()) Keys tasks.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"method-tasks-with-state-","dir":"Reference","previous_headings":"","what":"Method tasks_with_state()","title":"Rush Controller — Rush","text":"Returns keys requested states.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"usage-33","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$tasks_with_state(states)"},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"arguments-30","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"states (character()) States tasks.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"returns-16","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"(Named list character()).","code":""},{"path":"https://rush.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://rush.mlr-org.com/reference/Rush.html","id":"usage-34","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$clone(deep = FALSE)"},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"arguments-31","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"deep Whether make deep clone.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Rush Controller — Rush","text":"","code":"# \\donttest{ config_local = redux::redis_config() rush = rsh(network_id = \"test_network\", config = config_local) #> Error in initialize(...): Can't connect to Redis. Check the configuration. rush #> Error in eval(expr, envir, enclos): object 'rush' not found # }"},{"path":"https://rush.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://rush.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://rush.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://rush.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. remote (logical(1)) Whether worker remote machine. heartbeat (`r_process``) Background process heartbeat.","code":""},{"path":"https://rush.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://rush.mlr-org.com/reference/RushWorker.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Rush Worker — RushWorker","text":"rush::Rush$create_worker_script() rush::Rush$detect_lost_workers() rush::Rush$fetch_failed_tasks() rush::Rush$fetch_finished_tasks() rush::Rush$fetch_new_tasks() rush::Rush$fetch_priority_tasks() rush::Rush$fetch_queued_tasks() rush::Rush$fetch_running_tasks() rush::Rush$fetch_tasks() rush::Rush$fetch_tasks_with_state() rush::Rush$format() rush::Rush$is_failed_task() rush::Rush$is_running_task() rush::Rush$print() rush::Rush$print_log() rush::Rush$push_failed() rush::Rush$push_priority_tasks() rush::Rush$push_tasks() rush::Rush$read_hash() rush::Rush$read_hashes() rush::Rush$read_log() rush::Rush$reset() rush::Rush$restart_local_workers() rush::Rush$retry_tasks() rush::Rush$start_local_workers() rush::Rush$start_remote_workers() rush::Rush$stop_workers() rush::Rush$tasks_with_state() rush::Rush$wait_for_finished_tasks() rush::Rush$wait_for_new_tasks() rush::Rush$wait_for_tasks() rush::Rush$wait_for_workers() rush::Rush$write_hashes()","code":""},{"path":"https://rush.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_tasks() RushWorker$pop_task() RushWorker$push_results() RushWorker$set_terminated() RushWorker$clone()","code":""},{"path":"https://rush.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://rush.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 = NULL, remote, worker_id = NULL, heartbeat_period = NULL, heartbeat_expire = NULL, lgr_thresholds = NULL, lgr_buffer_size = 0, seed = NULL )"},{"path":"https://rush.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. NULL, configuration set rush_plan() used. rush_plan() called, REDIS_URL environment variable parsed. REDIS_URL set, default configuration used. See redux::redis_config details. remote (logical(1)) Whether worker started remote machine. 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\"). lgr_buffer_size (integer(1)) default (lgr_buffer_size = 0), log messages directly saved Redis data store. lgr_buffer_size > 0, log messages buffered saved Redis data store buffer full. improves performance logging. seed (integer()) Initial seed random number generator. Either L'Ecuyer-CMRG seed (integer(7)) regular RNG seed (integer(1)). later converted L'Ecuyer-CMRG seed. NULL, seed used random number generator.","code":""},{"path":"https://rush.mlr-org.com/reference/RushWorker.html","id":"method-push-running-tasks-","dir":"Reference","previous_headings":"","what":"Method push_running_tasks()","title":"Rush Worker — RushWorker","text":"Push task running tasks without queue.","code":""},{"path":"https://rush.mlr-org.com/reference/RushWorker.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Worker — RushWorker","text":"","code":"RushWorker$push_running_tasks(xss, extra = NULL)"},{"path":"https://rush.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://rush.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://rush.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://rush.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, fields = \"xs\")"},{"path":"https://rush.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. fields (character()) Fields returned.","code":""},{"path":"https://rush.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://rush.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, extra = NULL)"},{"path":"https://rush.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.","code":""},{"path":"https://rush.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://rush.mlr-org.com/reference/RushWorker.html","id":"usage-4","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Worker — RushWorker","text":"","code":"RushWorker$set_terminated()"},{"path":"https://rush.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://rush.mlr-org.com/reference/RushWorker.html","id":"usage-5","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Worker — RushWorker","text":"","code":"RushWorker$clone(deep = FALSE)"},{"path":"https://rush.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://rush.mlr-org.com/reference/RushWorker.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Rush Worker — RushWorker","text":"","code":"# \\donttest{ config_local = redux::redis_config() rush = rsh(network_id = \"test_network\", config = config_local) #> Error in initialize(...): Can't connect to Redis. Check the configuration. fun = function(x1, x2, ...) list(y = x1 + x2) rush$start_local_workers(fun = fun) #> Error in eval(expr, envir, enclos): object 'rush' not found rush$stop_workers() #> Error in eval(expr, envir, enclos): object 'rush' not found # }"},{"path":"https://rush.mlr-org.com/reference/get_hostname.html","id":null,"dir":"Reference","previous_headings":"","what":"Get the computer name of the current host — get_hostname","title":"Get the computer name of the current host — get_hostname","text":"Returns computer name current host. First tries get computer name environment variables HOST, HOSTNAME COMPUTERNAME. fails tries get computer name function Sys.info(). Finally, fails queries computer name command uname -n. Copied R.utils package.","code":""},{"path":"https://rush.mlr-org.com/reference/get_hostname.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get the computer name of the current host — get_hostname","text":"","code":"get_hostname()"},{"path":"https://rush.mlr-org.com/reference/get_hostname.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get the computer name of the current host — get_hostname","text":"character(1) hostname.","code":""},{"path":"https://rush.mlr-org.com/reference/get_hostname.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get the computer name of the current host — get_hostname","text":"","code":"get_hostname() #> nodename #> \"fv-az773-598\""},{"path":"https://rush.mlr-org.com/reference/heartbeat.html","id":null,"dir":"Reference","previous_headings":"","what":"Heartbeat Loop — heartbeat","title":"Heartbeat Loop — heartbeat","text":"heartbeat loop updates heartbeat key worker still alive. kill key set, worker killed. function called callr session.","code":""},{"path":"https://rush.mlr-org.com/reference/heartbeat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Heartbeat Loop — heartbeat","text":"","code":"heartbeat( network_id, config, worker_id, heartbeat_period, heartbeat_expire, pid )"},{"path":"https://rush.mlr-org.com/reference/heartbeat.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Heartbeat Loop — 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. 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://rush.mlr-org.com/reference/heartbeat.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Heartbeat Loop — heartbeat","text":"NULL","code":""},{"path":"https://rush.mlr-org.com/reference/heartbeat.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Heartbeat Loop — heartbeat","text":"","code":"# \\donttest{ config_local = redux::redis_config() rush_plan( config = config_local, n_workers = 2, lgr_thresholds = c(rush = \"info\")) #> Error in rush_plan(config = config_local, n_workers = 2, lgr_thresholds = c(rush = \"info\")): Can't connect to Redis. Check the configuration. rush = rsh(network_id = \"test_network\") #> Error in initialize(...): Can't connect to Redis. Check the configuration. fun = function(x1, x2, ...) list(y = x1 + x2) rush$start_local_workers( fun = fun, heartbeat_period = 3, heartbeat_expire = 9) #> Error in eval(expr, envir, enclos): object 'rush' not found rush$stop_workers() #> Error in eval(expr, envir, enclos): object 'rush' not found # }"},{"path":"https://rush.mlr-org.com/reference/remove_rush_plan.html","id":null,"dir":"Reference","previous_headings":"","what":"Remove Rush Plan — remove_rush_plan","title":"Remove Rush Plan — remove_rush_plan","text":"Removes rush plan set rush_plan().","code":""},{"path":"https://rush.mlr-org.com/reference/remove_rush_plan.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Remove Rush Plan — remove_rush_plan","text":"","code":"remove_rush_plan()"},{"path":"https://rush.mlr-org.com/reference/remove_rush_plan.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Remove Rush Plan — remove_rush_plan","text":"","code":"# \\donttest{ config_local = redux::redis_config() rush_plan(config = config_local, n_workers = 2) #> Error in rush_plan(config = config_local, n_workers = 2): Can't connect to Redis. Check the configuration. remove_rush_plan() # }"},{"path":"https://rush.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://rush.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://rush.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. NULL, configuration set rush_plan() used. rush_plan() called, REDIS_URL environment variable parsed. REDIS_URL set, default configuration used. See redux::redis_config details. ... (ignored).","code":""},{"path":"https://rush.mlr-org.com/reference/rsh.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Synctatic Sugar for Rush Controller Construction — rsh","text":"Rush controller.","code":""},{"path":"https://rush.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":"# \\donttest{ config_local = redux::redis_config() rush = rsh(network_id = \"test_network\", config = config_local) #> Error in initialize(...): Can't connect to Redis. Check the configuration. rush #> Error in eval(expr, envir, enclos): object 'rush' not found # }"},{"path":"https://rush.mlr-org.com/reference/rush-package.html","id":null,"dir":"Reference","previous_headings":"","what":"rush: Rapid Parallel and Distributed Computing — rush-package","title":"rush: Rapid Parallel and Distributed Computing — rush-package","text":"Parallel computing network local remote workers. Fast exchange results workers 'Redis' database. Key features include task queues, local caching, sophisticated error handling.","code":""},{"path":"https://rush.mlr-org.com/reference/rush-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"rush: Rapid Parallel and Distributed Computing — rush-package","text":"Maintainer: Marc Becker marcbecker@posteo.de (ORCID) [copyright holder]","code":""},{"path":"https://rush.mlr-org.com/reference/rush_assertions.html","id":null,"dir":"Reference","previous_headings":"","what":"Assertion for Rush Objects — rush_assertions","title":"Assertion for Rush Objects — rush_assertions","text":"assertion functions ensure right class attribute, optionally additional properties. assertion fails, exception raised. Otherwise, input object returned invisibly.","code":""},{"path":"https://rush.mlr-org.com/reference/rush_assertions.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Assertion for Rush Objects — rush_assertions","text":"","code":"assert_rush(rush, null_ok = FALSE) assert_rushs(rushs, null_ok = FALSE) assert_rush_worker(worker, null_ok = FALSE) assert_rush_workers(workers, null_ok = FALSE)"},{"path":"https://rush.mlr-org.com/reference/rush_assertions.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Assertion for Rush Objects — rush_assertions","text":"rush (Rush). null_ok (logical(1)). TRUE, NULL allowed. rushs (list Rush). worker (RushWorker). workers (list RushWorker).","code":""},{"path":"https://rush.mlr-org.com/reference/rush_assertions.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Assertion for Rush Objects — rush_assertions","text":"Exception assertion fails, otherwise input object invisibly.","code":""},{"path":"https://rush.mlr-org.com/reference/rush_assertions.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Assertion for Rush Objects — rush_assertions","text":"","code":"# \\donttest{ config_local = redux::redis_config() rush = rsh(network_id = \"test_network\", config = config_local) #> Error in initialize(...): Can't connect to Redis. Check the configuration. assert_rush(rush) #> Error in eval(expr, envir, enclos): object 'rush' not found # }"},{"path":"https://rush.mlr-org.com/reference/rush_available.html","id":null,"dir":"Reference","previous_headings":"","what":"Rush Available — rush_available","title":"Rush Available — rush_available","text":"Returns TRUE redis config file (redux::redis_config) set rush_plan().","code":""},{"path":"https://rush.mlr-org.com/reference/rush_available.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Available — rush_available","text":"","code":"rush_available()"},{"path":"https://rush.mlr-org.com/reference/rush_available.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Rush Available — rush_available","text":"logical(1)","code":""},{"path":"https://rush.mlr-org.com/reference/rush_available.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Rush Available — rush_available","text":"","code":"# \\donttest{ config_local = redux::redis_config() rush_plan(config = config_local, n_workers = 2) #> Error in rush_plan(config = config_local, n_workers = 2): Can't connect to Redis. Check the configuration. rush_available() #> [1] FALSE # }"},{"path":"https://rush.mlr-org.com/reference/rush_config.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Rush Config — rush_config","title":"Get Rush Config — rush_config","text":"Returns rush config set rush_plan().","code":""},{"path":"https://rush.mlr-org.com/reference/rush_config.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Rush Config — rush_config","text":"","code":"rush_config()"},{"path":"https://rush.mlr-org.com/reference/rush_config.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get Rush Config — rush_config","text":"list() stored configuration.","code":""},{"path":"https://rush.mlr-org.com/reference/rush_config.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get Rush Config — rush_config","text":"","code":"# \\donttest{ config_local = redux::redis_config() rush_plan(config = config_local, n_workers = 2) #> Error in rush_plan(config = config_local, n_workers = 2): Can't connect to Redis. Check the configuration. rush_config() #> $config #> NULL #> #> $n_workers #> NULL #> #> $lgr_thresholds #> NULL #> #> $large_objects_path #> NULL #> #> $start_worker_timeout #> NULL #> # }"},{"path":"https://rush.mlr-org.com/reference/rush_plan.html","id":null,"dir":"Reference","previous_headings":"","what":"Create Rush Plan — rush_plan","title":"Create Rush Plan — rush_plan","text":"Stores number workers Redis configuration options (redux::redis_config) Rush. function tests connection Redis throws error connection fails.","code":""},{"path":"https://rush.mlr-org.com/reference/rush_plan.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create Rush Plan — rush_plan","text":"","code":"rush_plan( n_workers = NULL, config = NULL, lgr_thresholds = NULL, large_objects_path = NULL, start_worker_timeout = Inf )"},{"path":"https://rush.mlr-org.com/reference/rush_plan.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create Rush Plan — rush_plan","text":"n_workers (integer(1)) Number workers started. config (redux::redis_config) Configuration options used connect Redis. NULL, REDIS_URL environment variable parsed. REDIS_URL set, default configuration used. See redux::redis_config details. lgr_thresholds (named character() | named numeric()) Logger threshold workers e.g. c(rush = \"debug\"). large_objects_path (character(1)) path directory large objects stored. start_worker_timeout (numeric(1)) time seconds wait worker start.","code":""},{"path":"https://rush.mlr-org.com/reference/rush_plan.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create Rush Plan — rush_plan","text":"list() stored configuration.","code":""},{"path":"https://rush.mlr-org.com/reference/rush_plan.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create Rush Plan — rush_plan","text":"","code":"# \\donttest{ config_local = redux::redis_config() rush_plan(config = config_local, n_workers = 2) #> Error in rush_plan(config = config_local, n_workers = 2): Can't connect to Redis. Check the configuration. rush = rsh(network_id = \"test_network\") #> Error in initialize(...): Can't connect to Redis. Check the configuration. rush #> Error in eval(expr, envir, enclos): object 'rush' not found # }"},{"path":"https://rush.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 loads globals packages, initializes RushWorker instance invokes worker loop. function called $start_local_workers() user creating worker script $create_worker_script().","code":""},{"path":"https://rush.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, worker_id = NULL, remote = TRUE, ...)"},{"path":"https://rush.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. worker_id (character(1)) Identifier worker. Keys redis specific worker prefixed worker id. remote (logical(1)) Whether worker remote machine. ... () Arguments passed redux::redis_config.","code":""},{"path":"https://rush.mlr-org.com/reference/start_worker.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Start a worker — start_worker","text":"NULL","code":""},{"path":"https://rush.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 initialize RushWorker instance starts worker loop.","code":""},{"path":"https://rush.mlr-org.com/reference/start_worker.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Start a worker — start_worker","text":"","code":"if (FALSE) { rush::start_worker( network_id = 'test-rush', remote = TRUE, url = 'redis://127.0.0.1:6379', scheme = 'redis', host = '127.0.0.1', port = '6379') }"},{"path":"https://rush.mlr-org.com/reference/store_large_object.html","id":null,"dir":"Reference","previous_headings":"","what":"Store Large Objects — store_large_object","title":"Store Large Objects — store_large_object","text":"Store large objects disk return reference object.","code":""},{"path":"https://rush.mlr-org.com/reference/store_large_object.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Store Large Objects — store_large_object","text":"","code":"store_large_object(obj, path)"},{"path":"https://rush.mlr-org.com/reference/store_large_object.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Store Large Objects — store_large_object","text":"obj () Object store. path (character(1)) Path store object.","code":""},{"path":"https://rush.mlr-org.com/reference/store_large_object.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Store Large Objects — store_large_object","text":"list() class \"rush_large_object\" name path stored object.","code":""},{"path":"https://rush.mlr-org.com/reference/store_large_object.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Store Large Objects — store_large_object","text":"","code":"obj = list(a = 1, b = 2) rush_large_object = store_large_object(obj, tempdir())"},{"path":"https://rush.mlr-org.com/reference/with_rng_state.html","id":null,"dir":"Reference","previous_headings":"","what":"Set RNG Sate before Running a Function — with_rng_state","title":"Set RNG Sate before Running a Function — with_rng_state","text":"function sets rng state running function.","code":""},{"path":"https://rush.mlr-org.com/reference/with_rng_state.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set RNG Sate before Running a Function — with_rng_state","text":"","code":"with_rng_state(fun, args, seed)"},{"path":"https://rush.mlr-org.com/reference/with_rng_state.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set RNG Sate before Running a Function — with_rng_state","text":"fun (function) Function run. args (list) Arguments pass fun. seed (integer) RNG state set running fun.","code":""},{"path":[]},{"path":"https://rush.mlr-org.com/reference/with_rng_state.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Set RNG Sate before Running a Function — with_rng_state","text":"","code":"with_rng_state(runif, list(n = 1), .Random.seed) #> [1] 0.08075014"},{"path":"https://rush.mlr-org.com/reference/worker_loop_callr.html","id":null,"dir":"Reference","previous_headings":"","what":"Single Task Worker Loop with callr Encapsulation — worker_loop_callr","title":"Single Task Worker Loop with callr Encapsulation — worker_loop_callr","text":"Worker loop pops single task queue, executes function external callr session pushes results. Supports timeouts tasks.","code":""},{"path":"https://rush.mlr-org.com/reference/worker_loop_callr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Single Task Worker Loop with callr Encapsulation — worker_loop_callr","text":"","code":"worker_loop_callr(fun, constants = NULL, rush)"},{"path":"https://rush.mlr-org.com/reference/worker_loop_callr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Single Task Worker Loop with callr Encapsulation — worker_loop_callr","text":"fun (function) Function executed. constants (list) List constants passed fun. rush (RushWorker) Rush worker instance.","code":""},{"path":"https://rush.mlr-org.com/reference/worker_loop_callr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Single Task Worker Loop with callr Encapsulation — worker_loop_callr","text":"NULL","code":""},{"path":"https://rush.mlr-org.com/reference/worker_loop_callr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Single Task Worker Loop with callr Encapsulation — worker_loop_callr","text":"","code":"# \\donttest{ config_local = redux::redis_config() rush = rsh(network_id = \"test_network\", config = config_local) #> Error in initialize(...): Can't connect to Redis. Check the configuration. fun = function(x1, x2, ...) list(y = x1 + x2) rush$start_local_workers( fun = fun, worker_loop = worker_loop_callr) #> Error in eval(expr, envir, enclos): object 'rush' not found rush$stop_workers() #> Error in eval(expr, envir, enclos): object 'rush' not found # }"},{"path":"https://rush.mlr-org.com/reference/worker_loop_default.html","id":null,"dir":"Reference","previous_headings":"","what":"Single Task Worker Loop — worker_loop_default","title":"Single Task Worker Loop — worker_loop_default","text":"Worker loop pops single task queue, executes function pushes results.","code":""},{"path":"https://rush.mlr-org.com/reference/worker_loop_default.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Single Task Worker Loop — worker_loop_default","text":"","code":"worker_loop_default(fun, constants = NULL, rush)"},{"path":"https://rush.mlr-org.com/reference/worker_loop_default.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Single Task Worker Loop — worker_loop_default","text":"fun (function) Function executed. constants (list) List constants passed fun. rush (RushWorker) Rush worker instance.","code":""},{"path":"https://rush.mlr-org.com/reference/worker_loop_default.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Single Task Worker Loop — worker_loop_default","text":"NULL","code":""},{"path":"https://rush.mlr-org.com/reference/worker_loop_default.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Single Task Worker Loop — worker_loop_default","text":"","code":"# \\donttest{ config_local = redux::redis_config() rush = rsh(network_id = \"test_network\", config = config_local) #> Error in initialize(...): Can't connect to Redis. Check the configuration. fun = function(x1, x2, ...) list(y = x1 + x2) rush$start_local_workers( fun = fun, worker_loop = worker_loop_default) #> Error in eval(expr, envir, enclos): object 'rush' not found rush$stop_workers() #> Error in eval(expr, envir, enclos): object 'rush' not found # }"},{"path":"https://rush.mlr-org.com/news/index.html","id":"rush-development-version","dir":"Changelog","previous_headings":"","what":"rush (development version)","title":"rush (development version)","text":"Initial CRAN submission.","code":""}]
+[{"path":"https://rush.mlr-org.com/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Marc Becker. Maintainer, author, copyright holder.","code":""},{"path":"https://rush.mlr-org.com/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Becker M (2024). rush: Rapid Parallel Distributed Computing. R package version 0.0.0.9000, https://github.com/mlr-org/rush.","code":"@Manual{, title = {rush: Rapid Parallel and Distributed Computing}, author = {Marc Becker}, year = {2024}, note = {R package version 0.0.0.9000}, url = {https://github.com/mlr-org/rush}, }"},{"path":"https://rush.mlr-org.com/index.html","id":"rush","dir":"","previous_headings":"","what":"Rapid Parallel and Distributed Computing","title":"Rapid Parallel and Distributed Computing","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://rush.mlr-org.com/index.html","id":"features","dir":"","previous_headings":"","what":"Features","title":"Rapid Parallel and Distributed Computing","text":"Parallelize arbitrary R expressions. Centralized decentralized network architecture. Small overhead milliseconds per task. Easy start local workers processx 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://rush.mlr-org.com/index.html","id":"install","dir":"","previous_headings":"","what":"Install","title":"Rapid Parallel and Distributed Computing","text":"Install development version GitHub. install Redis.","code":"remotes::install_github(\"mlr-org/rush\")"},{"path":"https://rush.mlr-org.com/index.html","id":"centralized-rush-network","dir":"","previous_headings":"","what":"Centralized Rush Network","title":"Rapid Parallel and Distributed Computing","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. 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) } rush$start_local_workers(fun = fun, n_workers = 2) ## INFO [16:06:19.324] [rush] Starting 2 worker(s) xss = list(list(x1 = 3, x2 = 5), list(x1 = 4, x2 = 6)) keys = rush$push_tasks(xss) rush$wait_for_tasks(keys) rush$fetch_finished_tasks() ## x1 x2 y pid worker_id keys ## ## 1: 4 6 10 448184 ebb0d9b4-3... 37ba4683-5... ## 2: 3 5 8 448173 f49aad09-a... 27b4b03b-d..."},{"path":"https://rush.mlr-org.com/index.html","id":"decentralized-rush-network","dir":"","previous_headings":"","what":"Decentralized Rush Network","title":"Rapid Parallel and Distributed Computing","text":"Decentralized network four workers.","code":""},{"path":"https://rush.mlr-org.com/reference/AppenderRedis.html","id":null,"dir":"Reference","previous_headings":"","what":"Log to Redis Database — AppenderRedis","title":"Log to Redis Database — AppenderRedis","text":"AppenderRedis writes log messages Redis data base. lgr::Appender created internally RushWorker logger thresholds passed via rush_plan().","code":""},{"path":"https://rush.mlr-org.com/reference/AppenderRedis.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Log to Redis Database — AppenderRedis","text":"lgr::Filterable -> lgr::Appender -> lgr::AppenderMemory -> AppenderRedis","code":""},{"path":"https://rush.mlr-org.com/reference/AppenderRedis.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Log to Redis Database — AppenderRedis","text":"lgr::Filterable$add_filter() lgr::Filterable$filter() lgr::Filterable$remove_filter() lgr::Filterable$set_filters() lgr::Appender$set_layout() lgr::Appender$set_threshold() lgr::AppenderMemory$append() lgr::AppenderMemory$clear() lgr::AppenderMemory$format() lgr::AppenderMemory$set_buffer_size() lgr::AppenderMemory$set_flush_on_exit() lgr::AppenderMemory$set_flush_on_rotate() lgr::AppenderMemory$set_flush_threshold() lgr::AppenderMemory$set_should_flush() lgr::AppenderMemory$show()","code":""},{"path":"https://rush.mlr-org.com/reference/AppenderRedis.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Log to Redis Database — AppenderRedis","text":"AppenderRedis$new() AppenderRedis$flush()","code":""},{"path":"https://rush.mlr-org.com/reference/AppenderRedis.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Log to Redis Database — AppenderRedis","text":"Creates new instance R6 class.","code":""},{"path":"https://rush.mlr-org.com/reference/AppenderRedis.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Log to Redis Database — AppenderRedis","text":"","code":"AppenderRedis$new( config, key, threshold = NA_integer_, layout = lgr::LayoutJson$new(), buffer_size = 0, flush_threshold = \"error\", flush_on_exit = TRUE, flush_on_rotate = TRUE, should_flush = NULL, filters = NULL )"},{"path":"https://rush.mlr-org.com/reference/AppenderRedis.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Log to Redis Database — AppenderRedis","text":"config (redux::redis_config) Redis configuration options. key (character(1)) Key list holding log messages Redis data store. threshold (integer(1) | character(1)) Threshold log messages. layout (lgr::Layout) Layout log messages. buffer_size (integer(1)) Size buffer. flush_threshold (character(1)) Threshold flushing buffer. flush_on_exit (logical(1)) Flush buffer exit. flush_on_rotate (logical(1)) Flush buffer rotate. should_flush (function) Function determines buffer flushed. filters (list) List filters.","code":""},{"path":"https://rush.mlr-org.com/reference/AppenderRedis.html","id":"method-flush-","dir":"Reference","previous_headings":"","what":"Method flush()","title":"Log to Redis Database — AppenderRedis","text":"Sends buffer's contents Redis data store, clears buffer.","code":""},{"path":"https://rush.mlr-org.com/reference/AppenderRedis.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Log to Redis Database — AppenderRedis","text":"","code":"AppenderRedis$flush()"},{"path":"https://rush.mlr-org.com/reference/AppenderRedis.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Log to Redis Database — AppenderRedis","text":"","code":"# \\donttest{ config_local = redux::redis_config() rush_plan( config = config_local, n_workers = 2, lgr_thresholds = c(rush = \"info\")) #> Error in rush_plan(config = config_local, n_workers = 2, lgr_thresholds = c(rush = \"info\")): Can't connect to Redis. Check the configuration. rush = rsh(network_id = \"test_network\") #> Error in initialize(...): Can't connect to Redis. Check the configuration. rush #> Error in eval(expr, envir, enclos): object 'rush' not found # }"},{"path":"https://rush.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://rush.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. Local workers spawned $start_local_workers() method via processx` package.","code":""},{"path":"https://rush.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 started manually $create_worker_script() $start_remote_workers() methods. Remote workers can started system long system access Redis required packages installed. heartbeat process can kill remote workers. heartbeat process also monitors remote workers crashes.","code":""},{"path":"https://rush.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 processx package. Remote workers killed pushing kill signal heartbeat process. Without heartbeat process remote worker killed (see section heartbeat).","code":""},{"path":"https://rush.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://rush.mlr-org.com/reference/Rush.html","id":"data-structure","dir":"Reference","previous_headings":"","what":"Data Structure","title":"Rush Controller — Rush","text":"Tasks stored Redis hashes. Hashes collections field-value pairs. key hash identifies task Redis rush. field-value pairs written different methods, e.g. $push_tasks() writes xs $push_results() writes ys. values fields serialized lists atomic values e.g. unserializing xs gives list(x1 = 1, x2 = 2) data structure allows quick converting hash row joining multiple hashes table. value field named list, field can store cells multiple columns table. value field atomic value, field stores single cell column named field. 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 | xs_extra | key | x1 | x2 | y | timestamp | | 1.. | 3 | 4 | 7 | 12:04:11 | | 2.. | 1 | 4 | 5 | 12:04:12 | | 3.. | 1 | 1 | 2 | 12:04:13 |"},{"path":"https://rush.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://rush.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://rush.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(). methods $fetch_new_tasks() $fetch_finished_tasks() cache already queried data. $wait_for_finished_tasks() variant wait new result available.","code":""},{"path":"https://rush.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. method $detect_lost_workers() identifies lost workers. Running method periodically adds small overhead.","code":""},{"path":"https://rush.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://rush.mlr-org.com/reference/Rush.html","id":"seed","dir":"Reference","previous_headings":"","what":"Seed","title":"Rush Controller — Rush","text":"Setting seed important reproducibility. tasks can evaluated specific L'Ecuyer-CMRG seed. initial seed passed, seed used generate L'Ecuyer-CMRG seeds task. task evaluated separate RNG stream. See parallel::nextRNGStream details.","code":""},{"path":"https://rush.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. processes (processx::process) List processes started $start_local_workers().","code":""},{"path":"https://rush.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. n_terminated_workers (integer(1)) Number terminated workers. n_killed_workers (integer(1)) Number killed workers. n_lost_workers (integer(1)) Number lost workers. Run $detect_lost_workers() update number lost workers. n_pre_workers (integer(1)) Number workers yet completely started. 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. pre_worker_ids (character()) Ids workers yet completely started. 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. worker_info (data.table::data.table()) Contains information workers. worker_states (data.table::data.table()) Contains states workers. all_workers_terminated (logical(1)) Whether workers terminated. all_workers_lost (logical(1)) Whether workers lost. Runs $detect_lost_workers() detect lost 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. redis_info (list()) Information Redis server.","code":""},{"path":[]},{"path":"https://rush.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_local_workers() Rush$restart_local_workers() Rush$create_worker_script() Rush$start_remote_workers() Rush$wait_for_workers() Rush$stop_workers() Rush$detect_lost_workers() Rush$reset() Rush$read_log() Rush$print_log() Rush$push_tasks() Rush$push_priority_tasks() Rush$push_failed() Rush$retry_tasks() Rush$fetch_queued_tasks() Rush$fetch_priority_tasks() Rush$fetch_running_tasks() Rush$fetch_finished_tasks() Rush$wait_for_finished_tasks() Rush$fetch_new_tasks() Rush$wait_for_new_tasks() Rush$fetch_failed_tasks() Rush$fetch_tasks() Rush$fetch_tasks_with_state() Rush$wait_for_tasks() Rush$write_hashes() Rush$read_hashes() Rush$read_hash() Rush$is_running_task() Rush$is_failed_task() Rush$tasks_with_state() Rush$clone()","code":""},{"path":"https://rush.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://rush.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, seed = NULL)"},{"path":"https://rush.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. NULL, configuration set rush_plan() used. rush_plan() called, REDIS_URL environment variable parsed. REDIS_URL set, default configuration used. See redux::redis_config details. seed (integer()) Initial seed random number generator. Either L'Ecuyer-CMRG seed (integer(7)) regular RNG seed (integer(1)). later converted L'Ecuyer-CMRG seed. NULL, seed used random number generator.","code":""},{"path":"https://rush.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://rush.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://rush.mlr-org.com/reference/Rush.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"... (ignored).","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"(character()).","code":""},{"path":"https://rush.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://rush.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://rush.mlr-org.com/reference/Rush.html","id":"returns-1","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"(character()).","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"method-start-local-workers-","dir":"Reference","previous_headings":"","what":"Method start_local_workers()","title":"Rush Controller — Rush","text":"Start workers locally processx. processx::process stored $processes. Alternatively, use $create_worker_script() create script starting workers remote machines. default, worker_loop_default() used worker loop. function takes arguments fun optionally constants passed ....","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$start_local_workers( n_workers = NULL, wait_for_workers = TRUE, timeout = Inf, globals = NULL, packages = NULL, heartbeat_period = NULL, heartbeat_expire = NULL, lgr_thresholds = NULL, lgr_buffer_size = 0, supervise = TRUE, worker_loop = worker_loop_default, ... )"},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"arguments-2","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"n_workers (integer(1)) Number workers started. wait_for_workers (logical(1)) Whether wait workers available. timeout (numeric(1)) Timeout wait workers seconds. globals (character()) Global variables loaded workers global environment. packages (character()) Packages loaded workers. 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\"). lgr_buffer_size (integer(1)) default (lgr_buffer_size = 0), log messages directly saved Redis data store. lgr_buffer_size > 0, log messages buffered saved Redis data store buffer full. improves performance logging. supervise (logical(1)) Whether kill workers main R process shut . worker_loop (function) Loop run workers. Defaults worker_loop_default called fun. Pass fun .... Use worker_loop_callr run fun external callr session. ... () Arguments passed worker_loop.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"method-restart-local-workers-","dir":"Reference","previous_headings":"","what":"Method restart_local_workers()","title":"Rush Controller — Rush","text":"Restart local workers. worker still running, killed restarted.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"usage-4","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$restart_local_workers(worker_ids, supervise = TRUE)"},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"arguments-3","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"worker_ids (character()) Worker ids restarted. supervise (logical(1)) Whether kill workers main R process shut .","code":""},{"path":"https://rush.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 remote start workers. Run command pre-start worker. worker wait start arguments pushed $start_remote_workers().","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"usage-5","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$create_worker_script()"},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"method-start-remote-workers-","dir":"Reference","previous_headings":"","what":"Method start_remote_workers()","title":"Rush Controller — Rush","text":"Push start arguments remote workers. Remote workers must pre-started $create_worker_script().","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"usage-6","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$start_remote_workers( globals = NULL, packages = NULL, heartbeat_period = NULL, heartbeat_expire = NULL, lgr_thresholds = NULL, lgr_buffer_size = 0, worker_loop = worker_loop_default, ... )"},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"arguments-4","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"globals (character()) Global variables loaded workers global environment. packages (character()) Packages loaded workers. 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\"). lgr_buffer_size (integer(1)) default (lgr_buffer_size = 0), log messages directly saved Redis data store. lgr_buffer_size > 0, log messages buffered saved Redis data store buffer full. improves performance logging. worker_loop (function) Loop run workers. Defaults worker_loop_default called fun. Pass fun .... Use worker_loop_callr run fun external callr session. ... () Arguments passed worker_loop.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"method-wait-for-workers-","dir":"Reference","previous_headings":"","what":"Method wait_for_workers()","title":"Rush Controller — Rush","text":"Wait n workers available.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"usage-7","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$wait_for_workers(n, timeout = Inf)"},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"arguments-5","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"n (integer(1)) Number workers wait . timeout (numeric(1)) Timeout seconds. Default Inf.","code":""},{"path":"https://rush.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://rush.mlr-org.com/reference/Rush.html","id":"usage-8","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$stop_workers(type = \"terminate\", worker_ids = NULL)"},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"arguments-6","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://rush.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. Lost tasks marked \"lost\".","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"usage-9","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$detect_lost_workers(restart_local_workers = FALSE)"},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"arguments-7","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"restart_local_workers (logical(1)) Whether restart lost workers.","code":""},{"path":"https://rush.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://rush.mlr-org.com/reference/Rush.html","id":"usage-10","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$reset(type = \"kill\")"},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"arguments-8","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.","code":""},{"path":"https://rush.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://rush.mlr-org.com/reference/Rush.html","id":"usage-11","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$read_log(worker_ids = NULL)"},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"arguments-9","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"worker_ids (character(1)) Worker ids. NULL worker ids used.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"method-print-log-","dir":"Reference","previous_headings":"","what":"Method print_log()","title":"Rush Controller — Rush","text":"Print log messages written lgr package worker.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"usage-12","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$print_log()"},{"path":"https://rush.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://rush.mlr-org.com/reference/Rush.html","id":"usage-13","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$push_tasks( xss, extra = NULL, seeds = NULL, timeouts = NULL, max_retries = NULL, terminate_workers = FALSE )"},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"arguments-10","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))). seeds (list()) List L'Ecuyer-CMRG seeds task e.g list(list(c(104071, 490840688, 1690070564, -495119766, 503491950, 1801530932, -1629447803))). NULL initial seed set, L'Ecuyer-CMRG seeds generated initial seed. NULL initial seed set, seeds used random number generator. timeouts (integer()) Timeouts task seconds e.g. c(10, 15). single number used timeout tasks. NULL timeout set. max_retries (integer()) Number retries task. single number used number retries tasks. NULL tasks retried. terminate_workers (logical(1)) Whether stop workers evaluating tasks.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"returns-2","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"(character()) Keys tasks.","code":""},{"path":"https://rush.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://rush.mlr-org.com/reference/Rush.html","id":"usage-14","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$push_priority_tasks(xss, extra = NULL, priority = NULL)"},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"arguments-11","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://rush.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://rush.mlr-org.com/reference/Rush.html","id":"method-push-failed-","dir":"Reference","previous_headings":"","what":"Method push_failed()","title":"Rush Controller — Rush","text":"Pushes failed tasks data base.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"usage-15","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$push_failed(keys, conditions)"},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"arguments-12","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"keys (character(1)) Keys associated tasks. conditions (named list()) List lists conditions.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"method-retry-tasks-","dir":"Reference","previous_headings":"","what":"Method retry_tasks()","title":"Rush Controller — Rush","text":"Retry failed tasks.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"usage-16","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$retry_tasks(keys, ignore_max_retries = FALSE, next_seed = FALSE)"},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"arguments-13","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"keys (character()) Keys tasks retried. ignore_max_retries (logical(1)) Whether ignore maximum number retries. next_seed (logical(1)) Whether change seed task.","code":""},{"path":"https://rush.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://rush.mlr-org.com/reference/Rush.html","id":"usage-17","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$fetch_queued_tasks( fields = c(\"xs\", \"xs_extra\"), data_format = \"data.table\" )"},{"path":"https://rush.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\"). data_format (character()) Returned data format. Choose \"data.table\" \"list\". default \"data.table\" \"list\" easier list columns present.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"returns-4","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"data.table() Table queued tasks.","code":""},{"path":"https://rush.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://rush.mlr-org.com/reference/Rush.html","id":"usage-18","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$fetch_priority_tasks( fields = c(\"xs\", \"xs_extra\"), data_format = \"data.table\" )"},{"path":"https://rush.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\"). data_format (character()) Returned data format. Choose \"data.table\" \"list\". default \"data.table\" \"list\" easier list columns present.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"returns-5","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"data.table() Table queued priority tasks.","code":""},{"path":"https://rush.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://rush.mlr-org.com/reference/Rush.html","id":"usage-19","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$fetch_running_tasks( fields = c(\"xs\", \"xs_extra\", \"worker_extra\"), data_format = \"data.table\" )"},{"path":"https://rush.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\"). data_format (character()) Returned data format. Choose \"data.table\" \"list\". default \"data.table\" \"list\" easier list columns present.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"returns-6","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"data.table() Table running tasks.","code":""},{"path":"https://rush.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://rush.mlr-org.com/reference/Rush.html","id":"usage-20","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$fetch_finished_tasks( fields = c(\"xs\", \"ys\", \"xs_extra\", \"worker_extra\", \"ys_extra\", \"condition\"), reset_cache = FALSE, data_format = \"data.table\" )"},{"path":"https://rush.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\", \"ys\", \"ys_extra\"). reset_cache (logical(1)) Whether reset cache. data_format (character()) Returned data format. Choose \"data.table\" \"list\". default \"data.table\" \"list\" easier list columns present.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"returns-7","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"data.table() Table finished tasks.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"method-wait-for-finished-tasks-","dir":"Reference","previous_headings":"","what":"Method wait_for_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://rush.mlr-org.com/reference/Rush.html","id":"usage-21","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$wait_for_finished_tasks( fields = c(\"xs\", \"ys\", \"xs_extra\", \"worker_extra\", \"ys_extra\"), timeout = Inf, data_format = \"data.table\" )"},{"path":"https://rush.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\"). timeout (numeric(1)) Time wait result seconds. data_format (character()) Returned data format. Choose \"data.table\" \"list\". default \"data.table\" \"list\" easier list columns present.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"returns-8","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"data.table() Table finished tasks.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"method-fetch-new-tasks-","dir":"Reference","previous_headings":"","what":"Method fetch_new_tasks()","title":"Rush Controller — Rush","text":"Fetch finished tasks data base finished last fetch. Updates cache finished tasks.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"usage-22","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$fetch_new_tasks( fields = c(\"xs\", \"ys\", \"xs_extra\", \"worker_extra\", \"ys_extra\", \"condition\"), data_format = \"data.table\" )"},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"arguments-19","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"fields (character()) Fields read hashes. data_format (character()) Returned data format. Choose \"data.table\" \"list\". default \"data.table\" \"list\" easier list columns present.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"returns-9","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"data.table() Latest results.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"method-wait-for-new-tasks-","dir":"Reference","previous_headings":"","what":"Method wait_for_new_tasks()","title":"Rush Controller — Rush","text":"Block process new finished task available. Returns new tasks NULL new task available timeout seconds.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"usage-23","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$wait_for_new_tasks( fields = c(\"xs\", \"ys\", \"xs_extra\", \"worker_extra\", \"ys_extra\", \"condition\"), timeout = Inf, data_format = \"data.table\" )"},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"arguments-20","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\"). timeout (numeric(1)) Time wait new result seconds. data_format (character()) Returned data format. Choose \"data.table\" \"list\". default \"data.table\" \"list\" easier list columns present.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"returns-10","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"data.table() | list().","code":""},{"path":"https://rush.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://rush.mlr-org.com/reference/Rush.html","id":"usage-24","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$fetch_failed_tasks( fields = c(\"xs\", \"worker_extra\", \"condition\"), data_format = \"data.table\" )"},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"arguments-21","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"fields (character()) Fields read hashes. Defaults c(\"xs\", \"xs_extra\", \"worker_extra\", \"condition\". data_format (character()) Returned data format. Choose \"data.table\" \"list\". default \"data.table\" \"list\" easier list columns present.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"returns-11","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"data.table() Table failed tasks.","code":""},{"path":"https://rush.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://rush.mlr-org.com/reference/Rush.html","id":"usage-25","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$fetch_tasks( fields = c(\"xs\", \"ys\", \"xs_extra\", \"worker_extra\", \"ys_extra\", \"condition\"), data_format = \"data.table\" )"},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"arguments-22","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\"). data_format (character()) Returned data format. Choose \"data.table\" \"list\". default \"data.table\" \"list\" easier list columns present.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"returns-12","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"data.table() Table tasks.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"method-fetch-tasks-with-state-","dir":"Reference","previous_headings":"","what":"Method fetch_tasks_with_state()","title":"Rush Controller — Rush","text":"Fetch tasks different states data base. tasks different states queried time, function prevents tasks appearing twice. case worker changes state task tasks fetched. Finished tasks cached.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"usage-26","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$fetch_tasks_with_state( fields = c(\"xs\", \"ys\", \"xs_extra\", \"worker_extra\", \"ys_extra\", \"condition\"), states = c(\"queued\", \"running\", \"finished\", \"failed\"), reset_cache = FALSE, data_format = \"data.table\" )"},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"arguments-23","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"fields (character()) Fields read hashes. Defaults c(\"xs\", \"ys\", \"xs_extra\", \"worker_extra\", \"ys_extra\"). states (character()) States tasks fetched. Defaults c(\"queued\", \"running\", \"finished\", \"failed\"). reset_cache (logical(1)) Whether reset cache finished tasks. data_format (character()) Returned data format. Choose \"data.table\" \"list\". default \"data.table\" \"list\" easier list columns present.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"method-wait-for-tasks-","dir":"Reference","previous_headings":"","what":"Method wait_for_tasks()","title":"Rush Controller — Rush","text":"Wait tasks finished. function also unblocks worker running tasks failed.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"usage-27","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$wait_for_tasks(keys, detect_lost_workers = FALSE)"},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"arguments-24","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"keys (character()) Keys tasks wait . detect_lost_workers (logical(1)) Whether detect failed tasks. Comes overhead.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"method-write-hashes-","dir":"Reference","previous_headings":"","what":"Method write_hashes()","title":"Rush Controller — Rush","text":"Writes R objects Redis hashes. function takes vectors ... input writes element field-value pair 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 vectors 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. vectors recycled length longest vector. lists atomic vectors supported. Arguments NULL ignored.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"usage-28","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$write_hashes(..., .values = list(), keys = NULL)"},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"arguments-25","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.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"returns-13","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"(character()) Keys hashes.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"method-read-hashes-","dir":"Reference","previous_headings":"","what":"Method read_hashes()","title":"Rush Controller — Rush","text":"Reads R Objects Redis hashes. function reads field-value pairs hashes stored keys. values hash deserialized combined list. flatten TRUE, values flattened single list e.g. list(xs = list(x1 = 1, x2 = 2), ys = list(y = 3)) becomes list(x1 = 1, x2 = 2, y = 3). 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://rush.mlr-org.com/reference/Rush.html","id":"usage-29","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$read_hashes(keys, fields, flatten = TRUE)"},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"arguments-26","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"keys (character()) Keys hashes. fields (character()) Fields read hashes. flatten (logical(1)) Whether flatten list.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"returns-14","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://rush.mlr-org.com/reference/Rush.html","id":"method-read-hash-","dir":"Reference","previous_headings":"","what":"Method read_hash()","title":"Rush Controller — Rush","text":"Reads single Redis hash returns values list named fields.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"usage-30","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$read_hash(key, fields)"},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"arguments-27","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"key (character(1)) Key hash. fields (character()) Fields read hash.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"returns-15","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://rush.mlr-org.com/reference/Rush.html","id":"method-is-running-task-","dir":"Reference","previous_headings":"","what":"Method is_running_task()","title":"Rush Controller — Rush","text":"Checks whether tasks status \"running\".","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"usage-31","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$is_running_task(keys)"},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"arguments-28","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"keys (character()) Keys tasks.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"method-is-failed-task-","dir":"Reference","previous_headings":"","what":"Method is_failed_task()","title":"Rush Controller — Rush","text":"Checks whether tasks status \"failed\".","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"usage-32","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$is_failed_task(keys)"},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"arguments-29","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"keys (character()) Keys tasks.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"method-tasks-with-state-","dir":"Reference","previous_headings":"","what":"Method tasks_with_state()","title":"Rush Controller — Rush","text":"Returns keys requested states.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"usage-33","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$tasks_with_state(states)"},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"arguments-30","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"states (character()) States tasks.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"returns-16","dir":"Reference","previous_headings":"","what":"Returns","title":"Rush Controller — Rush","text":"(Named list character()).","code":""},{"path":"https://rush.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://rush.mlr-org.com/reference/Rush.html","id":"usage-34","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Controller — Rush","text":"","code":"Rush$clone(deep = FALSE)"},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"arguments-31","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rush Controller — Rush","text":"deep Whether make deep clone.","code":""},{"path":"https://rush.mlr-org.com/reference/Rush.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Rush Controller — Rush","text":"","code":"# \\donttest{ config_local = redux::redis_config() rush = rsh(network_id = \"test_network\", config = config_local) #> Error in initialize(...): Can't connect to Redis. Check the configuration. rush #> Error in eval(expr, envir, enclos): object 'rush' not found # }"},{"path":"https://rush.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://rush.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://rush.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://rush.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. remote (logical(1)) Whether worker remote machine. heartbeat (`r_process``) Background process heartbeat.","code":""},{"path":"https://rush.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://rush.mlr-org.com/reference/RushWorker.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Rush Worker — RushWorker","text":"rush::Rush$create_worker_script() rush::Rush$detect_lost_workers() rush::Rush$fetch_failed_tasks() rush::Rush$fetch_finished_tasks() rush::Rush$fetch_new_tasks() rush::Rush$fetch_priority_tasks() rush::Rush$fetch_queued_tasks() rush::Rush$fetch_running_tasks() rush::Rush$fetch_tasks() rush::Rush$fetch_tasks_with_state() rush::Rush$format() rush::Rush$is_failed_task() rush::Rush$is_running_task() rush::Rush$print() rush::Rush$print_log() rush::Rush$push_failed() rush::Rush$push_priority_tasks() rush::Rush$push_tasks() rush::Rush$read_hash() rush::Rush$read_hashes() rush::Rush$read_log() rush::Rush$reset() rush::Rush$restart_local_workers() rush::Rush$retry_tasks() rush::Rush$start_local_workers() rush::Rush$start_remote_workers() rush::Rush$stop_workers() rush::Rush$tasks_with_state() rush::Rush$wait_for_finished_tasks() rush::Rush$wait_for_new_tasks() rush::Rush$wait_for_tasks() rush::Rush$wait_for_workers() rush::Rush$write_hashes()","code":""},{"path":"https://rush.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_tasks() RushWorker$pop_task() RushWorker$push_results() RushWorker$set_terminated() RushWorker$clone()","code":""},{"path":"https://rush.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://rush.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 = NULL, remote, worker_id = NULL, heartbeat_period = NULL, heartbeat_expire = NULL, lgr_thresholds = NULL, lgr_buffer_size = 0, seed = NULL )"},{"path":"https://rush.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. NULL, configuration set rush_plan() used. rush_plan() called, REDIS_URL environment variable parsed. REDIS_URL set, default configuration used. See redux::redis_config details. remote (logical(1)) Whether worker started remote machine. 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\"). lgr_buffer_size (integer(1)) default (lgr_buffer_size = 0), log messages directly saved Redis data store. lgr_buffer_size > 0, log messages buffered saved Redis data store buffer full. improves performance logging. seed (integer()) Initial seed random number generator. Either L'Ecuyer-CMRG seed (integer(7)) regular RNG seed (integer(1)). later converted L'Ecuyer-CMRG seed. NULL, seed used random number generator.","code":""},{"path":"https://rush.mlr-org.com/reference/RushWorker.html","id":"method-push-running-tasks-","dir":"Reference","previous_headings":"","what":"Method push_running_tasks()","title":"Rush Worker — RushWorker","text":"Push task running tasks without queue.","code":""},{"path":"https://rush.mlr-org.com/reference/RushWorker.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Worker — RushWorker","text":"","code":"RushWorker$push_running_tasks(xss, extra = NULL)"},{"path":"https://rush.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://rush.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://rush.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://rush.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, fields = \"xs\")"},{"path":"https://rush.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. fields (character()) Fields returned.","code":""},{"path":"https://rush.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://rush.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, extra = NULL)"},{"path":"https://rush.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.","code":""},{"path":"https://rush.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://rush.mlr-org.com/reference/RushWorker.html","id":"usage-4","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Worker — RushWorker","text":"","code":"RushWorker$set_terminated()"},{"path":"https://rush.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://rush.mlr-org.com/reference/RushWorker.html","id":"usage-5","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Worker — RushWorker","text":"","code":"RushWorker$clone(deep = FALSE)"},{"path":"https://rush.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://rush.mlr-org.com/reference/RushWorker.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Rush Worker — RushWorker","text":"","code":"# \\donttest{ config_local = redux::redis_config() rush = rsh(network_id = \"test_network\", config = config_local) #> Error in initialize(...): Can't connect to Redis. Check the configuration. fun = function(x1, x2, ...) list(y = x1 + x2) rush$start_local_workers(fun = fun) #> Error in eval(expr, envir, enclos): object 'rush' not found rush$stop_workers() #> Error in eval(expr, envir, enclos): object 'rush' not found # }"},{"path":"https://rush.mlr-org.com/reference/get_hostname.html","id":null,"dir":"Reference","previous_headings":"","what":"Get the computer name of the current host — get_hostname","title":"Get the computer name of the current host — get_hostname","text":"Returns computer name current host. First tries get computer name environment variables HOST, HOSTNAME COMPUTERNAME. fails tries get computer name function Sys.info(). Finally, fails queries computer name command uname -n. Copied R.utils package.","code":""},{"path":"https://rush.mlr-org.com/reference/get_hostname.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get the computer name of the current host — get_hostname","text":"","code":"get_hostname()"},{"path":"https://rush.mlr-org.com/reference/get_hostname.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get the computer name of the current host — get_hostname","text":"character(1) hostname.","code":""},{"path":"https://rush.mlr-org.com/reference/get_hostname.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get the computer name of the current host — get_hostname","text":"","code":"get_hostname() #> nodename #> \"fv-az1113-482\""},{"path":"https://rush.mlr-org.com/reference/heartbeat.html","id":null,"dir":"Reference","previous_headings":"","what":"Heartbeat Loop — heartbeat","title":"Heartbeat Loop — heartbeat","text":"heartbeat loop updates heartbeat key worker still alive. kill key set, worker killed. function called callr session.","code":""},{"path":"https://rush.mlr-org.com/reference/heartbeat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Heartbeat Loop — heartbeat","text":"","code":"heartbeat( network_id, config, worker_id, heartbeat_period, heartbeat_expire, pid )"},{"path":"https://rush.mlr-org.com/reference/heartbeat.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Heartbeat Loop — 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. 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://rush.mlr-org.com/reference/heartbeat.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Heartbeat Loop — heartbeat","text":"NULL","code":""},{"path":"https://rush.mlr-org.com/reference/heartbeat.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Heartbeat Loop — heartbeat","text":"","code":"# \\donttest{ config_local = redux::redis_config() rush_plan( config = config_local, n_workers = 2, lgr_thresholds = c(rush = \"info\")) #> Error in rush_plan(config = config_local, n_workers = 2, lgr_thresholds = c(rush = \"info\")): Can't connect to Redis. Check the configuration. rush = rsh(network_id = \"test_network\") #> Error in initialize(...): Can't connect to Redis. Check the configuration. fun = function(x1, x2, ...) list(y = x1 + x2) rush$start_local_workers( fun = fun, heartbeat_period = 3, heartbeat_expire = 9) #> Error in eval(expr, envir, enclos): object 'rush' not found rush$stop_workers() #> Error in eval(expr, envir, enclos): object 'rush' not found # }"},{"path":"https://rush.mlr-org.com/reference/remove_rush_plan.html","id":null,"dir":"Reference","previous_headings":"","what":"Remove Rush Plan — remove_rush_plan","title":"Remove Rush Plan — remove_rush_plan","text":"Removes rush plan set rush_plan().","code":""},{"path":"https://rush.mlr-org.com/reference/remove_rush_plan.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Remove Rush Plan — remove_rush_plan","text":"","code":"remove_rush_plan()"},{"path":"https://rush.mlr-org.com/reference/remove_rush_plan.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Remove Rush Plan — remove_rush_plan","text":"","code":"# \\donttest{ config_local = redux::redis_config() rush_plan(config = config_local, n_workers = 2) #> Error in rush_plan(config = config_local, n_workers = 2): Can't connect to Redis. Check the configuration. remove_rush_plan() # }"},{"path":"https://rush.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://rush.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://rush.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. NULL, configuration set rush_plan() used. rush_plan() called, REDIS_URL environment variable parsed. REDIS_URL set, default configuration used. See redux::redis_config details. ... (ignored).","code":""},{"path":"https://rush.mlr-org.com/reference/rsh.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Synctatic Sugar for Rush Controller Construction — rsh","text":"Rush controller.","code":""},{"path":"https://rush.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":"# \\donttest{ config_local = redux::redis_config() rush = rsh(network_id = \"test_network\", config = config_local) #> Error in initialize(...): Can't connect to Redis. Check the configuration. rush #> Error in eval(expr, envir, enclos): object 'rush' not found # }"},{"path":"https://rush.mlr-org.com/reference/rush-package.html","id":null,"dir":"Reference","previous_headings":"","what":"rush: Rapid Parallel and Distributed Computing — rush-package","title":"rush: Rapid Parallel and Distributed Computing — rush-package","text":"Parallel computing network local remote workers. Fast exchange results workers 'Redis' database. Key features include task queues, local caching, sophisticated error handling.","code":""},{"path":"https://rush.mlr-org.com/reference/rush-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"rush: Rapid Parallel and Distributed Computing — rush-package","text":"Maintainer: Marc Becker marcbecker@posteo.de (ORCID) [copyright holder]","code":""},{"path":"https://rush.mlr-org.com/reference/rush_assertions.html","id":null,"dir":"Reference","previous_headings":"","what":"Assertion for Rush Objects — rush_assertions","title":"Assertion for Rush Objects — rush_assertions","text":"assertion functions ensure right class attribute, optionally additional properties. assertion fails, exception raised. Otherwise, input object returned invisibly.","code":""},{"path":"https://rush.mlr-org.com/reference/rush_assertions.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Assertion for Rush Objects — rush_assertions","text":"","code":"assert_rush(rush, null_ok = FALSE) assert_rushs(rushs, null_ok = FALSE) assert_rush_worker(worker, null_ok = FALSE) assert_rush_workers(workers, null_ok = FALSE)"},{"path":"https://rush.mlr-org.com/reference/rush_assertions.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Assertion for Rush Objects — rush_assertions","text":"rush (Rush). null_ok (logical(1)). TRUE, NULL allowed. rushs (list Rush). worker (RushWorker). workers (list RushWorker).","code":""},{"path":"https://rush.mlr-org.com/reference/rush_assertions.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Assertion for Rush Objects — rush_assertions","text":"Exception assertion fails, otherwise input object invisibly.","code":""},{"path":"https://rush.mlr-org.com/reference/rush_assertions.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Assertion for Rush Objects — rush_assertions","text":"","code":"# \\donttest{ config_local = redux::redis_config() rush = rsh(network_id = \"test_network\", config = config_local) #> Error in initialize(...): Can't connect to Redis. Check the configuration. assert_rush(rush) #> Error in eval(expr, envir, enclos): object 'rush' not found # }"},{"path":"https://rush.mlr-org.com/reference/rush_available.html","id":null,"dir":"Reference","previous_headings":"","what":"Rush Available — rush_available","title":"Rush Available — rush_available","text":"Returns TRUE redis config file (redux::redis_config) set rush_plan().","code":""},{"path":"https://rush.mlr-org.com/reference/rush_available.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Rush Available — rush_available","text":"","code":"rush_available()"},{"path":"https://rush.mlr-org.com/reference/rush_available.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Rush Available — rush_available","text":"logical(1)","code":""},{"path":"https://rush.mlr-org.com/reference/rush_available.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Rush Available — rush_available","text":"","code":"# \\donttest{ config_local = redux::redis_config() rush_plan(config = config_local, n_workers = 2) #> Error in rush_plan(config = config_local, n_workers = 2): Can't connect to Redis. Check the configuration. rush_available() #> [1] FALSE # }"},{"path":"https://rush.mlr-org.com/reference/rush_config.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Rush Config — rush_config","title":"Get Rush Config — rush_config","text":"Returns rush config set rush_plan().","code":""},{"path":"https://rush.mlr-org.com/reference/rush_config.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Rush Config — rush_config","text":"","code":"rush_config()"},{"path":"https://rush.mlr-org.com/reference/rush_config.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get Rush Config — rush_config","text":"list() stored configuration.","code":""},{"path":"https://rush.mlr-org.com/reference/rush_config.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get Rush Config — rush_config","text":"","code":"# \\donttest{ config_local = redux::redis_config() rush_plan(config = config_local, n_workers = 2) #> Error in rush_plan(config = config_local, n_workers = 2): Can't connect to Redis. Check the configuration. rush_config() #> $config #> NULL #> #> $n_workers #> NULL #> #> $lgr_thresholds #> NULL #> #> $large_objects_path #> NULL #> #> $start_worker_timeout #> NULL #> # }"},{"path":"https://rush.mlr-org.com/reference/rush_plan.html","id":null,"dir":"Reference","previous_headings":"","what":"Create Rush Plan — rush_plan","title":"Create Rush Plan — rush_plan","text":"Stores number workers Redis configuration options (redux::redis_config) Rush. function tests connection Redis throws error connection fails.","code":""},{"path":"https://rush.mlr-org.com/reference/rush_plan.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create Rush Plan — rush_plan","text":"","code":"rush_plan( n_workers = NULL, config = NULL, lgr_thresholds = NULL, large_objects_path = NULL, start_worker_timeout = Inf )"},{"path":"https://rush.mlr-org.com/reference/rush_plan.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create Rush Plan — rush_plan","text":"n_workers (integer(1)) Number workers started. config (redux::redis_config) Configuration options used connect Redis. NULL, REDIS_URL environment variable parsed. REDIS_URL set, default configuration used. See redux::redis_config details. lgr_thresholds (named character() | named numeric()) Logger threshold workers e.g. c(rush = \"debug\"). large_objects_path (character(1)) path directory large objects stored. start_worker_timeout (numeric(1)) time seconds wait worker start.","code":""},{"path":"https://rush.mlr-org.com/reference/rush_plan.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create Rush Plan — rush_plan","text":"list() stored configuration.","code":""},{"path":"https://rush.mlr-org.com/reference/rush_plan.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create Rush Plan — rush_plan","text":"","code":"# \\donttest{ config_local = redux::redis_config() rush_plan(config = config_local, n_workers = 2) #> Error in rush_plan(config = config_local, n_workers = 2): Can't connect to Redis. Check the configuration. rush = rsh(network_id = \"test_network\") #> Error in initialize(...): Can't connect to Redis. Check the configuration. rush #> Error in eval(expr, envir, enclos): object 'rush' not found # }"},{"path":"https://rush.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 loads globals packages, initializes RushWorker instance invokes worker loop. function called $start_local_workers() user creating worker script $create_worker_script().","code":""},{"path":"https://rush.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, worker_id = NULL, remote = TRUE, ...)"},{"path":"https://rush.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. worker_id (character(1)) Identifier worker. Keys redis specific worker prefixed worker id. remote (logical(1)) Whether worker remote machine. ... () Arguments passed redux::redis_config.","code":""},{"path":"https://rush.mlr-org.com/reference/start_worker.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Start a worker — start_worker","text":"NULL","code":""},{"path":"https://rush.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 initialize RushWorker instance starts worker loop.","code":""},{"path":"https://rush.mlr-org.com/reference/start_worker.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Start a worker — start_worker","text":"","code":"if (FALSE) { rush::start_worker( network_id = 'test-rush', remote = TRUE, url = 'redis://127.0.0.1:6379', scheme = 'redis', host = '127.0.0.1', port = '6379') }"},{"path":"https://rush.mlr-org.com/reference/store_large_object.html","id":null,"dir":"Reference","previous_headings":"","what":"Store Large Objects — store_large_object","title":"Store Large Objects — store_large_object","text":"Store large objects disk return reference object.","code":""},{"path":"https://rush.mlr-org.com/reference/store_large_object.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Store Large Objects — store_large_object","text":"","code":"store_large_object(obj, path)"},{"path":"https://rush.mlr-org.com/reference/store_large_object.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Store Large Objects — store_large_object","text":"obj () Object store. path (character(1)) Path store object.","code":""},{"path":"https://rush.mlr-org.com/reference/store_large_object.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Store Large Objects — store_large_object","text":"list() class \"rush_large_object\" name path stored object.","code":""},{"path":"https://rush.mlr-org.com/reference/store_large_object.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Store Large Objects — store_large_object","text":"","code":"obj = list(a = 1, b = 2) rush_large_object = store_large_object(obj, tempdir())"},{"path":"https://rush.mlr-org.com/reference/with_rng_state.html","id":null,"dir":"Reference","previous_headings":"","what":"Set RNG Sate before Running a Function — with_rng_state","title":"Set RNG Sate before Running a Function — with_rng_state","text":"function sets rng state running function.","code":""},{"path":"https://rush.mlr-org.com/reference/with_rng_state.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set RNG Sate before Running a Function — with_rng_state","text":"","code":"with_rng_state(fun, args, seed)"},{"path":"https://rush.mlr-org.com/reference/with_rng_state.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set RNG Sate before Running a Function — with_rng_state","text":"fun (function) Function run. args (list) Arguments pass fun. seed (integer) RNG state set running fun.","code":""},{"path":[]},{"path":"https://rush.mlr-org.com/reference/with_rng_state.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Set RNG Sate before Running a Function — with_rng_state","text":"","code":"with_rng_state(runif, list(n = 1), .Random.seed) #> [1] 0.08075014"},{"path":"https://rush.mlr-org.com/reference/worker_loop_callr.html","id":null,"dir":"Reference","previous_headings":"","what":"Single Task Worker Loop with callr Encapsulation — worker_loop_callr","title":"Single Task Worker Loop with callr Encapsulation — worker_loop_callr","text":"Worker loop pops single task queue, executes function external callr session pushes results. Supports timeouts tasks.","code":""},{"path":"https://rush.mlr-org.com/reference/worker_loop_callr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Single Task Worker Loop with callr Encapsulation — worker_loop_callr","text":"","code":"worker_loop_callr(fun, constants = NULL, rush)"},{"path":"https://rush.mlr-org.com/reference/worker_loop_callr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Single Task Worker Loop with callr Encapsulation — worker_loop_callr","text":"fun (function) Function executed. constants (list) List constants passed fun. rush (RushWorker) Rush worker instance.","code":""},{"path":"https://rush.mlr-org.com/reference/worker_loop_callr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Single Task Worker Loop with callr Encapsulation — worker_loop_callr","text":"NULL","code":""},{"path":"https://rush.mlr-org.com/reference/worker_loop_callr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Single Task Worker Loop with callr Encapsulation — worker_loop_callr","text":"","code":"# \\donttest{ config_local = redux::redis_config() rush = rsh(network_id = \"test_network\", config = config_local) #> Error in initialize(...): Can't connect to Redis. Check the configuration. fun = function(x1, x2, ...) list(y = x1 + x2) rush$start_local_workers( fun = fun, worker_loop = worker_loop_callr) #> Error in eval(expr, envir, enclos): object 'rush' not found rush$stop_workers() #> Error in eval(expr, envir, enclos): object 'rush' not found # }"},{"path":"https://rush.mlr-org.com/reference/worker_loop_default.html","id":null,"dir":"Reference","previous_headings":"","what":"Single Task Worker Loop — worker_loop_default","title":"Single Task Worker Loop — worker_loop_default","text":"Worker loop pops single task queue, executes function pushes results.","code":""},{"path":"https://rush.mlr-org.com/reference/worker_loop_default.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Single Task Worker Loop — worker_loop_default","text":"","code":"worker_loop_default(fun, constants = NULL, rush)"},{"path":"https://rush.mlr-org.com/reference/worker_loop_default.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Single Task Worker Loop — worker_loop_default","text":"fun (function) Function executed. constants (list) List constants passed fun. rush (RushWorker) Rush worker instance.","code":""},{"path":"https://rush.mlr-org.com/reference/worker_loop_default.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Single Task Worker Loop — worker_loop_default","text":"NULL","code":""},{"path":"https://rush.mlr-org.com/reference/worker_loop_default.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Single Task Worker Loop — worker_loop_default","text":"","code":"# \\donttest{ config_local = redux::redis_config() rush = rsh(network_id = \"test_network\", config = config_local) #> Error in initialize(...): Can't connect to Redis. Check the configuration. fun = function(x1, x2, ...) list(y = x1 + x2) rush$start_local_workers( fun = fun, worker_loop = worker_loop_default) #> Error in eval(expr, envir, enclos): object 'rush' not found rush$stop_workers() #> Error in eval(expr, envir, enclos): object 'rush' not found # }"},{"path":"https://rush.mlr-org.com/news/index.html","id":"rush-development-version","dir":"Changelog","previous_headings":"","what":"rush (development version)","title":"rush (development version)","text":"Initial CRAN submission.","code":""}]