-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathpyproject.toml
More file actions
131 lines (113 loc) · 3.62 KB
/
pyproject.toml
File metadata and controls
131 lines (113 loc) · 3.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
[project]
name = "lightspeed-evaluation"
version = "0.7.0"
description = "LSC Evaluation Framework - Comprehensive evaluation tooling for GenAI applications"
authors = []
requires-python = ">=3.11,<3.14"
readme = "README.md"
license = {text = "Apache"}
dependencies = [
"ragas>=0.4.0,<=0.4.3",
"deepeval>=3.9.0,<=3.9.1",
"litellm>=1.80.0,<=1.82.4",
"pydantic>=2.10.0,<=2.11.7",
"pyyaml>=6.0,<=6.0.2",
"pandas>=2.2.0,<=2.3.2",
"datasets>=3.0.0,<=4.0.0",
"matplotlib>=3.5.0,<=3.10.6",
"seaborn>=0.11.0,<=0.13.2",
"numpy>=1.23.0,<=2.3.2",
"scipy>=1.14.0,<=1.16.2",
"httpx>=0.28.0,<=0.28.1",
"tqdm==4.67.1",
"click>=8.0.0,<=8.2.1",
"diskcache==5.6.3",
"tenacity==9.1.2",
"langchain[huggingface]>=0.3.30,<=1.2.12",
"langchain-google-genai>=2.0.0,<=2.1.12",
"sqlalchemy>=2.0.0,<=2.0.43",
]
[project.optional-dependencies]
# Local embedding models - includes torch
# Only needed when using embedding.provider: huggingface
#
# Installation options:
# CPU (default, ~2GB): uv sync --extra local-embeddings
# GPU (~6GB): cp uv-gpu.lock uv.lock && uv sync --extra local-embeddings --frozen
local-embeddings = [
"torch>=2.5.0,<=2.10.0",
"sentence-transformers>=5.2.0,<=5.2.3",
]
# NLP metrics dependencies - required for nlp:bleu, nlp:rouge, nlp:semantic_similarity_distance
# Install with:
# pip install 'lightspeed-evaluation[nlp-metrics]'
# or
# uv sync --extra nlp-metrics
nlp-metrics = [
"sacrebleu>=2.0.0,<=2.5.1", # Required for BLEU score
"rouge-score==0.1.2", # Required for ROUGE score
"rapidfuzz>=3.0.0,<=3.14.3", # Required for semantic_similarity_distance
]
[dependency-groups]
dev = [
"bandit>=1.7.0,<=1.9.2",
"black==25.1.0",
"mypy>=1.15.0,<=1.17.1",
"ruff>=0.9.0,<=0.12.11",
"pyright>=1.1.401,<=1.1.404",
"pydocstyle==6.3.0",
"pylint-pydantic>=0.3.0,<=0.3.5",
"pytest>=8.3.2,<=8.4.1",
"pytest-cov>=6.0.0,<=6.2.1",
"pytest-mock==3.15.1",
"pytest-timeout==2.4.0",
]
[project.scripts]
lightspeed-eval = "lightspeed_evaluation.runner.evaluation:main"
generate_answers = "generate_answers.generate_answers:main"
# Note: torch[cpu] variant configuration removed for uv compatibility
# Modern PyTorch versions are available on PyPI directly
[tool.isort]
src_paths = ["src", "tests"]
[tool.black]
line-length = 88
[tool.pydocstyle]
convention = "google"
[tool.mypy]
disable_error_code = ["union-attr", "return-value", "arg-type", "import-untyped"]
ignore_missing_imports = true
plugins = ["pydantic.mypy"]
[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true
[tool.pylint.MASTER]
load-plugins = ["pylint_pydantic"]
init-hook = "import sys; sys.path.append('.')"
[tool.ruff]
[tool.ruff.lint]
extend-select = ["TID251"]
[tool.ruff.lint.flake8-tidy-imports.banned-api]
unittest = { msg = "use pytest instead of unittest" }
"unittest.mock" = { msg = "use pytest-mock instead of unittest.mock" }
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/lightspeed_evaluation"]
# UV configuration for CPU-only PyTorch (reduces package size from ~6GB to ~2GB)
[tool.uv]
[[tool.uv.index]]
name = "pytorch-cpu"
url = "https://download.pytorch.org/whl/cpu"
explicit = true
# Use CPU index for torch by default
[tool.uv.sources]
torch = { index = "pytorch-cpu" }
# Lock files:
# uv.lock - CPU-only PyTorch (default, ~2GB)
# uv-gpu.lock - Full PyTorch with CUDA (~6GB)
#
# Installation:
# CPU: uv sync --extra local-embeddings
# GPU: cp uv-gpu.lock uv.lock && uv sync --extra local-embeddings --frozen