-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
163 lines (147 loc) · 5.95 KB
/
Copy pathpyproject.toml
File metadata and controls
163 lines (147 loc) · 5.95 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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
# Project metadata + tool config.
#
# Three-layer dependency design (don't drift these):
# - ``[project.dependencies]`` below is the **authoritative** runtime
# dep set. ``pip install .`` (or ``pip install -e .``) installs the
# package and these deps in one shot.
# - ``requirements.txt`` is a dev-convenience mirror (loose lower
# bounds matching this file) plus dev tooling (``pytest``).
# - ``requirements-lock.txt`` is a pip-freeze-style pinned lockfile
# for the current security-refreshed CPU dev environment. Historical
# report numbers remain anchored to the frozen release tag documented
# in ``requirements-lock.txt``.
#
# To get a working dev environment use ``make install`` — that runs both
# ``pip install -r requirements.txt`` (for ``pytest`` etc.) and
# ``pip install -e .``.
[build-system]
requires = ["setuptools>=61", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "msmarco-genqa"
version = "0.1.0"
description = "Retrieval-augmented question answering on MS MARCO."
readme = "README.md"
requires-python = ">=3.10"
license = { file = "LICENSE" }
authors = [{ name = "Gioia Zheng", email = "gioia.zheng.stud@gmail.com" }]
keywords = ["rag", "information-retrieval", "msmarco", "reranking", "evaluation"]
# Runtime deps. Loose lower bounds mirroring ``requirements.txt``; exact
# pins live in ``requirements-lock.txt``. Edit all three together.
dependencies = [
# Core scientific stack
"numpy>=1.24",
"pandas>=2.0",
"matplotlib>=3.7",
# Configuration
"pyyaml>=6.0",
# Datasets and IO
"datasets>=2.14",
"ir-datasets>=0.5.5",
"lxml>=6.1.0",
# Lexical retrieval
"bm25s>=0.2",
# Dense retrieval
"sentence-transformers>=5.5.1",
"faiss-cpu>=1.7",
# Generation
"torch>=2.12.0",
"transformers>=5.10.2",
"sentencepiece>=0.1.99",
# Evaluation
"evaluate>=0.4",
"rouge_score>=0.1.2",
"sacrebleu>=2.3",
"bert_score>=0.3.13",
]
[project.urls]
Repository = "https://github.com/GioiaZheng/msmarco-genqa"
Results = "https://github.com/GioiaZheng/msmarco-genqa/blob/main/RESULTS.md"
Reproducibility = "https://github.com/GioiaZheng/msmarco-genqa/blob/main/REPRODUCIBILITY.md"
[project.optional-dependencies]
serve = [
"fastapi>=0.110",
"uvicorn>=0.27",
]
tracking = [
"mlflow>=2.10",
"wandb>=0.16",
]
evaluation = [
"ir-measures>=0.3.3",
]
[tool.setuptools.packages.find]
# Two roots: ``src/`` for the library package and the repo root for the
# ``experiments`` entry-point layer. The CLI shims under
# ``msmarco_genqa.cli`` re-export ``experiments.run_*.main`` so the
# ``mgq-*`` console scripts can find them; that requires ``experiments``
# itself to be installed.
where = ["src", "."]
include = ["msmarco_genqa*", "experiments"]
exclude = ["tests*", "scripts*"]
[project.scripts]
# Console-script entry points. Each shim under msmarco_genqa.cli.<name>
# re-exports main() from the matching experiments/run_<name>.py.
mgq-retrieve = "msmarco_genqa.cli.retrieve:main"
mgq-dense = "msmarco_genqa.cli.dense:main"
mgq-fuse = "msmarco_genqa.cli.fuse:main"
mgq-transform-queries = "msmarco_genqa.cli.query_transform:main"
mgq-query-transform-ablation = "msmarco_genqa.cli.query_transform_ablation:main"
mgq-retrieval-report = "msmarco_genqa.cli.retrieval_report:main"
mgq-context-packing-report = "msmarco_genqa.cli.context_packing_report:main"
mgq-rag-triad = "msmarco_genqa.cli.rag_triad:main"
mgq-sweep-summary = "msmarco_genqa.cli.sweep_summary:main"
mgq-export-rag-observatory = "msmarco_genqa.cli.rag_observatory_export:main"
mgq-export-rag-observatory-sweep = "msmarco_genqa.cli.rag_observatory_sweep_export:main"
mgq-rerank = "msmarco_genqa.cli.rerank:main"
mgq-generate = "msmarco_genqa.cli.generate:main"
mgq-pipeline = "msmarco_genqa.cli.pipeline:main"
mgq-serve = "msmarco_genqa.service.app:main"
rag-eval = "msmarco_genqa.cli.rag_eval:main"
mgq-trec-eval = "msmarco_genqa.cli.trec_eval:main"
mgq-trec-release = "msmarco_genqa.cli.trec_release:main"
mgq-beir-release = "msmarco_genqa.cli.beir_release:main"
mgq-nfcorpus-video-release = "msmarco_genqa.cli.nfcorpus_video_release:main"
# --------------------------------------------------------------------------- #
# pytest
# --------------------------------------------------------------------------- #
[tool.pytest.ini_options]
minversion = "7.0"
testpaths = ["tests"]
# Default: only fast unit tests. ``slow`` and ``integration`` are opt-in via
# ``-m slow`` / ``-m integration`` (or via ``make test-slow``).
addopts = "-m 'not slow and not integration'"
markers = [
"slow: tests that need real models, large data, or network access (HF Hub, ir_datasets). Excluded by default.",
"integration: end-to-end tests that hit real external services. Excluded by default.",
]
# --------------------------------------------------------------------------- #
# ruff
# --------------------------------------------------------------------------- #
#
# Conservative ruleset: we want catch-real-bugs (pyflakes ``F``) plus
# import-order hygiene (``I``), with a couple of widely-ignored style rules.
# We deliberately do NOT enable opinionated style families (UP, B, S, …) on
# this first pass — they would touch dozens of files without changing
# behaviour and obscure the real fixes.
[tool.ruff]
line-length = 100
target-version = "py310"
extend-exclude = [
"data",
"outputs",
"reports/generated",
"figures",
]
[tool.ruff.lint]
# Conservative first pass: pyflakes (real bugs only) + a handful of
# whitespace warnings. Import-order (``I``) is intentionally OFF — it would
# rewrite import blocks across many files for zero behavioural change, and
# the user has asked us not to introduce wholesale formatting churn.
# Promote to ``E`` / ``I`` / ``UP`` in a follow-up pass once the codebase
# has been intentionally cleaned.
select = ["F", "W"]
ignore = [
"E501", # line-too-long: requirements.txt comments + long URLs in docstrings
"E731", # lambda assignment: occasionally clearer than def for one-liners
]