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
Metadata
Release files for londonaicentre-mesa-runner 1.9.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| londonaicentre_mesa_runner-1.9.1.tar.gz | 32.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| londonaicentre_mesa_runner-1.9.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 58.9 kB
Release files / londonaicentre_mesa_runner-1.9.1.tar.gz
| Download URL | londonaicentre_mesa_runner-1.9.1.tar.gz |
|---|---|
| Size | 32.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bd6b7d4edd5c2230da277a33a984f850adc293213562ff56477aa6dc1eaa0be5
|
|
BLAKE2b-256 checksum How to use checksums |
91e0b3b8f825bc9e1f743bbe55dab1feeff94ca3346bc9aec7c0b6e7ccee1403
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","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}
|
Release files / londonaicentre_mesa_runner-1.9.1-py3-none-any.whl
| Download URL | londonaicentre_mesa_runner-1.9.1-py3-none-any.whl |
|---|---|
| Size | 26.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
03efd30e74df4c356b1e723b62af7d079ffb15233079e3a4368661dc03cbd7df
|
|
BLAKE2b-256 checksum How to use checksums |
2b9d95f7a2c799eccbb45a71f7d7d7283206c566af2da4c83bac62d0a8dda0eb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","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}
|