-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathpyproject.toml
More file actions
89 lines (80 loc) · 2.36 KB
/
Copy pathpyproject.toml
File metadata and controls
89 lines (80 loc) · 2.36 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
[project]
name = "mammothmoda"
version = "2.0.0"
requires-python = ">=3.11,<3.12"
dependencies = [
"accelerate==1.7.0",
"addict==2.4.0",
"diffusers==0.35.1",
"einops==0.8.1",
"torch==2.6.0",
"loguru==0.7.3",
"numpy==1.26.4",
"pillow==11.2.1",
"psutil==6.0.0",
"qwen-vl-utils==0.0.14",
"safetensors==0.5.3",
"tiktoken==0.11.0",
"torchdiffeq==0.2.5",
"torchvision==0.21.0",
"transformers==4.53.2",
"setuptools>=80.9.0",
"flash-attn==2.7.4.post1",
]
[[tool.uv.index]]
name = "pytorch-cu124"
url = "https://download.pytorch.org/whl/cu124"
explicit = true
[tool.uv.sources]
torch = { index = "pytorch-cu124" }
torchvision = { index = "pytorch-cu124" }
[tool.uv.extra-build-dependencies]
flash-attn = ["torch"]
[tool.pylint]
max-line-length = 120
generated-members = ["numpy.*", "torch.*"] # Avoid E1101 for obj like `torch.Tensor`
disable = ["all"]
enable = ["E"]
[tool.ruff]
line-length = 120
fix-only = true # disables reporting on leftover violation.
namespace-packages = ["tools"] # just for fun.😄
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"ANN001",
"ANN002",
"ANN003",
"ANN401", # allow Any as return type.
"D", # Documents related linting are ignored.
"COM812",
"ERA001",
"NPY002", # allow old random.
"N812", # allow capitalized abbr for import.
"PLR0913",
"PLW2901", # it is quite normal to overwrite the loop variable in loop.
"RET504", # allow unnecessary assignment for better readability.
"T201", # allow print for debug interface.
"TID252", # allow relative import.
"FA102", # we only run mammothmoda2 on python>=3.11
"S101", # allow assert
"S105", # allow possible hard code for token setting
"S106", # allow possible hard code for token setting
"S107", # allow possible hard code for token setting
"S311", # allow random package
]
fixable = [ # only fix:
"I", # import order
"RUF022", # __all__ order
"UP004", # inherit from object
"F401", # remove redundant import, could lost some reference sometimes.
]
[tool.ruff.lint.mccabe]
max-complexity = 20 # loose McCabe complexity limit from 10.
[tool.ruff.lint.pylint]
max-branches = 30 # loose branches complexity limit from 15.
max-statements = 100 # loose statements complexity limit from 50.
[tool.ruff.lint.isort]
known-third-party = [
"wandb"
]