From 43b9cd50baed10e0c0307248f1f472d6a541e952 Mon Sep 17 00:00:00 2001 From: Yiorgis Gozadinos Date: Tue, 30 Sep 2025 13:21:53 +0300 Subject: [PATCH] Move evaluations to src/ --- .gitignore | 2 +- docs/benchmarks.md | 2 +- pyproject.toml | 2 +- {evaluations => src/evaluations}/__init__.py | 0 {evaluations => src/evaluations}/benchmark.py | 0 {evaluations => src/evaluations}/config.py | 0 {evaluations => src/evaluations}/datasets/__init__.py | 0 {evaluations => src/evaluations}/datasets/repliqa.py | 0 {evaluations => src/evaluations}/datasets/wix.py | 0 {evaluations => src/evaluations}/llm_judge.py | 0 10 files changed, 3 insertions(+), 3 deletions(-) rename {evaluations => src/evaluations}/__init__.py (100%) rename {evaluations => src/evaluations}/benchmark.py (100%) rename {evaluations => src/evaluations}/config.py (100%) rename {evaluations => src/evaluations}/datasets/__init__.py (100%) rename {evaluations => src/evaluations}/datasets/repliqa.py (100%) rename {evaluations => src/evaluations}/datasets/wix.py (100%) rename {evaluations => src/evaluations}/llm_judge.py (100%) diff --git a/.gitignore b/.gitignore index 1156976f..48bed481 100644 --- a/.gitignore +++ b/.gitignore @@ -11,7 +11,7 @@ wheels/ # tests .coverage* -evaluations/data/ +src/evaluations/data/ tests/data/ .pytest_cache/ .ruff_cache/ diff --git a/docs/benchmarks.md b/docs/benchmarks.md index 07f0c6df..33921382 100644 --- a/docs/benchmarks.md +++ b/docs/benchmarks.md @@ -3,7 +3,7 @@ We use the [repliqa](https://huggingface.co/datasets/ServiceNow/repliqa) dataset for the evaluation of `haiku.rag`. You can perform your own evaluations with the Typer CLI in -`evaluations/benchmark.py`, for example `python -m evaluations.benchmark repliqa`. +`src/evaluations/benchmark.py`, for example `cd src && python -m evaluations.benchmark repliqa`. The evaluation flow is orchestrated with [`pydantic-evals`](https://github.com/pydantic/pydantic-ai/tree/main/libs/pydantic-evals), which we leverage for dataset management, scoring, and report generation. diff --git a/pyproject.toml b/pyproject.toml index 09727f05..9c9e9c83 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,7 +49,7 @@ requires = ["hatchling"] build-backend = "hatchling.build" [tool.hatch.build] -exclude = ["/docs", "/evaluations", "/tests", "/.github"] +exclude = ["/docs", "/tests", "/.github"] [tool.hatch.build.targets.wheel] packages = ["src/haiku"] diff --git a/evaluations/__init__.py b/src/evaluations/__init__.py similarity index 100% rename from evaluations/__init__.py rename to src/evaluations/__init__.py diff --git a/evaluations/benchmark.py b/src/evaluations/benchmark.py similarity index 100% rename from evaluations/benchmark.py rename to src/evaluations/benchmark.py diff --git a/evaluations/config.py b/src/evaluations/config.py similarity index 100% rename from evaluations/config.py rename to src/evaluations/config.py diff --git a/evaluations/datasets/__init__.py b/src/evaluations/datasets/__init__.py similarity index 100% rename from evaluations/datasets/__init__.py rename to src/evaluations/datasets/__init__.py diff --git a/evaluations/datasets/repliqa.py b/src/evaluations/datasets/repliqa.py similarity index 100% rename from evaluations/datasets/repliqa.py rename to src/evaluations/datasets/repliqa.py diff --git a/evaluations/datasets/wix.py b/src/evaluations/datasets/wix.py similarity index 100% rename from evaluations/datasets/wix.py rename to src/evaluations/datasets/wix.py diff --git a/evaluations/llm_judge.py b/src/evaluations/llm_judge.py similarity index 100% rename from evaluations/llm_judge.py rename to src/evaluations/llm_judge.py