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_s3_uri: "s3://aicentre-nlpteam-mesa-build/models/oncoqwen/oncoqwen_1/"
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file londonaicentre_mesa_runner-1.0.0.tar.gz.
File metadata
- Download URL: londonaicentre_mesa_runner-1.0.0.tar.gz
- Upload date:
- Size: 29.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7be892590383d52053ac9d8b21ad32dbdef05f0c48fcfc429c26e9e0dd1da3f9
|
|
| MD5 |
6e1aaef171b9fa0f10225de88240f3e9
|
|
| BLAKE2b-256 |
efb7fb4f552e82da77d07f55d5f4d07610994693f3107b2a3f5ff312e2850983
|
File details
Details for the file londonaicentre_mesa_runner-1.0.0-py3-none-any.whl.
File metadata
- Download URL: londonaicentre_mesa_runner-1.0.0-py3-none-any.whl
- Upload date:
- Size: 24.9 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e416d935baa148fe629240a9853f00af82d3ddd12147f3c8fcdf01c9c7105d3
|
|
| MD5 |
07e06da0196fff1ea1d395e2738f2ae1
|
|
| BLAKE2b-256 |
56895c412ac799384c89e8c977afc30654848a03e13b7d5c0938dcf03d6e405b
|