Setup and installation

In this guide, we will help you to get up and running with Rubrix. Basically, you need to:

  1. Install the Python client

  2. Launch the web app

1. Install the Rubrix Python client

First, make sure you have Python 3.6 or above installed.

Then you can install Rubrix with pip:

pip install rubrix

2. Setup and launch the webapp

There are two ways to launch the webapp:

  1. Using docker-compose (recommended).

  2. Executing the server code manually

Executing the server code manually

When executing the server code manually you need to provide an Elasticsearch instance yourself. This method may be preferred if you (1) want to avoid or cannot use Docker, (2) have an existing Elasticsearch service, or (3) want to have full control over your Elasticsearch configuration.

  1. First you need to install Elasticsearch (we recommend version 7.10) and launch an Elasticsearch instance. For MacOS and Windows there are Homebrew formulae and a msi package, respectively.

  2. Install the Rubrix Python library together with its server dependencies:

pip install rubrix[server]
  1. Launch a local instance of the Rubrix web app

python -m rubrix.server

By default, the Rubrix server will look for your Elasticsearch endpoint at http://localhost:9200. If you want to customize this, you can set the ELASTICSEARCH environment variable pointing to your endpoint.

Checking your webapp and REST API

Now you should be able to access Rubrix via http://localhost:6900/, and you can also check the API docs at http://localhost:6900/api/docs.

3. Testing the installation by logging some data

The following code will log one record into a data set called example-dataset :

import rubrix as rb

    rb.TextClassificationRecord(inputs={"text": "my first rubrix example"}),

You should receive this response in your terminal or Jupyter Notebook:

BulkResponse(dataset='example-dataset', processed=1, failed=0)

This means that the data has been logged correctly.

If you now go to your Rubrix app at http://localhost:6900/ , you will find your first data set.

Congratulations! You are ready to start working with Rubrix.

Next steps

To continue learning we recommend you to:

  • Check our guides and tutorials.

  • Read about Rubrix’s main concepts.