-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathpyproject.toml
More file actions
138 lines (124 loc) · 3.32 KB
/
pyproject.toml
File metadata and controls
138 lines (124 loc) · 3.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
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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["utils_fsdp", "utils_fm", "models", "configs", "data"]
[project]
name = "minFM"
version = "0.1.0"
description = "minFM: Minimal Flow Matching Training Framework"
authors = [{name = "Kai Zhang", email = "kz298@cornell.edu"}]
readme = "README.md"
requires-python = "==3.10"
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dependencies = [
"torch==2.7.1",
"torchvision==0.22.1",
"safetensors>=0.5.3",
"PyYAML>=6.0",
"wandb>=0.18.0",
"transformers>=4.53.3",
"sentencepiece>=0.2.0",
"pre-commit>=4.2.0",
"pillow>=11.3.0",
"diffusers>=0.34.0",
"flash-attn==2.8.2",
"knapformer==0.1.1",
"torch_fidelity==0.4.0-beta",
"scipy==1.15.3",
]
[project.optional-dependencies]
dev = [
"ruff>=0.12.4",
"pytest>=8.4.1",
"pytest-cov>=6.2.1",
"pre-commit>=4.2.0",
]
# UV Configuration
[tool.uv]
dev-dependencies = [
"ruff>=0.12.4",
"pytest>=8.4.1",
"pytest-cov>=6.2.1",
"pre-commit>=4.2.0",
"types-pyyaml>=6.0.12.20250516",
"plotly>=6.2.0",
"numpy>=2.2.6",
"einops>=0.8.0",
"types-requests>=2.32.3",
"pip>=25.0.0",
]
[tool.uv.sources]
flash-attn = { url = "https://github.com/Dao-AILab/flash-attention/releases/download/v2.8.2/flash_attn-2.8.2+cu12torch2.7cxx11abiTRUE-cp310-cp310-linux_x86_64.whl" }
knapformer = { git = "https://github.com/Kai-46/KnapFormer.git" }
torch_fidelity = { git = "https://github.com/toshas/torch-fidelity.git" }
# Ruff Configuration
[tool.ruff]
line-length = 120
target-version = "py310"
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
]
ignore = [
"E501", # line too long, handled by black
"B008", # do not perform function calls in argument defaults
"C901", # too complex
"UP038", # use X | Y in isinstance instead of (X, Y) - conflicts with mypy
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]
[tool.ruff.lint.isort]
known-first-party = ["minFM", "utils_fsdp", "utils_fm"]
combine-as-imports = true
force-sort-within-sections = true
order-by-type = true
section-order = ["future", "standard-library", "third-party", "first-party", "local-folder"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
# Pytest Configuration
[tool.pytest.ini_options]
minversion = "7.0"
addopts = "-ra -q --strict-markers --strict-config"
testpaths = ["tests"]
filterwarnings = [
"error",
"ignore::UserWarning",
"ignore::DeprecationWarning",
]
# Coverage Configuration
[tool.coverage.run]
source = ["minFM"]
omit = [
"*/tests/*",
"*/test_*",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"if self.debug:",
"if settings.DEBUG",
"raise AssertionError",
"raise NotImplementedError",
"if 0:",
"if __name__ == .__main__.:",
"class .*\\bProtocol\\):",
"@(abc\\.)?abstractmethod",
]