Typed Python monorepo — 13 FastAPI services: ML training (GPT-2, LoRA/QLoRA, SD/SDXL/FLUX), NLP (Turkic IPA, Whisper STT), quant-ML risk (Kafka + XGBoost/LightGBM/ClearGBM Rust GBDT via PyO3), PDF extraction (pdfplumber, docTR OCR). Strict mypy, 100% coverage, custom static-analysis framework enforcing 20+ architecture rules.
0
stars
4,476
commits
Python
primary language
Sep 10, 2026
updated
Typed Python monorepo for ML training, NLP, media services, and quant-ML risk modeling. Strict mypy (no Any, no cast, no type: ignore), 100% statement + branch test coverage, FastAPI + RQ + Redis + Kafka architecture.
Doing research, auditing an experiment, or reproducing a number? Read
docs/RESEARCH.md first. It is the index of every body
of work on this machine that produces numbers someone compares — including the
two that live outside this repository — and says for each one what provenance
it carries and what it does not.
The three parts of this repo worth reading first:
libs/cleargbm/ + libs/cleargbm_rs/ — From-scratch interpretable gradient boosting: numpy Python orchestration with a Rust core (histogram building, tree construction, prediction pipeline) exposed via PyO3 bindings.services/covenant-radar-api/ + libs/covenant_ml/ + libs/covenant_nn/ — Multi-model risk prediction: pluggable ML backends (XGBoost, LightGBM, ClearGBM, LogReg, RF) and PyTorch NN backends (MLP, LSTM), Optuna optimization, Kafka streaming.libs/monorepo_guards/ — Custom static-analysis framework: architecture-enforcement rules (Python + Rust) that lint invariants CI-time.The smaller services (grandma-api, github-stats-api, procart-api) are side projects.
| Service | Port | Description |
|---|---|---|
| data-bank-api | 8001 | Content-addressed file storage with atomic writes |
| Model-Trainer | 8005 | Language model training with LoRA/QLoRA/Unsloth fine-tuning, GPT-2, Char-LSTM, CUDA support |
| Art-Trainer | 8011 | Image generation model training (LoRAs for SD 1.5, SDXL, FLUX) with Kohya-ss backend |
| handwriting-ai | 8004 | MNIST digit recognition with calibrated confidence |
| turkic-api | 8000 | Turkic language detection and IPA transliteration (Kazakh, Kyrgyz, Uzbek, Turkish, Russian, +4 more) |
| transcript-api | 8003 | YouTube video transcription |
| qr-api | 8002 | QR code generation |
| music-wrapped-api | 8006 | Music listening analytics (Spotify, Apple, YouTube Music, Last.fm) |
| covenant-radar-api | 8007 | Multi-domain risk prediction with pluggable domains (Covenant, Weather/McKinnon, Esports), Kafka streaming (XGBoost, LightGBM, ClearGBM, LogReg, RF, MLP, LSTM) |
| grandma-api | 8008 | Multi-language audio-to-English translation (Whisper STT + language detection, GPT-4o-mini translation) |
| github-stats-api | 8009 | GitHub stats SVG card generation |
| opportunity-radar-api | 8010 | Hackathon and competition discovery |
| procart-api | - | Procedural art rendering orchestration |
| Client | Description |
|---|---|
| DiscordBot | Discord bot integrating all platform services |
| TankpitBot | Tankpit.com WebSocket protocol reverse-engineering and game bot |
| RustedWarfareBot | Headless Rusted Warfare client — JVM agent + Python planner, no screen scraping |
| NavProbe | Reproducibility instrument for simulated navigation — seeded rollouts, canonical digests, determinism verdicts across MJX and MuJoCo-Warp |
| Library | Description |
|---|---|
| platform_core | Config, logging, HTTP clients, FastAPI utilities, OAuth 2.0 with PKCE, job event schemas |
| platform_workers | RQ job infrastructure, Redis utilities |
| platform_ml | ML artifact storage, manifests, device/precision auto-detection |
| platform_discord | Discord embed builders, event subscribers |
| platform_music | Music analytics, streaming service adapters |
| platform_email | Email integration (Outlook Graph API, Gmail) with OAuth 2.0 |
| platform_calendar | Google Calendar API for competition deadline tracking with auto-reminders |
| platform_codebase | Codebase capability detection and profiling |
| platform_devpost | Devpost hackathon discovery + capability matching |
| platform_kaggle | Kaggle competition discovery + capability matching |
| platform_stt | Speech-to-text with OpenAI Whisper API, chunking, language detection |
| platform_langid | Spoken language identification from audio using Meta MMS-LID |
| platform_translate | Text translation with pluggable backends (Anthropic, OpenAI) |
| instrument_io | Scientific instrument data format readers and writers (mass spec, mzML, Excel, PDF) |
| monorepo_guards | Code quality rules (34 static analysis checks, Python + Rust) |
| covenant_domain | Loan covenant domain models and rule engine |
| covenant_ml | Classification and regression backends (XGBoost, LightGBM, ClearGBM, LogReg, RF) with Optuna, temporal/NetCDF features |
| covenant_nn | PyTorch neural network backends (MLP, LSTM) for classification and regression |
| covenant_persistence | PostgreSQL repositories for covenant data |
| cleargbm | From-scratch interpretable gradient boosting (numpy only, Rust-accelerated via hooks) |
| cleargbm_rs | Rust core for ClearGBM: histogram building, tree construction, prediction pipeline, PyO3 bindings |
| procart | Procedural art core (neon visuals, HDR pipeline) |
# Start shared infrastructure (Redis + PostgreSQL + Kafka + Traefik)
make infra
# Start a specific service
make up-databank # data-bank-api
make up-trainer # Model-Trainer (GPU)
make up-art-trainer # Art-Trainer (GPU)
make up-handwriting # handwriting-ai
make up-qr # qr-api
make up-transcript # transcript-api
make up-turkic # turkic-api
make up-music # music-wrapped-api
make up-covenant # covenant-radar-api
make up-grandma # grandma-api
make up-github-stats # github-stats-api
make up-opportunity # opportunity-radar-api
make up-discord # DiscordBot
# Start all services
make up-all
# Stop everything
make down
# Stop all services and prune Docker volumes
make clean
# Run checks across all libs/services
make check
make lint
make test
# View running containers
make status
# Stream logs
make logs
+--------------+
| Traefik (80) |
+------+-------+
|
+-----------+-----------+
| |
+-----v-----+ +-----v-----+
| Discord | | Services |
| Bot | | (FastAPI) |
+-----+-----+ +-----+-----+
| |
+-------------+-------------+---------+
| | |
+-----v-----+ +-----v-----+ +-----v-----+
| Redis | | PostgreSQL| | data-bank |
| (pub/sub) | | (covenant)| | (storage) |
+-----+-----+ +-----------+ +-----------+
|
+-----v-----+
| RQ Workers|
+-----------+
All services share:
platform-network (Docker bridge)platform-redis (job queue + pub/sub for async services)platform-postgres (covenant-radar persistence)/healthz, /readyz)| Component | Port | Purpose |
|---|---|---|
| Redis 7 | 6379 | Job queue, pub/sub, status tracking |
| PostgreSQL 16 | 5432 | Covenant-radar persistence |
| Kafka 3.8 | 9092 | Covenant-radar streaming: measurements in, predictions and alerts out |
| Traefik 3 | 80, 8080 | API gateway + dashboard |
# Install dependencies for a service
cd services/Model-Trainer
poetry install --with dev
# Run checks
make check
# Run just lint or test
make lint
make test
See docs/ for detailed documentation.
Any types, zero cast, zero type: ignore_test_hooks.py patternMIT
4,476 commits
Python
88.0%
HTML
4.9%
Rust
4.6%
Java
1.4%
Typed Python monorepo — 13 FastAPI services: ML training (GPT-2, LoRA/QLoRA, SD/SDXL/FLUX), NLP (Turkic IPA, Whisper STT), quant-ML risk (Kafka + XGBoost/LightGBM/ClearGBM Rust GBDT via PyO3), PDF extraction (pdfplumber, docTR OCR). Strict mypy, 100% coverage, custom static-analysis framework enforcing 20+ architecture rules.
0
stars
4,476
commits
Python
primary language
Sep 10, 2026
updated
Typed Python monorepo for ML training, NLP, media services, and quant-ML risk modeling. Strict mypy (no Any, no cast, no type: ignore), 100% statement + branch test coverage, FastAPI + RQ + Redis + Kafka architecture.
Doing research, auditing an experiment, or reproducing a number? Read
docs/RESEARCH.md first. It is the index of every body
of work on this machine that produces numbers someone compares — including the
two that live outside this repository — and says for each one what provenance
it carries and what it does not.
The three parts of this repo worth reading first:
libs/cleargbm/ + libs/cleargbm_rs/ — From-scratch interpretable gradient boosting: numpy Python orchestration with a Rust core (histogram building, tree construction, prediction pipeline) exposed via PyO3 bindings.services/covenant-radar-api/ + libs/covenant_ml/ + libs/covenant_nn/ — Multi-model risk prediction: pluggable ML backends (XGBoost, LightGBM, ClearGBM, LogReg, RF) and PyTorch NN backends (MLP, LSTM), Optuna optimization, Kafka streaming.libs/monorepo_guards/ — Custom static-analysis framework: architecture-enforcement rules (Python + Rust) that lint invariants CI-time.The smaller services (grandma-api, github-stats-api, procart-api) are side projects.
| Service | Port | Description |
|---|---|---|
| data-bank-api | 8001 | Content-addressed file storage with atomic writes |
| Model-Trainer | 8005 | Language model training with LoRA/QLoRA/Unsloth fine-tuning, GPT-2, Char-LSTM, CUDA support |
| Art-Trainer | 8011 | Image generation model training (LoRAs for SD 1.5, SDXL, FLUX) with Kohya-ss backend |
| handwriting-ai | 8004 | MNIST digit recognition with calibrated confidence |
| turkic-api | 8000 | Turkic language detection and IPA transliteration (Kazakh, Kyrgyz, Uzbek, Turkish, Russian, +4 more) |
| transcript-api | 8003 | YouTube video transcription |
| qr-api | 8002 | QR code generation |
| music-wrapped-api | 8006 | Music listening analytics (Spotify, Apple, YouTube Music, Last.fm) |
| covenant-radar-api | 8007 | Multi-domain risk prediction with pluggable domains (Covenant, Weather/McKinnon, Esports), Kafka streaming (XGBoost, LightGBM, ClearGBM, LogReg, RF, MLP, LSTM) |
| grandma-api | 8008 | Multi-language audio-to-English translation (Whisper STT + language detection, GPT-4o-mini translation) |
| github-stats-api | 8009 | GitHub stats SVG card generation |
| opportunity-radar-api | 8010 | Hackathon and competition discovery |
| procart-api | - | Procedural art rendering orchestration |
| Client | Description |
|---|---|
| DiscordBot | Discord bot integrating all platform services |
| TankpitBot | Tankpit.com WebSocket protocol reverse-engineering and game bot |
| RustedWarfareBot | Headless Rusted Warfare client — JVM agent + Python planner, no screen scraping |
| NavProbe | Reproducibility instrument for simulated navigation — seeded rollouts, canonical digests, determinism verdicts across MJX and MuJoCo-Warp |
| Library | Description |
|---|---|
| platform_core | Config, logging, HTTP clients, FastAPI utilities, OAuth 2.0 with PKCE, job event schemas |
| platform_workers | RQ job infrastructure, Redis utilities |
| platform_ml | ML artifact storage, manifests, device/precision auto-detection |
| platform_discord | Discord embed builders, event subscribers |
| platform_music | Music analytics, streaming service adapters |
| platform_email | Email integration (Outlook Graph API, Gmail) with OAuth 2.0 |
| platform_calendar | Google Calendar API for competition deadline tracking with auto-reminders |
| platform_codebase | Codebase capability detection and profiling |
| platform_devpost | Devpost hackathon discovery + capability matching |
| platform_kaggle | Kaggle competition discovery + capability matching |
| platform_stt | Speech-to-text with OpenAI Whisper API, chunking, language detection |
| platform_langid | Spoken language identification from audio using Meta MMS-LID |
| platform_translate | Text translation with pluggable backends (Anthropic, OpenAI) |
| instrument_io | Scientific instrument data format readers and writers (mass spec, mzML, Excel, PDF) |
| monorepo_guards | Code quality rules (34 static analysis checks, Python + Rust) |
| covenant_domain | Loan covenant domain models and rule engine |
| covenant_ml | Classification and regression backends (XGBoost, LightGBM, ClearGBM, LogReg, RF) with Optuna, temporal/NetCDF features |
| covenant_nn | PyTorch neural network backends (MLP, LSTM) for classification and regression |
| covenant_persistence | PostgreSQL repositories for covenant data |
| cleargbm | From-scratch interpretable gradient boosting (numpy only, Rust-accelerated via hooks) |
| cleargbm_rs | Rust core for ClearGBM: histogram building, tree construction, prediction pipeline, PyO3 bindings |
| procart | Procedural art core (neon visuals, HDR pipeline) |
# Start shared infrastructure (Redis + PostgreSQL + Kafka + Traefik)
make infra
# Start a specific service
make up-databank # data-bank-api
make up-trainer # Model-Trainer (GPU)
make up-art-trainer # Art-Trainer (GPU)
make up-handwriting # handwriting-ai
make up-qr # qr-api
make up-transcript # transcript-api
make up-turkic # turkic-api
make up-music # music-wrapped-api
make up-covenant # covenant-radar-api
make up-grandma # grandma-api
make up-github-stats # github-stats-api
make up-opportunity # opportunity-radar-api
make up-discord # DiscordBot
# Start all services
make up-all
# Stop everything
make down
# Stop all services and prune Docker volumes
make clean
# Run checks across all libs/services
make check
make lint
make test
# View running containers
make status
# Stream logs
make logs
+--------------+
| Traefik (80) |
+------+-------+
|
+-----------+-----------+
| |
+-----v-----+ +-----v-----+
| Discord | | Services |
| Bot | | (FastAPI) |
+-----+-----+ +-----+-----+
| |
+-------------+-------------+---------+
| | |
+-----v-----+ +-----v-----+ +-----v-----+
| Redis | | PostgreSQL| | data-bank |
| (pub/sub) | | (covenant)| | (storage) |
+-----+-----+ +-----------+ +-----------+
|
+-----v-----+
| RQ Workers|
+-----------+
All services share:
platform-network (Docker bridge)platform-redis (job queue + pub/sub for async services)platform-postgres (covenant-radar persistence)/healthz, /readyz)| Component | Port | Purpose |
|---|---|---|
| Redis 7 | 6379 | Job queue, pub/sub, status tracking |
| PostgreSQL 16 | 5432 | Covenant-radar persistence |
| Kafka 3.8 | 9092 | Covenant-radar streaming: measurements in, predictions and alerts out |
| Traefik 3 | 80, 8080 | API gateway + dashboard |
# Install dependencies for a service
cd services/Model-Trainer
poetry install --with dev
# Run checks
make check
# Run just lint or test
make lint
make test
See docs/ for detailed documentation.
Any types, zero cast, zero type: ignore_test_hooks.py patternMIT
4,476 commits
Python
88.0%
HTML
4.9%
Rust
4.6%
Java
1.4%