-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathpyproject.toml
More file actions
158 lines (145 loc) · 4.04 KB
/
pyproject.toml
File metadata and controls
158 lines (145 loc) · 4.04 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
# SPDX-FileCopyrightText: 2025 ETH Zurich and University of Bologna
#
# SPDX-License-Identifier: MIT
[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "onnx4deeploy"
version = "0.3.0"
description = "ONNX model generation and optimization framework for deep learning deployment"
readme = "README.md"
requires-python = "==3.10.*"
license = {text = "MIT"}
authors = [
{name = "Onnx4Deeploy Contributors"}
]
keywords = ["onnx", "deep-learning", "model-optimization", "pytorch"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
]
dependencies = [
"torch==2.7.0",
"onnx==1.16.0",
"onnx-graphsurgeon==0.5.8",
"onnxruntime-training==1.19.2",
"onnxscript==0.5.7",
"onnxsim==0.4.36",
"numpy==1.26.4",
"pyyaml==6.0.2",
]
[project.optional-dependencies]
dev = [
"pytest>=7.0.0",
"pytest-cov>=4.0.0",
"black>=23.0.0",
"flake8>=6.0.0",
"isort>=5.12.0",
"mypy>=1.0.0",
"pre-commit>=3.0.0",
]
visualization = [
"beautifulsoup4>=4.0.0",
"pandas>=2.0.0",
]
quant = [
# Brevitas: PyTorch quantization-aware library used by `-mode quant`.
# DeepQuant (Brevitas → QCDQ ONNX exporter) is not on PyPI and must be
# installed from source: `pip install git+https://github.com/pulp-platform/DeepQuant`.
"brevitas==0.12.1",
]
[project.urls]
Homepage = "https://github.com/pulp-platform/Onnx4Deeploy"
Repository = "https://github.com/pulp-platform/Onnx4Deeploy"
[tool.setuptools.packages.find]
where = ["."]
include = ["onnx4deeploy*"]
exclude = ["tests*", "legacy*", "docs*"]
[tool.setuptools.package-data]
onnx4deeploy = ["visualization/assets/**/*"]
[tool.black]
line-length = 100
target-version = ['py39', 'py310', 'py311']
include = '\.pyi?$'
extend-exclude = '''
/(
# directories
\.eggs
| \.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| build
| dist
| legacy
)/
'''
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
"--verbose",
"--strict-markers",
# Coverage disabled for now - install pytest-cov to enable
# "--cov=onnx4deeploy",
# "--cov-report=html",
# "--cov-report=term-missing",
]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"integration: marks tests as integration tests",
"baseline: tests that require baseline comparison",
"inference: marks tests for inference mode",
"training: marks tests for training mode",
]
[tool.isort]
profile = "black"
line_length = 100
skip_gitignore = true
known_first_party = ["onnx4deeploy"]
known_third_party = ["numpy", "onnx", "onnxruntime", "torch", "yaml", "pytest"]
src_paths = ["."]
[tool.mypy]
python_version = "3.9"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = false
disallow_incomplete_defs = false
check_untyped_defs = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
strict_equality = true
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = [
"torch.*",
"onnx.*",
"onnxruntime.*",
"numpy.*",
]
ignore_missing_imports = true
[tool.flake8]
max-line-length = 100
extend-ignore = [
"E203", "W503", # Black compatibility
"E501", # Line too long
"F821", "F841", "F402", "F541", "F403", "F401", # Undefined/unused names
"E722", # Bare except
"D107", "D102", "D200", "D401", "D400", "D205", "D103", "D105", "D100", "D101", "D104", "D202", "D403", # Docstring issues
"B027", "B007", "B001", "B026", "B006" # Bugbear warnings
]
exclude = [".git", "__pycache__", "build", "dist", "legacy"]
per-file-ignores = ["__init__.py:F401"]