Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
139 lines (125 loc) · 3.38 KB
/
Copy pathpyproject.toml
File metadata and controls
139 lines (125 loc) · 3.38 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
[build-system]
requires = ["hatchling>=1.24"]
build-backend = "hatchling.build"
[project]
name = "canifinetune"
dynamic = ["version"]
description = "Estimate, benchmark, and generate fine-tuning recipes for LLMs on consumer GPUs."
readme = "README.md"
requires-python = ">=3.10"
license = { text = "MIT" }
authors = [
{ name = "Daoyuan Li", email = "lidaoyuan2816@gmail.com" },
]
keywords = [
"llm",
"fine-tuning",
"lora",
"qlora",
"gpu",
"memory",
"huggingface",
"transformers",
"peft",
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
]
dependencies = [
"typer>=0.12",
"rich>=13.7",
"pydantic>=2.6",
"pyyaml>=6.0",
"huggingface-hub>=0.25",
"jinja2>=3.1",
"platformdirs>=4.2",
]
[project.optional-dependencies]
train = [
"torch>=2.6,<2.7",
"transformers>=4.57.6,<5.9",
"accelerate>=1.12,<1.14",
"peft>=0.18.1,<0.20",
"bitsandbytes>=0.49.2,<0.50;platform_system!='Darwin'",
"sentencepiece>=0.2",
"protobuf>=4.25",
]
report = [
"pandas>=2.2",
"tabulate>=0.9",
]
dev = [
"pytest>=8.0",
"pytest-cov>=5.0",
"ruff>=0.5",
"mypy>=1.10",
"types-PyYAML>=6.0",
]
[project.scripts]
canifinetune = "canifinetune.cli:app"
[project.urls]
Homepage = "https://github.com/DaoyuanLi2816/can-i-finetune-this"
Documentation = "https://daoyuanli2816.github.io/can-i-finetune-this/"
Issues = "https://github.com/DaoyuanLi2816/can-i-finetune-this/issues"
Repository = "https://github.com/DaoyuanLi2816/can-i-finetune-this"
[tool.hatch.build.targets.wheel]
packages = ["src/canifinetune"]
[tool.hatch.version]
path = "src/canifinetune/__init__.py"
[tool.hatch.build.targets.sdist]
include = [
"src/canifinetune",
"README.md",
"CHANGELOG.md",
"LICENSE",
"pyproject.toml",
]
[tool.ruff]
line-length = 100
target-version = "py310"
extend-exclude = [
"src/canifinetune/recipes/templates",
"examples",
]
[tool.ruff.lint]
select = ["E", "F", "I", "W", "B", "UP", "C4", "SIM"]
ignore = [
"E501", # line length handled by formatter where reasonable
"B008", # typer/Argument(...) defaults are intentional
"B904", # raise from in CLI is noisy
]
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["B018"]
[tool.pytest.ini_options]
addopts = "-ra --strict-markers --strict-config"
testpaths = ["tests"]
markers = [
"training: actual torch/Transformers training integration (select separately from core)",
"gpu: tests that require a CUDA GPU (skipped in CI)",
"slow: tests that take more than a few seconds",
"network: tests that require network access",
]
[tool.mypy]
plugins = ["pydantic.mypy"]
python_version = "3.10"
strict = false
ignore_missing_imports = true
warn_unused_ignores = true
warn_redundant_casts = true
warn_unused_configs = true
no_implicit_optional = true
# Fast core coverage excludes optional torch execution; CPU integration runs
# behavior checks in a separate job with the actual training dependencies.
[tool.coverage.run]
omit = ["*/training/runtime.py", "*/training/smoke.py"]