run_server {arenar}R Documentation

Run server providing data for live Arena

Description

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

Usage

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

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)

[Package arenar version 0.2.0 Index]