Consolidate eval scripts into one - #26
Merged
Merged
Conversation
GAInTheHouse
approved these changes
Feb 25, 2026
There was a problem hiding this comment.
Pull request overview
This PR consolidates four separate evaluation scripts into a single unified script (experiments/run_evaluation.py) and adds support for using LLM (Ollama) as a gold-standard reference generator. The changes improve the evaluation workflow by providing a consistent interface for running evaluations on both baseline (Whisper) and fine-tuned (Wav2Vec2) models.
Changes:
- Unified evaluation: New
run_evaluation.pyscript replacesrun_comprehensive_evaluations.py,kavya_evaluation_framework.py,run_benchmark.py, andverify_evaluation_numbers.py - LLM-as-gold mode: Added
--gold-from-llmflag to use Ollama for generating reference transcripts from baseline outputs - Enhanced compatibility: Updated
ollama_llm.pyto handle both dict and typed responses from different ollama package versions - New evaluation module: Added
EvaluationModuleclass for unified streaming and batch evaluation - Documentation consolidation: Merged separate evaluation docs into
docs/EVALUATION_SUMMARY.md - Dependency relaxation: Changed bitsandbytes requirement from >=0.43.0 to >=0.40.0 for macOS compatibility
Reviewed changes
Copilot reviewed 17 out of 19 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
experiments/run_evaluation.py |
New unified evaluation script supporting eval sets, audio+refs, and LLM-as-gold modes |
src/evaluation/metrics.py |
Added EvaluationModule class for unified streaming and batch evaluation |
src/agent/ollama_llm.py |
Updated to handle both dict and typed responses from ollama package |
tests/test_metrics.py |
Added comprehensive tests for new EvaluationModule class |
requirements.txt |
Relaxed bitsandbytes version requirement for macOS ARM compatibility |
docs/EVALUATION_SUMMARY.md |
Consolidated evaluation documentation with usage examples |
docs/SETUP_INSTRUCTIONS.md |
Updated to reference new unified evaluation script |
docs/QUICK_REFERENCE.md |
Updated quick reference with new evaluation command |
README.md |
Updated evaluation workflow and examples |
COMPREHENSIVE_DEMO.py |
Updated demo to reference new evaluation script |
scripts/setup_gcp_gpu.sh |
Updated example command to use new evaluation script |
.gitignore |
Added .venv to ignore list |
experiments/run_comprehensive_evaluations.py |
Deleted (consolidated into run_evaluation.py) |
experiments/kavya_evaluation_framework.py |
Deleted (consolidated into run_evaluation.py) |
experiments/run_benchmark.py |
Deleted (consolidated into run_evaluation.py) |
experiments/verify_evaluation_numbers.py |
Deleted (consolidated into run_evaluation.py) |
docs/EVALUATION_VERIFICATION_SUMMARY.md |
Deleted (merged into EVALUATION_SUMMARY.md) |
experiments/evaluation_outputs/evaluation_report.json |
Added example evaluation output |
experiments/evaluation_outputs/evaluation_report.txt |
Added example evaluation summary |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Refactored evaluation into a single module and script:
src/evaluation/metrics.pynow exposesEvaluationModule(streaming + batch) alongsideSTTEvaluator.experiments/run_evaluation.pyreplaces:run_comprehensive_evaluations.pykavya_evaluation_framework.pyrun_benchmark.pyverify_evaluation_numbers.py.Added LLM-as-gold evaluation mode:
--gold-from-llmonrun_evaluation.pyusesLlamaLLMCorrector(Ollama) to generate gold references from baseline transcripts.--eval-set,--audio-dir + --refs, and--audio-dir + --gold-from-llm.gold_sourceto indicate how references were obtained.Improved robustness and compatibility:
src/agent/ollama_llm.pyupdated to handle new typed responses (GenerateResponse/ChatResponse) from theollamaPython client.run_evaluation.pyno longer crashes when WER/CER areNone; logs warnings and printsN/Ain the text report.bitsandbytesrequirement (>=0.40.0) to avoid install failures on macOS ARM; other core deps (torch,transformers, etc.) now install cleanly.Consolidated and updated documentation & references:
docs/EVAL_SCRIPTS_RUNDOWN.mdanddocs/EVALUATION_VERIFICATION_SUMMARY.mdinto a singledocs/EVALUATION_SUMMARY.md(how to run, options, verification, metrics reference).README.md,COMPREHENSIVE_DEMO.py,docs/SETUP_INSTRUCTIONS.md, anddocs/QUICK_REFERENCE.mdto point torun_evaluation.pyand the new evaluation flow.Testing
experiments/run_evaluation.pywith:--eval-set(JSON-based eval set).--audio-dir ... --gold-from-llmwith Ollama running (llama3.2:3b).evaluation_report.jsonandevaluation_report.txtare generated with correct WER/CER andgold_source.null/N/A).