-
Notifications
You must be signed in to change notification settings - Fork 237
/
pyproject.toml
154 lines (140 loc) · 4 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
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"
[project]
name = "nncf"
description = "Neural Networks Compression Framework"
readme="docs/PyPiPublishing.md"
license = { text = "Apache-2.0" }
authors = [{ name = "Intel" }, { email = "[email protected]" }]
requires-python = ">=3.9"
dynamic = ["version"]
keywords = [
"bert",
"classification",
"compression",
"hawq",
"mixed-precision-training",
"mmdetection",
"nas",
"nlp",
"object-detection",
"pruning",
"quantization",
"quantization-aware-training",
"semantic-segmentation",
"sparsity",
"transformers",
]
classifiers = [
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
]
dependencies = [
"jsonschema>=3.2.0",
"jstyleson>=0.0.2",
"natsort>=7.1.0",
"networkx>=2.6, <=3.3",
"ninja>=1.10.0.post2, <1.12",
"numpy>=1.19.1, <2.2.0",
"openvino-telemetry>=2023.2.0",
"packaging>=20.0",
"pandas>=1.1.5,<2.3",
"psutil",
"pydot>=1.4.1, <3.0.0",
"pymoo>=0.6.0.1",
"rich>=13.5.2",
"scikit-learn>=0.24.0",
"scipy>=1.3.2",
"tabulate>=0.9.0",
"tqdm>=4.54.1",
]
[project.optional-dependencies]
plots = [
"kaleido>=0.2.1",
"matplotlib>=3.3.4, <3.6",
"pillow>=9.0.0",
"plotly-express>=0.4.1",
]
[project.urls]
Homepage = "https://github.com/openvinotoolkit/nncf"
[tool.setuptools.dynamic]
version = { attr = "custom_version.version" }
[tool.setuptools.packages.find]
where = ["."]
exclude = ["tests", "tests.*", "examples", "examples.*", "tools", "tools.*"]
namespaces = false
[tool.black]
line-length = 120
[tool.md_dead_link_check]
exclude_files = ["ReleaseNotes.md"]
[tool.isort]
line_length = 120
force_single_line = true
profile = "black"
single_line_exclusions = "typing"
skip_glob = "examples/post_training_quantization/torch/ssd300_vgg16/main.py"
[tool.mypy]
follow_imports = "silent"
strict = true
# should be removed later
# mypy recommends the following tool as an autofix:
# https://github.com/hauntsaninja/no_implicit_optional
implicit_optional = true
files = [
"nncf/common/sparsity",
"nncf/common/graph",
"nncf/common/accuracy_aware_training/",
"nncf/common/utils/",
"nncf/common/tensor_statistics",
"nncf/experimental/torch2",
]
[tool.ruff]
line-length = 120
exclude = ["nncf/tensorflow/__init__.py"]
[tool.ruff.lint]
preview = true
ignore-init-module-imports = true
ignore = [
"E201", # whitespace-after-open-bracket
"E203", # whitespace-before-punctuation
"E231", # missing-whitespace
"E251", # unexpected-spaces-around-keyword-parameter-equals
"E731", # lambda-assignment
"SIM108", # if-else-block-instead-of-if-exp
"SIM110", # reimplemented-builtin
"SIM117", # multiple-with-statements
"SIM103", # needless-bool
"NPY002", # numpy-legacy-random
]
select = [
"E", # pycodestyle rules
"F", # pyflakes rules
"CPY001", # copyright check
"NPY", # numpy rules
]
extend-select = [
"SIM", # https://pypi.org/project/flake8-simplify
]
[tool.ruff.lint.per-file-ignores]
"nncf/experimental/torch/nas/bootstrapNAS/__init__.py" = ["F401"]
"nncf/torch/__init__.py" = ["F401", "E402"]
"tests/**/*.py" = ["F403"]
"tests/**/__init__.py" = ["F401"]
"examples/**/*.py" = ["F403"]
[tool.ruff.lint.flake8-copyright]
notice-rgx = """\
# Copyright \\(c\\) (\\d{4}|\\d{4}-\\d{4}) Intel Corporation
# Licensed under the Apache License, Version 2.0 \\(the "License"\\);
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""
[tool.pytest.ini_options]
pythonpath = "."