run_server: Run server providing data for live Arena

Description Usage Arguments Value Examples

View source: R/live.R

Description

By default function opens browser with new arena session. Appending data to already existing session is also possible using argument append_data

Usage

1
2
3
4
5
6
7
8
run_server(
  arena,
  port = 8181,
  host = "127.0.0.1",
  open_browser = TRUE,
  append_data = FALSE,
  arena_url = "https://arena.drwhy.ai/"
)

Arguments

arena

Live arena object

port

server port

host

server ip address (hostnames do not work yet)

open_browser

Whether to open browser with new session

append_data

Whether to append data to already existing session

arena_url

URL of Arena dashboard instance

Value

not modified arena object

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
library("DALEX")
library("arenar")
library("dplyr", quietly=TRUE, warn.conflicts = FALSE)
# create a model
model <- glm(m2.price ~ ., data=apartments)
# create a DALEX explainer
explainer <- DALEX::explain(model, data=apartments, y=apartments$m2.price)
# generate live arena for one model and all data as observations
arena <- create_arena(live=TRUE) %>% push_model(explainer) %>% push_observations(apartments)
# run the server
if (interactive()) run_server(arena, port=1234)

arenar documentation built on Oct. 23, 2020, 8:03 p.m.