Skip to main content

A stateless runner / deployment system for MESA models

Project description

MESA Runner

A stateless runner for deploying MESA registered models onto GSTT Infrastructure. It syncs models from S3, reads unprocessed documents from Snowflake, runs inference, and writes results back.

Requirements

  • Python 3.13+
  • uv package manager

Installation

Remote Inference (Default)

For remote inference via OpenAI-compatible endpoints:

uv sync

Offline Inference (Optional)

For local GPU inference with vLLM, install the optional dependency:

uv sync --group vllm-offline

Configuration

Create a config.yaml file (see example below):

Remote Inference Example

my_source:
  model_name: "your-model-name"

  inference:
    openai_endpoint: "http://localhost:5000/v1"

  storage:
    type: snowflake
    source_database: "str"
    source_schema: "str"
    source_table: "str"

    sink_database: "str"
    sink_schema: "str"
    sink_table: "str"

    connection_params:
      account: "str"
      user: "str"
      role: "str"
      password: "str"
      warehouse: "str"
      database: "str"

Offline Inference Example

my_source:
  model_s3_uri: "s3://aicentre-nlpteam-mesa-build/models/oncoqwen/oncoqwen_1/"

  inference:
    max_model_len: 18000

  storage:
    type: snowflake
    source_database: "str"
    source_schema: "str"
    source_table: "str"

    sink_database: "str"
    sink_schema: "str"
    sink_table: "str"

    connection_params:
      account: "str"
      user: "str"
      role: "str"
      password: "str"
      warehouse: "str"
      database: "str"

Usage

# Run with default config.yaml
mesa_runner

# Or specify a config file
mesa_runner --config /path/to/config.yaml

# Dry run mode (uses dummy data, does not read or write real data)
mesa_runner --dry-run

The dry run mode is useful for testing the runner without accessing real data sources or sinks. It generates 5 dummy documents by default and logs all write operations instead of executing them.

Docker

# Remote inference (default)
docker build -t mesa-runner .
docker run mesa-runner

# Offline inference (includes vLLM)
docker build --target offline -t mesa-runner:offline .
docker run --gpus all mesa-runner:offline

Development

# Run linting and tests
make test

# Auto-fix linting issues
make fix

# Run tests with coverage
make cov

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

londonaicentre_mesa_runner-1.4.0.tar.gz (30.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

londonaicentre_mesa_runner-1.4.0-py3-none-any.whl (25.6 kB view details)

Uploaded Python 3

File details

Details for the file londonaicentre_mesa_runner-1.4.0.tar.gz.

File metadata

  • Download URL: londonaicentre_mesa_runner-1.4.0.tar.gz
  • Upload date:
  • Size: 30.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Amazon Linux","version":"2023","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for londonaicentre_mesa_runner-1.4.0.tar.gz
Algorithm Hash digest
SHA256 0fab7e9fe1e025d74414add60ce1c0638d4921ddbb5cf7449a8e7a6dbd334cd8
MD5 41abb60459676d4b85e656fd5068e15c
BLAKE2b-256 a87fe63b1b7a146fbec87813042525719c7aa2ec9ee4ce35fb6013129aa6ce1f

See more details on using hashes here.

File details

Details for the file londonaicentre_mesa_runner-1.4.0-py3-none-any.whl.

File metadata

  • Download URL: londonaicentre_mesa_runner-1.4.0-py3-none-any.whl
  • Upload date:
  • Size: 25.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Amazon Linux","version":"2023","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for londonaicentre_mesa_runner-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c4327de6224d18aa829b759be311f77bd833ae59c4d43c440a934b169d87893d
MD5 c26bbc42c5643f523f7ac813cc5d6ce7
BLAKE2b-256 741dcc7b0e3ae923ce8a7fc7bda3590bb430cd822772362112c7f1874dc730d2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page