-
Notifications
You must be signed in to change notification settings - Fork 44
/
Copy pathpyproject.toml
293 lines (277 loc) · 8.82 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
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
## This file created and used instead of setup.py for building and installing ads package. This change is to
## follow best practive to "not invoke setup.py directly", see detailed explanation why here:
## https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html.
## Check README-development.md and Makefile for instruction how to install or build ADS locally.
[build-system]
# PEP 517 – A build-system independent format for source trees - https://peps.python.org/pep-0517/
# Till recently flit-core library was suggested by pip, so we used it. In future, cosider to change to
# other, if better, build-backend library.
requires = [
"flit-core >=3.8,<4",
] # should specify <4, so won’t be impacted by changes in the next major version
build-backend = "flit_core.buildapi"
[project]
# Declaring project metadata
# https://packaging.python.org/en/latest/specifications/declaring-project-metadata/
# PEP 621 – Storing project metadata in pyproject.toml - https://peps.python.org/pep-0621/
# PEP 518 – Specifying Minimum Build System Requirements for Python Projects https://peps.python.org/pep-0518/
# Required
name = "oracle_ads" # the install (PyPI) name; name for local build in [tool.flit.module] section below
version = "2.12.9"
# Optional
description = "Oracle Accelerated Data Science SDK"
readme = { file = "README.md", content-type = "text/markdown" }
requires-python = ">=3.8"
license = { file = "LICENSE.txt" }
authors = [{ name = "Oracle Data Science" }]
keywords = [
"Oracle Cloud Infrastructure",
"OCI",
"Machine Learning",
"ML",
"Artificial Intelligence",
"AI",
"Data Science",
"Cloud",
"Oracle",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: Universal Permissive License (UPL)",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]
# PEP 508 – Dependency specification for Python Software Packages - https://peps.python.org/pep-0508/
# In dependencies se "<library>; platform_machine == 'aarch64'" to specify ARM underlying platform
# Copied from install_requires list in setup.py, setup.py got removed in favor of this config file
dependencies = [
"PyYAML>=6", # pyyaml 5.4 is broken with cython 3
"asteval>=0.9.25",
"cerberus>=1.3.4",
"cloudpickle>=1.6.0",
"fsspec>=0.8.7",
"gitpython>=3.1.2",
"jinja2>=2.11.2",
"matplotlib>=3.1.3,<=3.8.4",
"numpy>=1.19.2,<2.0.0",
"oci>=2.125.3",
"ocifs>=1.1.3",
"pandas>1.2.1; python_version<'3.9'", # starting pandas v2.1.0 requires-python = '>=3.9'
"pandas>=2.2.0; python_version>='3.9'",
"psutil>=5.7.2",
"python_jsonschema_objects>=0.3.13",
"requests",
"scikit-learn>=1.0,<1.6.0",
"tabulate>=0.8.9",
"tqdm>=4.59.0",
"pydantic>=2.6.3",
"tenacity",
"httpx",
]
[project.optional-dependencies]
# Copied from extras_require list in setup.py, setup.py got removed in favor of this config file
bds = ["hdfs[kerberos]", "ibis-framework[impala]", "sqlalchemy"]
boosted = [
"lightgbm",
"xgboost",
]
data = [
"datefinder>=0.7.1",
"fastavro>=0.24.2",
"htmllistparse>=0.6.0",
"openpyxl>=3.0.7",
"oracledb>=1.0",
"pandavro>=1.6.0",
"sqlalchemy>=1.4.1,<=1.4.46",
]
geo = [
"geopandas<1.0.0", # in v1.0.0 removed the built-in dataset 'naturalearth_lowres', fix when relax version of geopandas needed
"fiona<=1.9.6",
"oracle_ads[viz]"
]
huggingface = [
"transformers",
"tf-keras" # Keras 3 installed in py3.11+, but this is not yet supported in Transformers. Need to install the backwards-compatible tf-keras
]
notebook = ["ipython>=7.23.1, <8.0", "ipywidgets~=7.6.3"]
onnx = [
"lightgbm",
"onnx>=1.12.0,<=1.15.0", # v 1.15.0 set base on onnxrutime version and onnx opset support - https://onnxruntime.ai/docs/reference/compatibility.html#onnx-opset-support
"onnxmltools>=1.10.0",
"onnxruntime~=1.17.0,!=1.16.0", # v1.17.0 used in Oracle Database 23ai; avoid v1.16 https://github.com/microsoft/onnxruntime/issues/17631, revealed by unit tests
"oracle_ads[viz]",
"protobuf",
"skl2onnx>=1.10.4",
"tf2onnx",
"xgboost<=1.7",
]
opctl = [
"conda-pack",
"docker",
"inflection",
"nbconvert",
"nbformat",
"oci-cli",
"py-cpuinfo",
"rich",
"fire",
"cachetools",
"huggingface_hub==0.26.2"
]
optuna = ["optuna==2.9.0", "oracle_ads[viz]"]
spark = ["pyspark>=3.0.0"]
tensorflow = [
"oracle_ads[viz]",
"tensorflow<=2.15.1" # v2.16.1 with consequence on tf2onnx v1.16.1 (latest) has an issue with Keras 3 installed in py3.11+ (https://github.com/onnx/tensorflow-onnx/issues/2319)
]
text = [
"spacy>=3.4.2,<3.8", # the first version of spacy that supports python 3.11 is spacy v3.4.2; 3.8.2 has dependency conflict.
"wordcloud>=1.8.1"
]
torch = [
"oracle_ads[viz]",
"torch",
"torchvision"
]
viz = [
"bokeh>=3.0.0,<3.2.0", # starting 3.2.0 bokeh not supporting python3.8; relax after ADS will drop py3.8 support
"folium>=0.12.1",
"graphviz<0.17",
"scipy>=1.5.4",
"seaborn>=0.11.0",
]
forecast = [
"conda-pack",
"inflection",
"nbconvert",
"nbformat",
"oci-cli",
"py-cpuinfo",
"rich",
"autots",
"mlforecast",
"neuralprophet>=0.7.0",
"numpy<2.0.0",
"oci-cli",
"optuna",
"pmdarima",
"prophet",
"shap",
"sktime",
"statsmodels",
"plotly",
"oracledb",
"report-creator==1.0.32",
]
anomaly = [
"oracle_ads[opctl]",
"autots",
"oracledb",
"report-creator==1.0.32",
"rrcf==0.4.4",
"scikit-learn<1.6.0",
"salesforce-merlion[all]==2.0.4"
]
recommender = [
"oracle_ads[opctl]",
"scikit-surprise",
"plotly",
"report-creator==1.0.32",
]
feature-store-marketplace = [
"oracle-ads[opctl]",
"kubernetes"
]
pii = [
"aiohttp",
"gender_guesser",
"nameparser",
"oracle_ads[opctl]",
"plotly",
"scrubadub==2.0.1",
"scrubadub_spacy",
"spacy-transformers==1.2.5",
"spacy==3.6.1",
"report-creator==1.0.32",
]
llm = ["langchain>=0.2", "langchain-community", "langchain_openai", "pydantic>=2,<3", "evaluate>=0.4.0"]
aqua = ["jupyter_server"]
# To reduce backtracking (decrese deps install time) during test/dev env setup reducing number of versions pip is
# trying to use. Ref - https://pip.pypa.io/en/stable/topics/dependency-resolution/#possible-ways-to-reduce-backtracking.
# Revisit this section continuously and update to recent version of libraries. focus on pyt3.9/3.10 versions.
testsuite = [
"arff",
"autogen-agentchat<0.4",
"category_encoders==2.6.3", # set version to avoid backtracking
"cohere==4.53", # set version to avoid backtracking
"faiss-cpu",
"fastparquet==2024.2.0", # set version to avoid backtracking
"imbalanced-learn",
"lxml",
"mysql-connector-python",
"nltk",
"notebook==6.4.12",
"opensearch-py",
"pdfplumber",
"py4j",
"pyarrow>=15.0.0",
"statsmodels; python_version=='3.8'",
"statsmodels>=0.14.1; python_version>='3.9'", # cython3.0 compatibility added in v0.14.1
"tables",
"tables>3.9.0; python_version>='3.9'",
"xlrd>=1.2.0",
]
[project.urls]
"Github" = "https://github.com/oracle/accelerated-data-science"
"Documentation" = "https://accelerated-data-science.readthedocs.io/en/latest/index.html"
[project.scripts]
ads = "ads.cli:cli"
[tool.flit.module]
name = "ads" # name for local build and import, see https://flit.pypa.io/en/latest/pyproject_toml.html#module-section
[tool.flit.sdist]
# By default `ads` folder and `LICENSE.txt` file included in sdist. Folders `docs` and `tests` are excluded, as weel as other project files
# Use this section to include/exclude files and folders. See doc: https://flit.pypa.io/en/latest/pyproject_toml.html#sdist-section
include = ["THIRD_PARTY_LICENSES.txt"]
# Configuring Ruff (https://docs.astral.sh/ruff/configuration/)
[tool.ruff]
fix = true
[tool.ruff.lint]
exclude = ["*.yaml", "*jinja2"]
# rules - https://docs.astral.sh/ruff/rules/
extend-ignore = ["E402", "N806", "N803"]
ignore = [
"S101", # use of assert
"B008", # function call in argument defaults
"B017", # pytest.raises considered evil
"B023", # function definition in loop (TODO: un-ignore this)
"B028", # explicit stacklevel for warnings
"C901", # function is too complex (TODO: un-ignore this)
"E501", # from scripts/lint_backend.sh
"PLR091", # complexity rules
"PLR2004", # magic numbers
"PLW2901", # `for` loop variable overwritten by assignment target
"SIM105", # contextlib.suppress (has a performance cost)
"SIM117", # multiple nested with blocks (doesn't look good with gr.Row etc)
"UP006", # use `list` instead of `List` for type annotations (fails for 3.8)
"UP007", # use X | Y for type annotations (TODO: can be enabled once Pydantic plays nice with them)
]
extend-select = [
"ARG",
"B",
"C",
"E",
"F",
"I",
"N",
"PL",
"S101",
"SIM",
"UP",
"W",
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]