-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathpyproject.toml
More file actions
155 lines (130 loc) · 3.44 KB
/
pyproject.toml
File metadata and controls
155 lines (130 loc) · 3.44 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
[project]
name = "modalities"
version = "0.5.0"
requires-python = ">=3.10,<3.14"
description = "Modalities, a PyTorch-native framework for distributed and reproducible foundation model training."
readme = "README.md"
dependencies = [
"numpy",
"ninja",
"packaging",
"tqdm",
"pyyaml",
"transformers>=4.57.4,<5.0.0",
"datasets",
"protobuf",
"SentencePiece",
"rich",
"omegaconf",
"pydantic",
"click",
"click_pathlib",
"jq",
"class_resolver",
"matplotlib",
"wandb",
"einops>=0.7.0",
"debugpy", # For VSCode debugging support
]
[project.urls]
Homepage = "https://github.com/Modalities/modalities"
Issues = "https://github.com/Modalities/modalities/issues"
[project.scripts]
modalities = "modalities.__main__:main"
[build-system]
requires = ["setuptools >= 61.0.0"]
build-backend = "setuptools.build_meta"
[project.optional-dependencies]
linting = ["pre-commit"]
tests = ["pytest", "pytest-cov", "debugpy"]
cpu = ["torch>=2.10,<2.11.0", "torchvision"]
cu126 = [
"torch>=2.10,<2.11.0",
"torchvision",
"flash-attn==2.8.3; platform_system != 'Darwin' and platform_machine != 'aarch64'"
]
cu128 = [
"torch>=2.10,<2.11.0",
"torchvision",
"flash-attn==2.8.3; platform_system != 'Darwin' and platform_machine != 'aarch64'"
]
cu130 = [
"torch>=2.10,<2.11.0",
"torchvision",
"flash-attn==2.8.3; platform_system != 'Darwin' and platform_machine != 'aarch64'"
]
[tool.uv]
conflicts = [
[
{ extra = "cpu" },
{ extra = "cu126" },
{ extra = "cu128" },
{ extra = "cu130" },
],
]
[tool.uv.sources]
torch = [
{ index = "pytorch-cpu", extra = "cpu" },
{ index = "pytorch-cu126", extra = "cu126" },
{ index = "pytorch-cu128", extra = "cu128" },
{ index = "pytorch-cu130", extra = "cu130" },
]
torchvision = [
{ index = "pytorch-cpu", extra = "cpu" },
{ index = "pytorch-cu126", extra = "cu126" },
{ index = "pytorch-cu128", extra = "cu128" },
{ index = "pytorch-cu130", extra = "cu130" },
]
[[tool.uv.index]]
name = "pytorch-cpu"
url = "https://download.pytorch.org/whl/cpu"
explicit = true
[[tool.uv.index]]
name = "pytorch-cu126"
url = "https://download.pytorch.org/whl/cu126"
explicit = true
[[tool.uv.index]]
name = "pytorch-cu128"
url = "https://download.pytorch.org/whl/cu128"
explicit = true
[[tool.uv.index]]
name = "pytorch-cu130"
url = "https://download.pytorch.org/whl/cu130"
explicit = true
[tool.uv.extra-build-dependencies]
flash-attn = [
{ requirement = "torch", match-runtime = true },
{ requirement = "ninja", match-runtime = true },
]
[tool.black]
target-version = ["py310"]
line-length = 120
[tool.isort]
profile = "black"
line_length = 120
src_paths = ["src", "tests"]
[tool.ruff]
line-length = 120
[tool.pytest.ini_options]
addopts = "--cov=src --cov-report term --cov-report html"
[tool.coverage.run]
branch = true
omit = ["*/src/modalities/dataloader/open_gptx_dataset/*"]
[tool.coverage.report]
# Regexes for lines to exclude from consideration
exclude_also = [
# Don't complain about missing debug-only code:
"def __repr__",
"if self\\.debug",
# Don't complain if tests don't hit defensive assertion code:
"raise AssertionError",
"raise NotImplementedError",
# Don't complain if non-runnable code isn't run:
"if 0:",
"if __name__ == .__main__.:",
# Don't complain about abstract methods, they aren't run:
"@(abc\\.)?abstractmethod",
]
ignore_errors = true
[tool.coverage.html]
directory = "coverage_html_report"