-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathpyproject.toml
More file actions
172 lines (156 loc) · 6.12 KB
/
pyproject.toml
File metadata and controls
172 lines (156 loc) · 6.12 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
[project]
name = "pytorch_optimizer"
version = "3.10.0"
description = "optimizer & lr scheduler & objective function collections in PyTorch"
license = { text = "Apache-2.0" }
readme = "README.md"
authors = [{ name = "kozistr", email = "kozistr@gmail.com" }]
maintainers = [{ name = "kozistr", email = "kozistr@gmail.com" }]
homepage = "https://github.com/kozistr/pytorch_optimizer"
repository = "https://github.com/kozistr/pytorch_optimizer"
documentation = "https://pytorch-optimizers.readthedocs.io/en/latest"
keywords = [
"pytorch", "deep-learning", "optimizer", "lr scheduler", "A2Grad", "Alice", "ASGD", "AccSGD", "AdaBelief",
"AdaBound", "AdaDelta", "AdaFactor", "AdaGC", "AdaMax", "AdaMuon", "AdamG", "AdaMod", "AdaNorm", "AdaPNM",
"AdaSmooth", "AdEMAMix", "Simplified-AdEMAMix", "ADOPT", "AdaHessian", "Adai", "Adalite", "AdaLomo", "AdamMini",
"AdamP", "AdamS", "Adan", "AggMo", "Aida", "AliG", "Amos", "Apollo", "APOLLO", "AvaGrad", "bSAM", "BCOS", "CAME",
"Conda", "DAdaptAdaGrad", "DAdaptAdam", "DAdaptAdan", "DAdaptSGD", "DAdaptLion", "DeMo", "DiffGrad", "EmoFact",
"EmoLynx", "EmoNavi", "EmoNeco", "EmoZeal", "EXAdam", "FAdam", "Fira", "FOCUS", "FriendlySAM", "Fromage", "FTRL",
"GaLore", "Grams", "Gravity", "GrokFast", "GSAM", "Kate", "Lamb", "LaProp", "LARS", "Lion", "LOMO", "Lookahead",
"MADGRAD", "MARS", "MSVAG", "Muno", "Nero", "NovoGrad", "OrthoGrad", "PAdam", "PCGrad", "PID", "PNM", "Prodigy",
"PSGD", "QHAdam", "QHM", "RACS", "RAdam", "Ranger", "Ranger21", "RotoGrad", "SAM", "GCSAM", "LookSAM",
"ScheduleFreeSGD", "ScheduleFreeAdamW", "ScheduleFreeRAdam", "SCION", "SGDP", "Shampoo", "ScalableShampoo", "SGDW",
"SignSGD", "SM3", "SOAP", "SopihaH", "SPAM", "StableSPAM", "SPlus", "SRMM", "StableAdamW", "SWATS", "TAM", "Tiger",
"TRAC", "VSGD", "WSAM", "Yogi", "BCE", "BCEFocal", "Focal", "FocalCosine", "SoftF1", "Dice", "LDAM", "Jaccard",
"Bi-Tempered", "Tversky", "FocalTversky", "LovaszHinge", "bitsandbytes", "WSD", "QGaLore",
]
classifiers = [
"License :: OSI Approved :: Apache Software License",
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Education",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"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",
"Operating System :: OS Independent",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Software Development",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
]
requires-python = ">=3.8"
dependencies = [
'numpy>1.24.4; python_version >= "3.9"',
'numpy<=1.24.4; python_version < "3.9"',
'torch>=1.10,<2.5; python_version < "3.9"',
'torch>=1.10,<2.9; python_version >= "3.9" and python_version < "3.10"',
'torch>=1.10; python_version >= "3.10"',
]
[dependency-groups]
dev = [
'black<25; python_version < "3.9"',
'black<26; python_version >= "3.9"',
'ruff>=0.15,<0.16',
'pyright==1.1.408',
'pytest<9; python_version < "3.10"',
'pytest>=9,<10; python_version >= "3.10"',
'pytest-cov<6; python_version < "3.9"',
'pytest-cov>=6,<7; python_version >= "3.9"',
]
[tool.uv.sources]
torch = [
{ index = "pytorch-cpu" },
]
[[tool.uv.index]]
name = "pytorch-cpu"
url = "https://download.pytorch.org/whl/cpu"
explicit = true
[tool.ruff]
src = ["pytorch_optimizer", "tests", "examples"]
target-version = "py312"
line-length = 119
exclude = [
".git",
".github",
".idea",
".ipynb_checkpoints",
".pytest_cache",
".ruff_cache",
"assets",
"dist",
"docs",
".venv",
"__pypackages__",
]
[tool.ruff.lint]
select = [
"A", "B", "C4", "D", "E", "F", "G", "I", "N", "S", "T", "ISC", "ICN", "W", "INP", "PIE", "T20", "RET", "SIM",
"TID", "ARG", "ERA", "RUF", "YTT", "PL", "Q", "TD", "TC", "SLOT", "RSE", "PT",
]
ignore = [
"B905",
"D100", "D102", "D104", "D105", "D107", "D203", "D213",
"PLR0913", "PLR2004", "PLW2901",
"Q003", "ARG002",
"TD003", "TC002", "TC006", "PT011",
]
fixable = ["ALL"]
unfixable = ["F401"]
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
flake8-quotes.docstring-quotes = "double"
flake8-quotes.inline-quotes = "single"
[tool.ruff.lint.extend-per-file-ignores]
"examples/visualize_optimizers.py" = ["D103", "D400", "D415"]
"{tests,examples,scripts}/*.py" = ["D", "S101", "T201"]
"{examples,scripts}/*.py" = ["INP001"]
"**/__init__.py" = ["F401"]
"hubconf.py" = ["D", "INP001"]
[tool.ruff.lint.isort]
combine-as-imports = false
detect-same-package = true
force-sort-within-sections = false
known-first-party = ["pytorch_optimizer"]
[tool.ruff.lint.pylint]
max-statements = 60
max-branches = 17
[tool.ruff.format]
quote-style = "single"
[tool.pyright]
include = ["pytorch_optimizer", "examples"]
exclude = [
"./pytorch_optimizer/optimizer/adam_mini.py",
"./pytorch_optimizer/optimizer/demo.py",
"./pytorch_optimizer/optimizer/rotograd.py",
]
reportArgumentType = false
reportAttributeAccessIssue = false
reportCallIssue = false
reportIncompatibleMethodOverride = false
reportIncompatibleVariableOverride = false
reportMissingImports = false
reportOptionalMemberAccess = false
pythonVersion = "3.12"
pythonPlatform = "Linux"
[tool.pytest.ini_options]
testpaths = "tests"
addopts = "-p no:pastebin -p no:nose -p no:doctest --disable-warnings --cov=pytorch_optimizer --cov-report=xml"
[tool.coverage.run]
omit = [
"./pytorch_optimizer/optimizer/adam_mini.py",
"./pytorch_optimizer/optimizer/demo.py",
"./pytorch_optimizer/optimizer/rotograd.py",
]
[tool.hatch.build.targets.wheel.force-include]
"pytorch_optimizer/py.typed" = "pytorch_optimizer/py.typed"
[tool.hatch.build.targets.sdist.force-include]
"pytorch_optimizer/py.typed" = "pytorch_optimizer/py.typed"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"