-
Notifications
You must be signed in to change notification settings - Fork 53
/
pyproject.toml
273 lines (241 loc) · 8.79 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
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.version]
path = "skops/__init__.py"
[project]
name = "skops"
dynamic = ["version"]
readme = "README.rst"
description = "A set of tools, related to machine learning in production."
maintainers = [
{ name = "Adrin Jalali", email = "adrin.jalali@gmail.com" },
{ name= "Benjamin Bossan", email= "benjamin.bossan@gmail.com" },
]
requires-python = ">=3.9"
classifiers = [
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
"License :: OSI Approved",
"Programming Language :: Python",
"Topic :: Software Development",
"Topic :: Scientific/Engineering",
"Development Status :: 1 - Planning",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Operating System :: Unix",
"Operating System :: MacOS",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: Implementation :: CPython",
]
license = {file = "LICENSE"}
dependencies = [
"scikit-learn>=1.1",
"huggingface-hub>=0.17.0",
"tabulate>=0.8.8",
"packaging>=17.0",
]
[project.optional-dependencies]
rich = ["rich>=12"]
[project.urls]
Homepage = "http://github.com/skops-dev/skops"
Documentation = "https://skops.readthedocs.io/en/stable/"
Repository = "http://github.com/skops-dev/skops"
Issues = "http://github.com/skops-dev/skops/issues"
Changelog = "https://skops.readthedocs.io/en/stable/changes.html"
[tool.black]
line-length = 88
target_version = ['py38', 'py39', 'py310', 'py311']
preview = true
[tool.ruff]
# all rules can be found here: https://beta.ruff.rs/docs/rules/
select = ["E", "F", "W", "I"]
[tool.pytest.ini_options]
doctest_optionflags = "NORMALIZE_WHITESPACE ELLIPSIS"
filterwarnings = [
"error::DeprecationWarning",
"error::FutureWarning",
# TODO: remove when no longer supporting sklearn v1.0
# numpy and scipy deprecation warnings in sklearn:
'ignore:\n\n \`numpy.distutils\` is deprecated since NumPy:DeprecationWarning',
# https://github.com/scikit-learn/scikit-learn/issues/24080
"ignore:The \\'sym_pos\\' keyword is deprecated and should be replaced:DeprecationWarning",
# https://github.com/scikit-learn/scikit-learn/pull/23633
"ignore:Unlike other reduction functions:FutureWarning",
# https://github.com/scikit-learn/scikit-learn/pull/25157
"ignore:\\w+ is deprecated. Use files\\(\\) instead:DeprecationWarning",
# comes from fairlearn
"ignore:DataFrame.applymap has been deprecated. Use DataFrame.map instead:FutureWarning",
"ignore:DataFrameGroupBy.apply operated on the grouping columns.:DeprecationWarning",
# Ignore Pandas 2.2 warning on PyArrow. It might be reverted in a later release.
"ignore:\\s*Pyarrow will become a required dependency of pandas.*:DeprecationWarning",
# LightGBM sklearn 1.6 deprecation warning, fixed in the next release
"ignore:'force_all_finite' was renamed to 'ensure_all_finite' in 1.6 and will be removed in 1.8.:FutureWarning",
# RandomForestQuantileRegressor tags deprecation warning in sklearn 1.7
"ignore:The RandomForestQuantileRegressor or classes from which it inherits use `_get_tags` and `_more_tags`:FutureWarning",
# ExtraTreesQuantileRegressor tags deprecation warning in sklearn 1.7
"ignore:The ExtraTreesQuantileRegressor or classes from which it inherits use `_get_tags` and `_more_tags`:FutureWarning",
# BaseEstimator._validate_data deprecation warning in sklearn 1.6 #TODO can be removed when a new release of quantile-forest is out
"ignore:`BaseEstimator._validate_data` is deprecated in 1.6 and will be removed in 1.7:FutureWarning",
]
markers = [
"network: marks tests as requiring internet (deselect with '-m \"not network\"')",
"inference: marks tests that call inference API (deselect with '-m \"not inference\"')",
]
addopts = "--cov=skops --cov-report=term-missing --doctest-modules"
[tool.coverage.run]
omit = [
"skops/**/test_*.py",
"skops/_min_dependencies.py",
"skops/conftest.py",
]
[tool.mypy]
exclude = "(\\w+/)*test_\\w+\\.py$|spaces/skops_model_card_creator|old"
ignore_missing_imports = true
no_implicit_optional = true
[tool.pixi.project]
channels = ["conda-forge"]
platforms = ["linux-64", "osx-arm64", "osx-64", "win-64"]
[tool.pixi.dependencies]
# scikit-learn is not included here since it's included explicitly in each task's
# dependencies either from conda or pypi (pre-release).
rich = ">=12"
[tool.pixi.pypi-dependencies]
skops = { path = ".", editable = true }
[tool.pixi.feature.docs.dependencies]
# To be synced with the versions in docs/requirements.txt
matplotlib = ">=3.3"
pandas = ">=1"
sphinx = ">=3.2.0"
sphinx-gallery = ">=0.7.0"
sphinx-rtd-theme = ">=1"
numpydoc = ">=1.0.0"
sphinx-prompt = ">=1.3.0"
sphinx-issues = ">=1.2.0"
[tool.pixi.feature.docs.pypi-dependencies]
# everything that depends on scikit-learn needs to be a pypi dependency so that this
# spec is compatible with the nightly build environment.
fairlearn = ">=0.7.0"
[tool.pixi.feature.tests.dependencies]
pytest = ">=7"
pytest-cov = ">=2.9.0"
flake8 = ">=3.8.2"
types-requests = ">=2.28.5"
flaky = ">=3.7.0"
rich = ">=12"
matplotlib = ">=3.3"
pandas = ">=1"
[tool.pixi.feature.tests.pypi-dependencies]
# these are packages that require scikit-learn. They need to be as a pypi dependency
# because otherwise there will be a package resolution conflict between pypi and conda
# when installing pre-release nightly release.
lightgbm = ">=3"
xgboost = ">=1.6"
[tool.pixi.feature.min-deps.dependencies]
python = "=3.9"
# all version constraints for this package seem to resolve to the latest. so leaving it
# as is.
quantile-forest = "=1.3.11"
scikit-learn = "~=1.1.0"
pytest = "=7"
pytest-cov = "=2.9.0"
flake8 = "=3.8.2"
types-requests = "=2.28.5"
flaky = "=3.7.0"
catboost = "~=1.0"
rich = "=12"
matplotlib = "=3.3"
pandas = "=1"
lightgbm = "=3"
xgboost = "=1.6"
[tool.pixi.feature.lint.dependencies]
pre-commit = "*"
[tool.pixi.feature.dev.dependencies]
ipython = "*"
[tool.pixi.feature.sklearn11.dependencies]
scikit-learn = "~=1.1.0"
catboost = ">=1.0"
python = "=3.9"
[tool.pixi.feature.sklearn12.dependencies]
scikit-learn = "~=1.2.0"
pandas = "~=1.5"
numpy = "~=1.24"
scipy = "~=1.9"
fairlearn = "~=0.8"
catboost = ">=1.0"
python = "=3.10"
[tool.pixi.feature.sklearn13.dependencies]
scikit-learn = "~=1.3.0"
pandas = "~=2.0"
numpy = "~=1.25"
scipy = "~=1.10"
fairlearn = "~=0.9"
catboost = ">=1.0"
python = "=3.11"
[tool.pixi.feature.sklearn14.dependencies]
scikit-learn = "~=1.4.0"
pandas = "~=2.1"
numpy = "~=1.26"
scipy = "~=1.11"
fairlearn = "~=0.10"
catboost = ">=1.0"
python = "=3.12"
[tool.pixi.feature.sklearn15.dependencies]
scikit-learn = "~=1.5"
fairlearn = "~=0.10"
pandas = "~=2.1"
numpy = "~=2.0"
scipy = "~=1.13"
python = "=3.13"
quantile-forest = "~=1.3.11"
[tool.pixi.feature.sklearn16]
# TODO: comment this out once scikit-learn 1.6 is released and keep for testing against
# the next release candidate.
channels = [
{channel = "conda-forge/label/scikit-learn_rc", priority = 2},
{channel = "conda-forge", priority = 1},
]
[tool.pixi.feature.sklearn16.dependencies]
scikit-learn = "*"
fairlearn = "~=0.11"
pandas = "~=2.2"
numpy = "~=2.1"
scipy = "~=1.9"
# add when catboost supports 3.13
# https://github.com/catboost/catboost/issues/2748
# catboost = ">=1.0"
# add quantile-forest when it's released
# https://github.com/zillow/quantile-forest/issues/103
# quantile-forest = "~=1.4"
python = "=3.13"
[tool.pixi.feature.sklearn17.pypi-options]
# This is for the nightly channel to test the dev version of scikit-learn.
extra-index-urls = ["https://pypi.anaconda.org/scientific-python-nightly-wheels/simple"]
[tool.pixi.feature.sklearn17.pypi-dependencies]
# The version value here needs to be exact, hence == instead of ~=
scikit-learn = "==1.7.dev0"
fairlearn = "*"
pandas = "*"
numpy = "*"
scipy = "*"
[tool.pixi.feature.lint.tasks]
lint = { cmd = "pre-commit install && pre-commit run -v --all-files --show-diff-on-failure" }
[tool.pixi.feature.tests.tasks]
tests = { cmd = "pytest -vsl --cov=skops --cov-report=xml --cov-report=term-missing -m \"not inference\" skops" }
[tool.pixi.environments]
default = ["docs", "tests", "lint", "rich", "dev", "sklearn17"]
lint = ["lint"]
docs = ["docs"]
ci-min-deps = ["rich", "tests", "lint", "min-deps"]
ci-sklearn11 = ["rich", "tests", "lint", "sklearn11"]
ci-sklearn12 = ["rich", "tests", "lint", "sklearn12"]
ci-sklearn13 = ["rich", "tests", "lint", "sklearn13"]
ci-sklearn14 = ["rich", "tests", "lint", "sklearn14"]
ci-sklearn15 = ["rich", "tests", "lint", "sklearn15"]
ci-sklearn16 = ["rich", "tests", "lint", "sklearn16"]
ci-sklearn17 = ["rich", "tests", "lint", "sklearn17"]