Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
94 lines (86 loc) · 2.37 KB
/
Copy pathpyproject.toml
File metadata and controls
94 lines (86 loc) · 2.37 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
[project]
name = "math2code"
version = "0.3.0"
description = "Translating LaTeX expressions into executable SymPy code with LLMs (TIR + RLVR)"
readme = "README.md"
requires-python = ">=3.10"
dependencies = [
"sympy>=1.12",
"pydantic>=2.7",
"tenacity>=8.3",
"instructor>=1.2",
"tqdm>=4.66",
"openai>=1.14",
"fastapi>=0.111",
"uvicorn>=0.30",
"gradio>=4.31",
"requests>=2.31",
"pandas>=2.0",
"numpy>=1.24",
"pyyaml>=6.0",
]
[project.optional-dependencies]
# GPU training stack (SFT + GRPO). Install with: uv pip install -e ".[train]"
train = [
"torch>=2.1",
"transformers>=4.44",
"peft>=0.12",
"trl>=0.14",
"datasets>=2.20",
"accelerate>=0.34",
"hydra-core>=1.3",
"wandb>=0.17",
"vllm>=0.8",
"huggingface-hub>=0.24",
]
# Development / CI tooling. Install with: uv pip install -e ".[dev]"
dev = [
"pytest>=8.0",
"ruff>=0.4",
"mypy>=1.9",
"pre-commit>=3.7",
"httpx>=0.27",
"matplotlib>=3.8", # scripts/plot_results.py figures
# E2B sandboxed final eval (e2e_eval.py, lazy import; needs E2B_API_KEY)
"e2b-code-interpreter>=1.0.0",
]
# Optional: SymPy parse_latex zero-cost baseline. NOT in [dev]: sympy's latex
# parser hard-requires antlr4 4.11.x while omegaconf/hydra (needed for the
# training entrypoints) hard-pins antlr4 4.9.x — the two cannot coexist in one
# env. Install into a dedicated venv when you want `make baselines`:
# uv pip install -e ".[baseline]"
baseline = [
"antlr4-python3-runtime==4.11.1",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/math2code"]
[tool.ruff]
line-length = 88
target-version = "py310"
[tool.ruff.lint]
select = ["E", "F", "I", "UP", "N"]
ignore = ["E501"]
[tool.mypy]
python_version = "3.12"
mypy_path = "src"
explicit_package_bases = true
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
ignore_missing_imports = true
exclude = [
# thin Gradio UI script; gradio's typing is noise and it drags in huge stubs
"src/math2code/serve/app.py",
]
[[tool.mypy.overrides]]
# openai's _extras import numpy; keep our thin client usage as Any
module = ["openai.*", "openai"]
follow_imports = "skip"
[tool.pytest.ini_options]
testpaths = ["tests"]
markers = [
"slow: heavy real-data / GPU-adjacent tests (skip with `make test-quick`)",
]