Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
216 lines (195 loc) · 5.63 KB
/
Copy pathpyproject.toml
File metadata and controls
216 lines (195 loc) · 5.63 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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
[project]
name = "TinyExp"
version = "0.1.4"
description = "A minimalist Python project for deep learning experiment management. It uses Ray for core distributed environment and backend setup, and provides basic, no-frills tracking for models, optimizers, and LR schedulers."
authors = [{ name = "Zeming LI", email = "[email protected]" }]
readme = "README.md"
license = { file = "LICENSE" }
keywords = ['python']
requires-python = ">=3.9,<4.0"
classifiers = [
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"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",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = [
"loguru>=0.7.3",
# NumPy releases before 2.3.2 do not publish CPython 3.14 wheels.
"numpy; python_version < '3.14'",
"numpy>=2.3.2; python_version >= '3.14'",
"psutil",
"tabulate",
"hydra-core",
"omegaconf",
# Ray 2.53+ does not publish a CPython 3.9 wheel. Keep the older
# interpreter resolution installable while using the current line for
# Python versions that have compatible wheels, including 3.14.
"ray<2.52; python_version < '3.10'",
"ray; python_version >= '3.10'",
# Ray pulls rpds-py through jsonschema; use a release with CPython 3.14 wheels.
"rpds-py>=0.26; python_version >= '3.14'",
"tqdm",
"redis",
"wandb",
"loguru",
]
[project.optional-dependencies]
pytorch = [
"accelerate",
# Python 3.14 requires releases that publish cp314 wheels. The CPU/CUDA/
# ROCm/vendor runtime is selected separately for each target machine.
"torch; python_version < '3.14'",
"torch>=2.13; python_version >= '3.14'",
"torchvision; python_version < '3.14'",
"torchvision>=0.28; python_version >= '3.14'",
# TorchVision pulls Pillow; use a release with CPython 3.14 wheels.
"pillow>=11.3; python_version >= '3.14'",
]
vit = [
# vit_tp_exp example: data pipeline (Mixup/RandAugment), losses, scheduler, and
# DropPath/trunc_normal_ used by the ported DeiT model. The model itself is
# ported verbatim from timm 0.3.2 into tinyexp/examples/vit_tp_exp.py.
# timm does not pull torch, and the example imports torch/torchvision directly,
# so pull the pytorch extra via a self-referential extra instead of duplicating
# its per-interpreter version pins.
"TinyExp[pytorch]",
"timm>=1.0",
]
[project.urls]
Homepage = "https://zengarden.github.io/TinyExp/"
Repository = "https://github.com/zengarden/TinyExp"
Documentation = "https://zengarden.github.io/TinyExp/"
[project.scripts]
tinyexp-run-with-redis = "tinyexp.cli.run_with_redis:cli"
tinyexp-run-with-ray-cluster = "tinyexp.cli.run_with_ray_cluster:cli"
[dependency-groups]
dev = [
"pytest>=7.2.0",
"pre-commit>=2.20.0",
"tox-uv>=1.11.3",
"mypy>=0.991",
"pytest-cov>=4.0.0",
"ruff>=0.11.5",
"mkdocs>=1.4.2",
"mkdocs-material>=8.5.10",
"mkdocstrings[python]>=0.26.1",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["tinyexp"]
[tool.hatch.build.targets.sdist]
include = [
"/tinyexp",
"/tests",
"/CHANGELOG.md",
"/CONTRIBUTING.md",
"/LICENSE",
"/Makefile",
"/pyproject.toml",
"/README.md",
]
# [tool.mypy]
# Temporarily disabled. Uncomment this section when mypy is enabled again.
# files = ["tinyexp"]
# disallow_untyped_defs = true
# disallow_any_unimported = true
# no_implicit_optional = true
# check_untyped_defs = true
# warn_return_any = true
# warn_unused_ignores = true
# show_error_codes = true
[tool.pytest.ini_options]
testpaths = ["tests"]
[tool.ruff]
target-version = "py39"
line-length = 120
fix = true
[tool.ruff.lint]
select = [
# flake8-2020
"YTT",
# flake8-bandit
"S",
# flake8-bugbear
"B",
# flake8-builtins
"A",
# flake8-comprehensions
"C4",
# flake8-debugger
"T10",
# flake8-simplify
"SIM",
# isort
"I",
# mccabe
"C90",
# pycodestyle
"E", "W",
# pyflakes
"F",
# pygrep-hooks
"PGH",
# pyupgrade
"UP",
# ruff
"RUF",
# tryceratops
"TRY",
]
ignore = [
# LineTooLong
"E501",
# DoNotAssignLambda
"E731",
]
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["S101"]
"tinyexp/utils/redis_utils.py" = ["S603"]
"tinyexp/examples/vit_tp_exp.py" = ["S101", "TRY003"]
[tool.ruff.format]
preview = true
[tool.pylint.main]
max-line-length = 120
disable = "C0114, C0115, C0116"
[tool.coverage.report]
skip_empty = true
[tool.coverage.run]
branch = true
source = ["tinyexp"]
omit = [
# Example scripts and launch helpers are exercised via focused subprocess/unit tests.
"tinyexp/examples/*",
"tinyexp/cli/*",
"*/tinyexp/examples/*",
"*/tinyexp/cli/*",
"*/working_dir_files/_ray_pkg_*/tinyexp/examples/*",
"*/runtime_resources/working_dir_files/_ray_pkg_*/tinyexp/examples/*",
]
[tool.coverage.paths]
source = [
# Local source tree.
"tinyexp",
# Installed package locations (CI / virtualenvs).
"*/site-packages/tinyexp",
"*/dist-packages/tinyexp",
# Ray runtime_env packaged working directories.
"*/working_dir_files/_ray_pkg_*/tinyexp",
"*/runtime_resources/working_dir_files/_ray_pkg_*/tinyexp",
]
[tool.isort]
profile = "black"
line_length = 120
py_version = 310
known_first_party = "tinyexp"
known_third_party = "wandb"