bbq_client: Create a new Babylon server manager

Description Usage Arguments Value Initialization Methods Examples

View source: R/bbq_client.R

Description

The Babylon generator creates a new 'Babylon'-object, which contains logic to interact with a running bbq server from the babylon ecosystem.

create a new client for babylon queue

Usage

1
2
bbq_client(init = NULL, host = "http://localhost", port = 3333,
  verbose = TRUE, must_work = TRUE)

Arguments

init

whether to initialize bbq

host

hostname

port

port bbq listens on

verbose

more information about whats going on under the hood

must_work

must be able to ping a valid bbq server to initialize

Value

Babylon instance

Initialization

A new Babylon object is initialized with the new() method:

bbq <- Babylon$new()

and can optionally take some initialization arguments:

Methods

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 
bbq <- Babylon$new()
bbq$get_models()

# get all ids
bbq$get_models %>% map_dbl("ID")

# find all queued models
bbq$get_models(status = "QUEUED") %>% map_dbl("ID")

bbq$poll(1:5) # poll for models 1-5 to complete

# get all directories for completed runs
bbq$get_models(status = "COMPLETED") %>% map_chr(~ .x$RunInfo$RunDir)

## End(Not run)

dpastoor/rbabylon documentation built on Dec. 4, 2017, 3:23 p.m.