WARP.md
This file provides guidance to WARP (warp.dev) when working with code in this repository.
WARP.md
This file provides guidance to WARP (warp.dev) when working with code in this repository.
Overview
This repository is an ASR (Automatic Speech Recognition) evaluation system and media processing toolkit built for:
- Benchmarking multiple ASR models (Whisper variants, Canary-Qwen, OLMoASR, etc.)
- Processing video/audio content with subtitle generation and synchronization
- Managing evaluation datasets with Hugging Face integration
- Running distributed GPU workloads on RunPod cloud infrastructure
The system supports both containerized development (Docker/JupyterLab) and various deployment modes (full evaluation, fast GPU-optimized, minimal CPU-only).
Key Commands
Development Environment
Start containerized environment:
./start.sh # Start Docker Compose services with auto-token retrieval
docker compose up --build -d # Manual Docker Compose startup
Access the environment:
docker compose exec jupyterlab bash # Shell into container as jovyan user
# Work directory: /home/jovyan/workspaces
Testing and Evaluation
Run ASR model tests:
python run_tests.py # Basic model availability test
python run_tests.py --full # Full pytest suite with coverage
Run ASR model evaluations:
python asr_leaderboard.py # Full comprehensive evaluation
python asr_leaderboard.py --mode fast # GPU-optimized fast evaluation
python asr_leaderboard.py --mode minimal # CPU-only minimal evaluation
python asr_leaderboard.py --debug # Enable detailed logging
Dataset Management
Manage evaluation datasets:
python dataset.py list # List available datasets
python dataset.py info vaporeon # Get dataset information
python dataset.py get vaporeon --path datasets/ # Download/verify dataset
Architecture Overview
Core Components
ASR Evaluation System (src/providers/asr/):
core/interfaces.py- Abstract base classes (ASRModelAdapter,TranscriptionResult,ModelInfo)adapters/- Model-specific implementations:faster_whisper_adapter.py- Local Whisper via faster-whispercanary_qwen_adapter.py- NVIDIA Canary-Qwen models via transformersolmoasr_adapter.py- Allen AI OLMoASR models
core/config.py- Configuration management (ConfigManagerloads fromconfig/asr_models.yaml)storage/postgres_storage.py- PostgreSQL result persistence
Dataset Management (src/datasets/):
manager.py- Auto-discovery system for dataset handlersbase_handler.py- Abstract dataset handler interfacehandlers/- Dataset-specific handlers (vaporeon, gophers, etc.)
Media Processing (src/):
subtitle_processor.py- Subtitle generation and formattingvideo_remuxer.py- Video container operationsprocess_wmv_files.py- Windows Media Video processing
Infrastructure (src/infra/):
runpod_manager.py- RunPod GPU cloud management
Configuration System
The system uses a hierarchical configuration approach:
-
Model Configuration (
config/asr_models.yaml):- Defines all supported ASR models with performance targets
- Specifies device requirements, use cases, and fallback chains
- Supports model selection by use case:
highest_accuracy,fastest_processing,multilingual,transparent
-
Environment Variables (
.env):- API keys:
OPENROUTER_API_KEY,CLAUDE_API_TOKEN,RUNPOD_API_KEY - Hugging Face:
HF_TOKEN,HF_USERNAME - Database:
POSTGRES_*settings
- API keys:
-
Runtime Configuration:
- Models auto-discovered via
ConfigManager.get_models_by_use_case() - Fallback chains ensure graceful degradation
- Processing modes: transcript_only, subtitles, diarization, real_time
- Models auto-discovered via
Evaluation Flow
- Model Registration:
ConfigManagerloads model configs from YAML - Adapter Creation: Factory pattern creates appropriate
ASRModelAdapterinstances - Benchmarking:
asr_leaderboard.pyruns models against reference datasets - Metrics Calculation: WER/CER computed via Levenshtein distance
- Result Storage: Optional PostgreSQL persistence for historical analysis
Development Patterns
Adding New ASR Models
-
Create adapter in
src/providers/asr/adapters/new_model_adapter.py:- Inherit from
ASRModelAdapter - Implement
transcribe(),get_model_info(),is_available()
- Inherit from
-
Add configuration in
config/asr_models.yaml:- Define model metadata, parameters, device requirements
- Add to appropriate use case categories
-
Register in evaluation (
asr_leaderboard.py):- Add to
models_to_testlist with factory function
- Add to
Adding New Datasets
-
Create handler in
src/datasets/handlers/dataset_name_handler.py:- Inherit from
BaseDatasetHandler - Implement
get(),info(),verify()
- Inherit from
-
Auto-discovery:
DatasetManagerwill automatically detect and register the handler
Important Rules and Constraints
Security Requirements
- Talisman pre-commit hook is mandatory - scans for secrets/sensitive data
- Never commit API keys - use
.envfile with environment variables - No emojis in code or documentation (organization policy)
Development Environment
- Use Docker containers for development to avoid system package conflicts
- Work as
jovyanuser inside containers (/home/jovyan/workspaces) - GPU support enabled in Docker Compose for CUDA models
Code Quality
- Run tests before commits:
python run_tests.py --full - Follow Python conventions: snake_case, type hints
- Security-first approach: Talisman will block unsafe commits
Model Performance Targets
Reference from config/asr_models.yaml:
- Excellent WER: < 5% (canary-qwen-2.5b targets 5.63%)
- Good WER: < 10% (faster-whisper-base targets 9.2%)
- Acceptable WER: < 20%
Hardware Considerations
- VRAM requirements vary: tiny models (1GB) to large models (16GB+)
- Fallback chains defined for when preferred models unavailable
- CPU/GPU mode selection automatic based on hardware availability
File Structure Notes
- Notebooks in
notebooks/are git-tracked for reproducible experiments - Configuration in
config/centralized for model and evaluation settings - Tests in
tests/with pytest configuration inpytest.ini - Docker setup supports both minimal (
Dockerfile.minimal) and full (Dockerfile) environments - Media processing logs go to
.logfiles (gitignored for sensitive data)
Related Documents
OABench: Benchmarking Large Language Models on the Brazilian Bar Examination
**Roberto T. Cestari**
Ruby 2.7
title: Ruby 2.7 changes
agentmark — Benchmark AI Coding Agents on Your Codebase
Build an open-source Python CLI that lets developers benchmark and compare
BENCHMARKS
The math in gf256 is very close to the hardware, and for each algorithm, there