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.3.2.tar.gz (30.8 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.3.2-py3-none-any.whl (25.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: londonaicentre_mesa_runner-1.3.2.tar.gz
  • Upload date:
  • Size: 30.8 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.3.2.tar.gz
Algorithm Hash digest
SHA256 ad12a6d7e67ceeac9a11475ca197766c58c17505cb8b0ae42998e9312450e040
MD5 5e909745e188ed3c106f35176f357937
BLAKE2b-256 13c9b0363a048c0c3f227cd1ee0b8d787bf5a9fa6f2c3f97288e349fbdd717f4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: londonaicentre_mesa_runner-1.3.2-py3-none-any.whl
  • Upload date:
  • Size: 25.5 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.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6da13dbd326844fd1cc032ed3299936ec604e710e2e0bd71a382dd48508d63cc
MD5 9827237d2467fdb0b27320fd27cb59a0
BLAKE2b-256 bd68d4fd7c58e39e00727ca2f0ede29fcf42aa0ac0c5c29ce13cd2e9b1a0bcdd

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