Metarank Docs
  • Introduction
    • What is Metarank?
    • Quickstart
    • Performance
  • Guides
    • Search
      • Reranking with cross-encoders
  • Reference
    • Installation
    • Event Format
      • Timestamp formats
    • API
    • Command-line options
    • Configuration
      • Feature extractors
        • Counters
        • Date and Time
        • Generic
        • Relevancy
        • Scalars
        • Text
        • User Profile
        • Diversification
      • Recommendations
        • Trending items
        • Similar items
        • Semantic similarity
      • Models
      • Data Sources
      • Persistence
    • Deployment
      • Standalone
      • Docker
      • Kubernetes
      • Prometheus metrics export
      • Custom logging
      • Warmup
    • Integrations
      • Snowplow
  • How-to
    • Automated ML model retraining
    • Automatic feature engineering
    • Running in production
  • Development
    • Changelog
    • Building from source
  • Doc versions
    • 0.7.9 (stable)
    • master (unstable)
Powered by GitBook
On this page
  • Running modes
  • Why standalone?
  • Running Metarank in standalone mode

Was this helpful?

Edit on GitHub
  1. Reference
  2. Deployment

Standalone

PreviousDeploymentNextDocker

Last updated 2 years ago

Was this helpful?

As a Java application, Metarank can be run locally either as a JAR-file or Docker container, there is no need for Kubernetes and AWS to start playing with it. Check out the for detailed setup instructions.

Running modes

Metarank has multiple running modes:

  • import - import historical clickthroughs to the store

  • train - run traing the machine learning model using the imported data

  • serve - start the ranking inference API

  • standalone - which is a shortcut for import, train and serve jobs run together.

  • validate - a set of sanity checks on your configuration file and event dataset.

Metarank's standalone mode is made to simplify the initial onboarding on the system:

  • it's a shortcut to run tasks all at once

  • with it can process large clickthrough histories almost instantly.

Why standalone?

Standalone mode is useful for these cases:

  • testing Metarank without deployment. With it has zero service dependencies and is the easiest way to try it out.

  • simple staging deployments on VM/on-prem hardware. With it can handle typical cases with small/medium load.

Standalone mode has the following limitations:

  • model training happens within the inference process, and is a memory hungry process, which may cause latency spikes and OOMs. To overcome this limitation, you can train the machine learning model externally and upload it to the same Redis instance.

Running Metarank in standalone mode

$ java -jar metarank.jar standalone --data /path/to/events.json --config /path/to/config.yml

Another option is to run Metarank standalone mode from a docker container:

$ docker run -v /data/:<path to data dir> metarank/metarank:latest standalone --data /data/events.json --config /data/config.yml

The follwing options are used for the docker container:

  • -v /data:<path to data dir> to map a directory with input files and configuration into the container

During the startup process Metarank will:

  • import your dataset and compute all historical event statistics useful for machine learning model training

  • train the machine learning model you defined in the configuration file

  • start the inference API for real-time personaization.

feedback ingestion and inference throughput are limited by a single node. Please use the for a better experience.

To run the JAR file, make sure to follow the and run it:

--data /data/events.json to pass the name of , from the mapped volume

--config /data/config.yml to pass the

For a more detailed walkthrough of running Metarank in playground, check out the .

Kubernetes deployment
installation manual for your OS
input events file
configuration file
quickstart guide
installation guide
import, train and serve
memory persistence
in-memory persistence
redis persistence
import and training process