-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
169 lines (150 loc) · 4.29 KB
/
pyproject.toml
File metadata and controls
169 lines (150 loc) · 4.29 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
164
165
166
167
168
169
[project]
name = "AIXpert_preference_alignment"
version = "0.1.0"
description = "Replication Learning LLM-as-a-Judge for Preference Alignment"
readme = "README.md"
authors = [{ name = "Sindhuja Chaduvula", email = "sindhuja.chaduvula@vectorinstitute.ai" }]
license = "MIT"
requires-python = ">=3.10,<3.12"
# -----------------------------------------------------
# Main dependencies (CI-safe, CPU-safe)
# -----------------------------------------------------
dependencies = [
"python-dotenv==1.1",
"cmake==4.1.0",
"ninja>=1.13.0",
"pyarrow==15.0.2",
"einops>=0.8.1",
"setuptools>=80.9.0",
"wheel>=0.45.1",
"build>=1.3.0",
"trl==0.22.2",
"peft>=0.17.1",
"accelerate==1.10.1",
"wandb>=0.22.2",
"sentence-transformers>=5.1.2",
"openai>=2.6.1",
"pydantic-settings>=2.11.0",
"jsonlines>=4.0.0",
"seaborn>=0.13.2",
"aiofiles>=25.1.0",
"tiktoken==0.7.0",
"opik>=1.9.33",
]
# GPU-only dependencies MUST NOT be installed in CI
# -----------------------------------------------------
# These are installed only locally on GPU machines:
#
# uv sync --group gpu
#
[dependency-groups]
gpu = [
"torch==2.6.0+cu124",
"torchaudio==2.6.0+cu124",
"torchvision==0.21.0+cu124",
"bitsandbytes==0.48.1",
"flash-attn==2.7.3",
"unsloth[colab-new]",
"unsloth-zoo>=2025.10.10",
]
# Dev tools for linting, formatting, testing
# -----------------------------------------------------
dev = [
"codecov>=2.1.13",
"mypy>=1.14.1",
"nbqa>=1.9.1",
"pip-audit>=2.7.3",
"pre-commit>=4.1.0",
"pytest>=8.3.4",
"pytest-asyncio>=0.25.2",
"pytest-cov>=6.0.0",
"pytest-mock>=3.14.0",
"ruff>=0.9.2",
"types-pyyaml>=6.0.12.20250822",
]
# Documentation dependencies (MkDocs)
# -----------------------------------------------------
docs = [
"jinja2>=3.1.6",
"mkdocs>=1.6.0",
"mkdocs-material>=9.5.15",
"mkdocstrings>=0.24.1",
"mkdocstrings-python>=1.10.0",
"ipykernel>=6.29.5",
"ipython>=8.31.0",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/aixpert"]
# -----------------------------------------------------
# UV configuration – CI will install only dev + docs
# -----------------------------------------------------
[tool.uv]
default-groups = ["dev", "docs"]
index-url = "https://pypi.org/simple"
extra-index-url = ["https://download.pytorch.org/whl/cu124"]
index-strategy = "unsafe-best-match"
[tool.uv.sources]
unsloth = { git = "https://github.com/unslothai/unsloth.git" }
# -----------------------------------------------------
# Mypy (Static Type Checking)
# -----------------------------------------------------
[tool.mypy]
follow_imports = "normal"
ignore_missing_imports = true
install_types = true
pretty = true
non_interactive = true
allow_untyped_defs = false
check_untyped_defs = true
namespace_packages = true
explicit_package_bases = true
warn_unused_configs = true
strict_equality = true
extra_checks = true
mypy_path = "src"
# -----------------------------------------------------
# Ruff (Linting & Formatting)
# -----------------------------------------------------
[tool.ruff]
include = ["*.py", "pyproject.toml", "*.ipynb"]
exclude = [
"trl",
"**/factualdpo_trainer.py",
]
line-length = 88
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
docstring-code-format = true
[tool.ruff.lint]
select = [
"A","B","COM","C4","RET","SIM","ICN","Q","RSE",
"D","E","F","I","W","N","ERA","PL"
]
fixable = ["A","B","COM","C4","RET","SIM","ICN","Q","RSE","D","E","F","I","W","N","ERA","PL"]
ignore = [
"B905","E501","D203","D213","PLR2004","PLR0913","COM812",
"ERA001","A001","A002","D301"
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["E402","F401","F403","F811"]
"tests/*" = ["D103","D105","D107"]
[tool.ruff.lint.pep8-naming]
ignore-names = ["X*", "setUp"]
[tool.ruff.lint.isort]
lines-after-imports = 2
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.ruff.lint.pycodestyle]
max-doc-length = 88
# -----------------------------------------------------
# Pytest & Coverage
# -----------------------------------------------------
[tool.pytest.ini_options]
markers = ["integration_test: marks tests as integration tests"]
[tool.coverage.run]
source = ["src/aixpert"]
omit = ["tests/*", "*__init__.py"]