Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
85 lines (74 loc) · 2.32 KB
/
Copy pathpyproject.toml
File metadata and controls
85 lines (74 loc) · 2.32 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
[project]
name = "post-training-cookbook"
version = "0.1.0"
description = "Post-training recipes (GRPO, SFT, DPO) for Together Post Training"
requires-python = ">=3.11"
dependencies = [
"math-verify[antlr4_13_2]~=0.9",
"numpy~=2.4",
"python-dotenv~=1.2",
"wandb~=0.25",
"datasets>=5.0.1,<6",
"transformers>=5.10.0,<6",
"jinja2~=3.1",
"pyyaml~=6.0",
"matplotlib~=3.10",
"torch~=2.13",
"tiktoken~=0.14", # Kimi-K3 checkpoint tokenizer (trust_remote_code)
"together",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[dependency-groups]
dev = ["pytest", "pytest-asyncio", "ruff==0.14.9", "pre-commit"]
notebooks = ["ipykernel~=6.30"]
tinker = ["tinker-cookbook[math-rl]", "together[tinker]"]
[tool.uv]
# tinker-cookbook caps transformers<=5.5.4; override to pick up security fixes (GHSA-xrqw-3rrv-vx5w).
override-dependencies = ["transformers>=5.10.0,<6"]
[tool.uv.sources]
# Pinned SDK revision providing `together.post_training`.
together = { git = "https://github.com/togethercomputer/together-py.git", rev = "v2.41.0" }
[tool.ruff]
line-length = 119
target-version = "py311"
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
docstring-code-format = true
docstring-code-line-length = "dynamic"
[tool.ruff.lint]
select = ["C", "D", "E", "F", "I", "UP", "W"]
ignore = [
"C901", # Function too complex
"D100", # Missing docstring in public module
"D101", # Missing docstring in public class
"D102", # Missing docstring in public method
"D103", # Missing docstring in public function
"D104", # Missing docstring in public package
"D107", # Missing docstring in `__init__`
]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.isort]
known-first-party = ["post_training_cookbook"]
known-third-party = ["wandb"]
[tool.ruff.lint.per-file-ignores]
"tests/*" = [
"D", # Missing docstring
"S101", # Use of assert
"SLF001", # Private member accessed
"PLR2004", # Magic value used in comparison
]
"recipes/*" = [
"D", # Missing docstring (scripts)
]
"notebooks/*" = [
"D", # Missing docstring
"E402", # Module-level import not at top of file
]
[tool.hatch.build.targets.wheel]
packages = ["post_training_cookbook"]