-
Notifications
You must be signed in to change notification settings - Fork 503
Expand file tree
/
Copy pathpyproject.toml
More file actions
138 lines (120 loc) · 3.52 KB
/
pyproject.toml
File metadata and controls
138 lines (120 loc) · 3.52 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
[project]
name = "open-instruct"
version = "0.1.0"
description = "Train open, instruction-following language models"
readme = "README.md"
requires-python = ">=3.10,<3.13"
dependencies = [
"accelerate>=1.1.1",
"antlr4-python3-runtime==4.11",
"bitsandbytes>=0.44.1; platform_system != 'Darwin'",
"datasets>=4.0.0",
"debugpy>=1.8.13",
"deepspeed==0.15.4", # 0.16.0 bugs out https://github.com/microsoft/DeepSpeed/issues/6793
"hf-transfer>=0.1.8",
"litellm>=1.72.0",
"matplotlib>=3.9.3",
"nltk>=3.9.1",
"numpy<2",
"nvitop>=1.4.2",
"packaging>=24.2",
"peft>=0.13.2",
"ray[default]>=2.44.1",
"setuptools>=75.6.0,<80.0.0",
"tensorboard>=2.18.0",
"torch>=2.7.0,<2.8",
"transformers>=4.52.4,<4.54.0", # see https://github.com/vllm-project/vllm-ascend/issues/2046
"vllm==0.9.1",
"wandb==0.18.1",
"langdetect==1.0.9",
"immutabledict==1.2.0",
"pytest-xdist==3.8.0",
"flash-attn>=2.8.0.post2; platform_system != 'Darwin'",
"liger-kernel>=0.5.4; platform_system != 'Darwin'",
"flashinfer-python==0.2.8; platform_system == 'Linux' and platform_machine == 'x86_64'",
]
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[tool.setuptools]
py-modules = ["open_instruct"]
[tool.uv.extra-build-dependencies]
flash-attn = [{ requirement = "torch", match-runtime = true }]
[tool.uv.extra-build-variables]
flash-attn = { FLASH_ATTENTION_SKIP_CUDA_BUILD = "TRUE" }
# pytorch related setups
[tool.uv.sources]
torch = [
{ index = "pytorch-cu128", marker = "platform_system != 'Darwin'"},
]
[[tool.uv.index]]
name = "pytorch-cu128"
url = "https://download.pytorch.org/whl/cu128"
explicit = true
[[tool.uv.index]]
name = "pytorch-cpu"
url = "https://download.pytorch.org/whl/cpu"
explicit = true
[project.optional-dependencies]
code = [
"fastapi>=0.100.0",
"uvicorn>=0.20.0",
"pydantic>=2.0.0",
"requests>=2.28.0",
]
[tool.uv]
preview = true
python-preference = "only-managed"
link-mode = "hardlink"
[dependency-groups]
dev = [
"beaker-py>=1.32.2,<2.0",
"mkdocs-material>=9.6.8",
"markdown-include>=0.8.1",
"pytest>=8.3.4",
"ruff>=0.11.13",
"parameterized>=0.9.0",
"rich>=13.7.0",
]
[tool.pytest.ini_options]
addopts = "--ignore=oe-eval-internal/ --ignore-glob='**/*_gpu.py'"
[tool.black]
line-length = 119
target-version = ['py310']
[tool.isort]
known_first_party = ["open_instruct"]
profile = "black"
src_paths = ["open_instruct"]
[tool.ruff]
target-version = "py310"
line-length = 119
# do both . and open_instruct to make sure known-first-party below works
src = [".", "open_instruct"]
exclude = ["wandb"]
[tool.ruff.format]
# Use black-compatible formatting
quote-style = "double"
indent-style = "space"
line-ending = "auto"
# Preserve original parentheses style to minimize changes
skip-magic-trailing-comma = true
# Enable black-compatible string normalization
docstring-code-format = false
[tool.ruff.lint]
# Enable rules equivalent to previous autoflake and flake8 configs:
# F = Pyflakes (covers autoflake functionality)
# E = pycodestyle errors (flake8)
# W = pycodestyle warnings (flake8)
# I = isort
select = ["F", "E", "W", "I"]
ignore = [
"C408", # dict() calls (stylistic)
"C901", # function complexity
"E501", # Line too long (handled by line-length setting)
]
[tool.ruff.lint.isort]
known-first-party = ["open-instruct"]
# case insensitive to match isort --profile black
case-sensitive = false
# Disable split-on-trailing-comma to work with skip-magic-trailing-comma
split-on-trailing-comma = false