-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathpyproject.toml
More file actions
117 lines (105 loc) · 3.12 KB
/
pyproject.toml
File metadata and controls
117 lines (105 loc) · 3.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
[project]
name = "libreyolo"
version = "1.0.0"
description = "Libre YOLO - An open source YOLO library with MIT license."
readme = "README.md"
requires-python = ">=3.10"
license = {text = "MIT"}
authors = [
{name = "LibreYOLO Team"}
]
dependencies = [
"numpy>=1.19.0",
"Pillow>=8.0.0",
"torch>=1.7.0",
"torchvision>=0.11.0",
"PyYAML>=6.0",
"requests>=2.25.0",
"opencv-python>=4.11.0.86",
"tqdm>=4.65.0",
"pycocotools>=2.0.0",
]
[dependency-groups]
dev = [
"pytest>=9.0.2",
"ruff>=0.14.10",
"ty>=0.0.1",
]
[project.optional-dependencies]
onnx = [
"onnx>=1.14.0",
"onnxsim>=0.4.0",
"onnxruntime>=1.16.0",
]
rfdetr = [
"rfdetr>=1.4.1",
]
tensorrt = [
"tensorrt",
"pycuda>=2022.1",
]
openvino = [
"openvino>=2024.0.0",
]
ncnn = [
"pnnx",
"ncnn",
]
rtdetr = ["scipy>=1.7.0"]
all = [
"libreyolo[onnx]",
"libreyolo[rfdetr]",
"libreyolo[tensorrt]",
"libreyolo[openvino]",
"libreyolo[ncnn]",
"libreyolo[rtdetr]",
]
[project.urls]
Homepage = "https://github.com/LibreYOLO"
Repository = "https://github.com/LibreYOLO/libreyolo"
[tool.setuptools]
include-package-data = true
[tool.setuptools.package-data]
libreyolo = ["assets/*.jpg"]
[tool.setuptools.packages.find]
include = ["libreyolo*"]
[build-system]
requires = ["setuptools>=61", "wheel"]
build-backend = "setuptools.build_meta"
[tool.ty.rules]
# Rules that catch real bugs — keep as errors
invalid-parameter-default = "error"
# Rules that produce false positives with PyTorch nn.Module dynamic attrs
# and C extensions without type stubs (tensorrt, ncnn, pycuda).
# Downgrade to warnings so they don't block CI but remain visible.
unresolved-import = "warn" # optional deps not installed in dev env
unresolved-attribute = "warn" # nn.Module.__getattr__, C extension members
invalid-argument-type = "warn" # torch.onnx.export kwargs, tensor ops
not-subscriptable = "warn" # tensor[int] operations
unsupported-operator = "warn" # tensor arithmetic
not-iterable = "warn" # Module/tensor iterations
call-non-callable = "warn" # Module.__call__
invalid-method-override = "warn" # template method + nn.Module patterns
invalid-assignment = "warn" # nn.Module dynamic attrs, tensor ops
invalid-return-type = "warn" # torch return type inference
index-out-of-bounds = "warn" # tensor indexing
unknown-argument = "warn" # dynamic kwargs patterns
no-matching-overload = "warn" # torch overloaded functions
possibly-missing-attribute = "warn"
[[tool.ty.overrides]]
include = ["vision_analysis_benchmark/**", "tests/**"]
[tool.ty.overrides.rules]
# Benchmark and test code: suppress all to avoid noise
unresolved-import = "ignore"
[tool.pytest.ini_options]
addopts = "-m unit"
testpaths = ["tests"]
markers = [
"unit: fast tests that avoid external weights or large files",
"e2e: end-to-end tests requiring full model loading and inference",
"tensorrt: tests requiring TensorRT",
"openvino: tests requiring OpenVINO",
"ncnn: tests requiring ncnn",
"rfdetr: tests requiring RF-DETR dependencies",
"slow: slow tests that may take several minutes",
]