File size: 2,169 Bytes
d909bd8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
[project]
name = "align"
version = "0.1.0"
description = "Consolidated post-training alignment stack (SFT / DPO / PPO / GRPO) for Mistral-7B-v0.3 on 4xA10G. Bare-metal: torch + triton + numpy + safetensors, nothing else."
requires-python = ">=3.12,<3.13"
dependencies = [
    # The ENTIRE runtime dependency surface. Enforced by tests/test_dependency_firewall.py,
    # which AST-scans every module under align/ and scripts/ and fails on any other
    # third-party import. See docs/DEPENDENCY_POLICY.md for what was removed and what
    # replaced it.
    "torch==2.11.0",
    "triton==3.6.0",
    "numpy>=1.26",
    "safetensors>=0.4",
]

[project.optional-dependencies]
dev = ["pytest>=8", "ruff==0.16.3"]
# ONE-TIME ingestion of parquet-only HF datasets (Big-Math, DeepMath). Never imported by
# the training half; only align/data/ingest_parquet.py may touch it, lazily, and the
# firewall test whitelists exactly that file.
ingest = ["pyarrow>=15"]
# Optional high-throughput rollout worker (rollout-layer sovereignty amendment, 2026-08-22).
# Lives in extras/vllm_rollout/, its own venv, talks to the trainer over the filesystem
# protocol in align/rollout/protocol.py. The core never imports it.
vllm = ["vllm"]

[build-system]
requires = ["setuptools>=68"]
build-backend = "setuptools.build_meta"

[tool.setuptools.packages.find]
include = ["align*"]

[tool.setuptools.package-data]
"align.model" = ["artifacts/*.json"]
"align.tokenizer" = ["artifacts/*.json"]
"align" = ["py.typed"]

[[tool.uv.index]]
name = "pytorch-cu128"
url = "https://download.pytorch.org/whl/cu128"
explicit = true

[tool.uv.sources]
torch = [{ index = "pytorch-cu128" }]

[tool.pytest.ini_options]
testpaths = ["tests"]
markers = [
    "gpu: needs a real GPU and the real 7B checkpoint",
    "slow: long-running; excluded from the quick loop",
    "oracle: needs the legacy nano-mistral-o1 venv (transformers/math_verify) as a parity ORACLE; never a runtime dep",
]

[tool.ruff]
line-length = 100
target-version = "py312"
[tool.ruff.lint]
select = ["E", "F", "I", "W", "UP", "B"]
ignore = ["E501", "E402", "E731", "E741", "F401", "F821", "F841", "B007", "B017", "B023", "B904", "B905"]