-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
196 lines (175 loc) · 4 KB
/
pyproject.toml
File metadata and controls
196 lines (175 loc) · 4 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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
[project]
dependencies = [
"colorlog>=6.8.2",
"datasets>=3.0.0",
"datatrove>=0.4.0",
"duckdb>=1.2.1",
"hf-transfer>=0.1.8",
"huggingface-hub>=0.29.0",
"hydra-colorlog>=1.2.0",
"hydra-core>=1.3.2",
"hydra-joblib-launcher>=1.2.0",
"hydra-submitit-launcher>=1.2.0",
"ipykernel>=6.29.5",
"ipywidgets>=8.1.5",
"lightning>=2.4.0",
"lm_eval>=0.4.8",
"nltk>=3.9.1",
"nvitop>=1.3.2",
"omegaconf>=2.3.0",
"plotnine>=0.13.6",
"polars-u64-idx>=1.25.0",
"polars>=1.25.0",
"ruff>=0.6.2",
"scikit-misc>=0.5.1",
"sentence-transformers>=3.4.1",
"srsly>=2.4.8",
"tbparse>=0.0.9",
"tensorboard>=2.17.1",
"tokenization-scorer>=1.1.8",
"torch>=2.6.0",
"torchdata>=0.11.0",
"transformers>=4.48.0",
"typer>=0.15.2",
]
description = "Add your description here"
name = "infotokenization"
readme = "README.md"
requires-python = ">=3.11,<3.12"
version = "0.1.0"
[build-system]
build-backend = "hatchling.build"
requires = [ "hatchling" ]
[tool.hatch.build.targets.wheel]
packages = [ "src" ]
[project.optional-dependencies]
flash = [ "flash-attn>=2.7.4" ]
[tool.uv]
cache-dir = "./.uv_cache"
no-build-isolation-package = [ "flash-attn" ]
[[tool.uv.dependency-metadata]]
name = "flash-attn"
requires-dist = [ "einops", "torch" ]
# ===================
# Ruff Configurations
# ===================
[tool.ruff]
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
]
extend-include = [ "*.ipynb" ]
# Same as Black.
line-length = 120
# Assume Python 3.10
target-version = "py310"
[tool.ruff.format]
indent-style = "space"
quote-style = "double"
skip-magic-trailing-comma = true
[tool.ruff.lint]
select = [
# pycodestyle
"E",
# Pyflakes
"F",
# pyupgrade
"UP",
# flake8-bugbear
"B",
# flake8-simplify
"SIM",
# isort
"I",
]
ignore = [
# # Use `X | Y` for type annotations
# "UP007",
# # Logging statement uses f-string
# "G004",
# # Function definitions that include too many arguments (>5)
# "PLR0913",
# # Comparison to `True` should be `cond is True` or `if cond:`
# "E712",
# # blanket-type-ignore
# "PGH003",
# flake8 Indentation contains tabs (W191)
"W191",
]
# # Enable pycodestyle (`E`) and Pyflakes (`F`) codes by default.
# # select = ["E", "F"]
# select = [
# # pyflakes
# "F",
# # pycodestyle
# "E",
# "W",
# # flake8-2020
# "YTT",
# # flake8-bugbear
# "B",
# # flake8-quotes
# "Q",
# # flake8-debugger
# "T10",
# # flake8-gettext
# "INT",
# # pylint
# "PL",
# # misc lints
# "PIE",
# # flake8-pyi
# "PYI",
# # tidy imports
# "TID",
# # implicit string concatenation
# "ISC",
# # type-checking imports
# "TCH",
# # comprehensions
# "C4",
# # pygrep-hooks
# "PGH",
# # Ruff-specific rules
# "RUF",
# # flake8-bandit: exec-builtin
# "S102",
# # numpy-legacy-random
# "NPY002",
# # Perflint
# "PERF",
# # flynt
# "FLY",
# # flake8-logging-format
# "G",
# ]
# Allow autofix for all enabled rules (when `--fix`) is provided.
# fix = true
# fixable = ["A", "B", "C", "D", "E", "F", "G", "I", "N", "Q", "S", "T", "W", "ANN", "ARG", "BLE", "COM", "DJ", "DTZ", "EM", "ERA", "EXE", "FBT", "ICN", "INP", "ISC", "NPY", "PD", "PGH", "PIE", "PL", "PT", "PTH", "PYI", "RET", "RSE", "RUF", "SIM", "SLF", "TCH", "TID", "TRY", "UP", "YTT"]
# unfixable = [ ]
[tool.ruff.lint.isort]
combine-as-imports = true
split-on-trailing-comma = false
[tool.ruff.lint.mccabe]
# Unlike Flake8, default to a complexity level of 10.
max-complexity = 10