-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpyproject.toml
204 lines (184 loc) · 5.19 KB
/
pyproject.toml
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
[tool.poetry]
name = "hannah"
version = "0.1.0"
description = "Hardware Accelerator and Neural Network Architecture seArcH"
authors = [
"Christoph Gerum <[email protected]>",
"Adrian Frischknecht <[email protected]>",
"Felix Lorenz <[email protected]>",
"Tobias Hald <[email protected]>"
]
packages = [
{include='hannah'},
{include='hydra_plugins'}
]
[tool.poetry.dependencies]
python = ">=3.10 <3.12"
pwlf = "^2.0.0"
gitdb2 = "2.0.6"
chainmap = "^1.0.3"
torch = "^2.2.2"
torchaudio = "^2.2.2"
torchvision = "^0.17.2"
SoundFile = "^0.10.3"
zipp = "^3.3.1"
bitstring = "^3.1.7"
wfdb = "^3.2.0"
tqdm="^4.60.0"
seaborn="^0.13.2"
pandas="^1.2.4"
hydra-optuna-sweeper = {version = "^1.1.1"}
hydra-core = "^1.1.0"
hydra-joblib-launcher = ">1.1.0"
hydra-submitit-launcher = ">=1.2.0"
tabulate = "^0.8.3"
GitPython = "^3.1.14"
h5py = "^3.2.1"
sympy = "^1.7.1"
nvsmi = "^0.4.2"
libsvm="^3.23.0.4"
fairscale = "^0.4.5"
numpy = {version = "^1.26.4", optional = true}
scikit-learn = "~1.2.2"
hydra-colorlog = "^1.2.0"
z3-solver = "^4.11.2.0"
xgboost = "^1.5.2"
pytorch-lightning = "^2.4.0"
# optional dependencies for backends
onnxruntime = {version = "^1.4.0", optional = true}
#dependencies for vision tasks
imagecorruptions = {version = "^1.1.2", optional = true}
timm = {version = "^0.9.12", optional = true}
pycocotools = {version = "^2.0.6", optional = true}
gdown = {version = "^4.5.3", optional = true}
albumentations = {version = "^1.4.3", optional = true}
kornia = {version = "^0.7.1", optional = true}
dgl = "1.1.3"
nn-meter = {version = "^2.0", optional = true}
zigzag-dse = {version = "^2.5.3", optional = true}
rich = "^13.7.0"
onnx = "^1.16.0"
spox = "^0.12.0"
optree = "^0.11.0"
netdeployonnx = {path = "external/netdeployonnx", develop = true}
tensorboard = "^2.17.1"
pymoo = {version = "^0.6.1.3", optional = true}
lightning = "^2.4.0"
[tool.poetry.dev-dependencies]
pytest = ">=7.2.0"
pre_commit = ">=2.7.1"
pytest-cov = ">=2.10.1"
rope = ">=0.19.0"
mypy = ">=0.910"
torch-tb-profiler = ">=0.2.0"
black = ">=22.6.0"
coverage = ">=6.3.2"
isort = ">=5.10.1"
pyment = ">=0.3.3"
mkdocstrings = {version = ">=0.19.0", extras = ["python"]}
mkdocs-gen-files = ">=0.3.4"
mkdocs-literate-nav = ">=0.4.1"
flaky = ">=3.7.0"
ruff = "^0.5.5"
[tool.poetry.extras]
#tvm = ["hannah-tvm"]
onnxrt = ["onnxruntime", "onnx"]
vision = ["pycocotools", "albumentations", "imagecorruptions", "timm", "gdown", "kornia"]
optimizers = ["pymoo"]
performancemodel = ["zigzag-dse", "nn-meter"]
[tool.poetry.scripts]
hannah-train = 'hannah.tools.train:main'
hannah-characterize = 'hannah.tools.characterize:main'
hannah-eval = 'hannah.tools.eval:main'
hannah-objectdetection-eval = 'hannah.tools.objectdetection_eval:main'
hannah-nas-eval = "hannah.nas.eval.__main__:main"
hannah-exec = "hannah.tools.exec:main"
hannah-hw = "hannah.nas.hardware_description.__main__:main"
[tool.poetry.group.dev.dependencies]
pyre-check = "^0.9.17"
pytest-xdist = "^3.1.0"
ipykernel = "^6.29.4"
ruff = "^0.5.5"
pytest-asyncio = "^0.24.0"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.isort]
profile = "black"
[tool.ruff]
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
"staticfiles/*",
"test/data/*",
"__pycache__", # from .flake8
"hannah/models/tc_snn", # from .flake8
"SNNLayers.py", # from .flake8
"external/*", # not hannah-tvm or other external modules
"hannah/nas/test/test_z3.py",
"scripts/eeg/eeg_dataset_creator.py",
]
target-version = "py310"
[tool.ruff.lint]
select = [
"F", # pyflakes
"E", # errors
# "W", # warnings
# "C90", # complexity warnings
# "I", # imports
# "N", # naming
# "UP", # pyupgrade, use language features correctly
]
ignore = [
"S101", # Use of assert detected https://docs.astral.sh/ruff/rules/assert/
"RUF012", # Mutable class attributes should be annotated with `typing.ClassVar`
"SIM102", # sometimes it's better to nest
"UP038", # Checks for uses of isinstance/issubclass that take a tuple
# of types for comparison.
# Deactivated because it can make the code slow:
# https://github.com/astral-sh/ruff/issues/7871
"E203", # whitespace before symbol
"E401", # multiple import statements
"E402", # import shadow
"E501", # line too long
"E701", # multi statements
"E713", # not in test
"E721", # use is
"E722", # bare except
"E741", # ambiguous-variable-name
"F401", # unused imports
"F403", # import *
"F841", # unused var
]
# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
# The fixes in extend-unsafe-fixes will require
# provide the `--unsafe-fixes` flag when fixing.
extend-unsafe-fixes = [
"UP038"
]
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.lint.isort]
force-single-line = false