-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
185 lines (168 loc) · 3.49 KB
/
pyproject.toml
File metadata and controls
185 lines (168 loc) · 3.49 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
[build-system]
requires = ["scikit-build-core[wheels]>=0.9", "setuptools_scm[toml]>=6.2"]
build-backend = "scikit_build_core.build"
[project]
name = "fastforward"
dynamic = ["version"]
requires-python = ">=3.10"
dependencies = [
"importlib-metadata",
"libcst",
"mypy<1.17",
"numpy>=1.24,<2.0",
"onnx",
"onnxruntime",
"onnxscript",
"optree",
"packaging",
"ruff",
"safetensors",
"setuptools",
"typing-extensions",
]
[project.optional-dependencies]
dev = [
# duplicate build-system.requires for editable mode (non-isolated)
"scikit-build-core[wheels]>=0.9",
"setuptools_scm[toml]>=6.2",
# and the rest
"isort",
"notebook",
]
test = [
"pytest>=6",
"pytest-cov>=3",
"types-PyYAML",
"syrupy",
]
docs = [
"datasets",
"ipywidgets",
"jupytext",
"mike",
"mkdocs-gen-files",
"mkdocs-jupyter",
"mkdocs-literate-nav",
"mkdocs-material",
"mkdocs-section-index",
"mkdocstrings-python",
"sentencepiece",
"transformers==4.46.3",
"tqdm",
]
[tool.scikit-build]
build-dir = "build"
logging.level = "INFO"
metadata.version.provider = "scikit_build_core.metadata.setuptools_scm"
strict-config = false
wheel.cmake = false
wheel.license-files = []
wheel.packages = ["src/fastforward"]
[tool.scikit-build.cmake.define]
CMAKE_BUILD_TYPE = "RelWithDebInfo"
CMAKE_CUDA_ARCHITECTURES = "70;75;80"
CMAKE_CUDA_FLAGS = "--threads=8"
[tool.setuptools_scm]
fallback_version = "0.1.0.dev0"
[tool.pytest.ini_options]
minversion = "6.0"
testpaths = ["tests"]
xfail_strict = true
addopts = [
"-ra",
"--showlocals",
"--strict-markers",
"--strict-config",
"-m",
"not slow",
]
markers = [
"benchmark: marks benchmark tests",
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
]
filterwarnings = [
"error",
"ignore:ComplexHalf support is experimental:UserWarning",
]
[tool.mypy]
mypy_path = "src:$MYPY_CONFIG_FILE_DIR/build/stubs"
exclude = ['build/', 'docs/examples', 'tests/autoquant/test_data']
python_version = "3.10"
warn_unused_configs = true
strict = true
show_error_codes = true
namespace_packages = true
explicit_package_bases = true
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
warn_unreachable = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
disallow_untyped_calls = false
[[tool.mypy.overrides]]
module = "docs.*"
disallow_untyped_defs = false
disallow_incomplete_defs = false
[[tool.mypy.overrides]]
module = ["torch.*"]
ignore_missing_imports = true
implicit_reexport = true
[tool.ruff]
line-length = 100
target-version = "py310"
fix = false
preview = true
extend-exclude = ["tests/autoquant/test_data"]
[tool.ruff.lint]
select = [
"ARG",
"I",
"D",
"E4",
"E7",
"E9",
"F",
"E401",
"E402",
"UP006",
"UP008",
"UP045",
"CPY001",
"ISC001",
"PIE790",
"EM102",
]
ignore = [
"D100",
"D104",
"D105",
"D107",
"D203",
"D204",
"D213",
"D215",
"D400",
"D401",
"D404",
"D406",
"D407",
"D408",
"D409",
"D413",
"ARG005",
]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
[tool.ruff.lint.flake8-copyright]
notice-rgx = "Copyright \\(c\\) Qualcomm Technologies, Inc. and/or its subsidiaries.(?:#|\\s)*SPDX-License-Identifier: BSD-3-Clause-Clear"
[tool.ruff.lint.isort]
lines-between-types = 1
known-local-folder = ["funcgen", "doc_helpers"]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F403"]
[tool.basedpyright]
reportAny = false
reportExplicitAny = false
reportUnannotatedClassAttribute = false