bartz 0.6.0__tar.gz → 0.7.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {bartz-0.6.0 → bartz-0.7.0}/PKG-INFO +2 -3
- {bartz-0.6.0 → bartz-0.7.0}/pyproject.toml +84 -19
- bartz-0.7.0/src/bartz/BART.py +813 -0
- {bartz-0.6.0 → bartz-0.7.0}/src/bartz/__init__.py +2 -2
- bartz-0.7.0/src/bartz/_version.py +1 -0
- bartz-0.7.0/src/bartz/debug.py +1364 -0
- {bartz-0.6.0 → bartz-0.7.0}/src/bartz/grove.py +139 -93
- bartz-0.7.0/src/bartz/jaxext/__init__.py +213 -0
- bartz-0.7.0/src/bartz/jaxext/_autobatch.py +238 -0
- bartz-0.7.0/src/bartz/jaxext/scipy/__init__.py +25 -0
- bartz-0.7.0/src/bartz/jaxext/scipy/special.py +240 -0
- bartz-0.7.0/src/bartz/jaxext/scipy/stats.py +36 -0
- bartz-0.7.0/src/bartz/mcmcloop.py +668 -0
- {bartz-0.6.0 → bartz-0.7.0}/src/bartz/mcmcstep.py +734 -453
- bartz-0.7.0/src/bartz/prepcovars.py +254 -0
- bartz-0.6.0/src/bartz/BART.py +0 -603
- bartz-0.6.0/src/bartz/_version.py +0 -1
- bartz-0.6.0/src/bartz/debug.py +0 -184
- bartz-0.6.0/src/bartz/jaxext.py +0 -423
- bartz-0.6.0/src/bartz/mcmcloop.py +0 -511
- bartz-0.6.0/src/bartz/prepcovars.py +0 -158
- {bartz-0.6.0 → bartz-0.7.0}/README.md +0 -0
- {bartz-0.6.0 → bartz-0.7.0}/src/bartz/.DS_Store +0 -0
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: bartz
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.7.0
|
|
4
4
|
Summary: Super-fast BART (Bayesian Additive Regression Trees) in Python
|
|
5
5
|
Author: Giacomo Petrillo
|
|
6
6
|
Author-email: Giacomo Petrillo <info@giacomopetrillo.com>
|
|
7
7
|
License-Expression: MIT
|
|
8
8
|
Requires-Dist: equinox>=0.12.2
|
|
9
|
-
Requires-Dist: jax>=0.
|
|
10
|
-
Requires-Dist: jaxlib>=0.4.35
|
|
9
|
+
Requires-Dist: jax>=0.5.3
|
|
11
10
|
Requires-Dist: jaxtyping>=0.3.2
|
|
12
11
|
Requires-Dist: numpy>=1.25.2
|
|
13
12
|
Requires-Dist: scipy>=1.11.4
|
|
@@ -28,7 +28,7 @@ build-backend = "uv_build"
|
|
|
28
28
|
|
|
29
29
|
[project]
|
|
30
30
|
name = "bartz"
|
|
31
|
-
version = "0.
|
|
31
|
+
version = "0.7.0"
|
|
32
32
|
description = "Super-fast BART (Bayesian Additive Regression Trees) in Python"
|
|
33
33
|
authors = [
|
|
34
34
|
{name = "Giacomo Petrillo", email = "info@giacomopetrillo.com"},
|
|
@@ -38,8 +38,7 @@ readme = "README.md"
|
|
|
38
38
|
requires-python = ">=3.10"
|
|
39
39
|
dependencies = [
|
|
40
40
|
"equinox>=0.12.2",
|
|
41
|
-
"jax>=0.
|
|
42
|
-
"jaxlib>=0.4.35",
|
|
41
|
+
"jax>=0.5.3",
|
|
43
42
|
"jaxtyping>=0.3.2",
|
|
44
43
|
"numpy>=1.25.2",
|
|
45
44
|
"scipy>=1.11.4",
|
|
@@ -68,7 +67,6 @@ ci = [
|
|
|
68
67
|
"asv>=0.6.4",
|
|
69
68
|
"coverage>=7.8.0",
|
|
70
69
|
"myst-parser>=4.0.1",
|
|
71
|
-
"numpydoc>=1.8.0",
|
|
72
70
|
"packaging>=25.0",
|
|
73
71
|
"polars[pandas,pyarrow]>=1.29.0",
|
|
74
72
|
"pytest>=8.3.5",
|
|
@@ -80,21 +78,16 @@ ci = [
|
|
|
80
78
|
[tool.pytest.ini_options]
|
|
81
79
|
cache_dir = "config/pytest_cache"
|
|
82
80
|
testpaths = ["tests"]
|
|
83
|
-
filterwarnings = [
|
|
84
|
-
'error:scatter inputs have incompatible types.*',
|
|
85
|
-
]
|
|
86
81
|
addopts = [
|
|
87
82
|
"-r xXfE",
|
|
88
83
|
"--pdbcls=IPython.terminal.debugger:TerminalPdb",
|
|
89
84
|
"--durations=3",
|
|
90
85
|
"--verbose",
|
|
86
|
+
"--import-mode=importlib",
|
|
91
87
|
]
|
|
92
|
-
timeout =
|
|
88
|
+
timeout = 256
|
|
93
89
|
timeout_method = "thread" # when jax hangs, signals do not work
|
|
94
90
|
|
|
95
|
-
# I wanted to use `--import-mode=importlib`, but it breaks importing submodules,
|
|
96
|
-
# in particular `from . import util`.
|
|
97
|
-
|
|
98
91
|
[tool.coverage.run]
|
|
99
92
|
branch = true
|
|
100
93
|
source = ["bartz"]
|
|
@@ -137,40 +130,110 @@ cache-dir = "config/ruff_cache"
|
|
|
137
130
|
|
|
138
131
|
[tool.ruff.format]
|
|
139
132
|
quote-style = "single"
|
|
133
|
+
skip-magic-trailing-comma = true
|
|
134
|
+
|
|
135
|
+
[tool.ruff.lint.isort]
|
|
136
|
+
split-on-trailing-comma = false
|
|
140
137
|
|
|
141
138
|
[tool.ruff.lint]
|
|
142
139
|
select = [
|
|
143
|
-
"
|
|
144
|
-
"
|
|
145
|
-
"
|
|
140
|
+
"ERA", # eradicate
|
|
141
|
+
"S", # flake8-bandit
|
|
142
|
+
"BLE", # flake8-blind-except
|
|
143
|
+
"B", # bugbear
|
|
144
|
+
"A", # flake8-builtins
|
|
145
|
+
"C4", # flake8-comprehensions
|
|
146
|
+
"CPY", # flake8-copyright
|
|
147
|
+
"DTZ", # flake8-datetimez
|
|
148
|
+
"T10", # flake8-debugger
|
|
149
|
+
"EM", # flake8-errmsg
|
|
150
|
+
"EXE", # flake8-executable
|
|
151
|
+
"FIX", # flake8-fixme
|
|
152
|
+
"ISC", # flake8-implicit-str-concat
|
|
153
|
+
"INP", # flake8-no-pep420
|
|
154
|
+
"PIE", # flake8-pie
|
|
155
|
+
"T20", # flake8-print
|
|
156
|
+
"PT", # flake8-pytest-style
|
|
157
|
+
"RSE", # flake8-raise
|
|
158
|
+
"RET", # flake8-return
|
|
159
|
+
"SLF", # flake8-self
|
|
160
|
+
"SIM", # flake8-simplify
|
|
161
|
+
"TID", # flake8-tidy-imports
|
|
162
|
+
"ARG", # flake8-unused-arguments
|
|
163
|
+
"PTH", # flake8-use-pathlib
|
|
164
|
+
"FLY", # flynt
|
|
165
|
+
"I", # isort
|
|
166
|
+
"C90", # mccabe
|
|
167
|
+
"NPY", # NumPy-specific rules
|
|
168
|
+
"PERF", # Perflint
|
|
169
|
+
"W", # pycodestyle Warning
|
|
146
170
|
"F", # pyflakes
|
|
147
171
|
"D", # pydocstyle
|
|
148
|
-
"
|
|
172
|
+
"PGH", # pygrep-hooks
|
|
173
|
+
"PLC", # Pylint Convention
|
|
174
|
+
"PLE", # Pylint Error
|
|
175
|
+
"PLR", # Pylint Refactor
|
|
176
|
+
"PLW", # Pyling Warning
|
|
177
|
+
"UP", # pyupgrade
|
|
178
|
+
"FURB", # refurb
|
|
179
|
+
"RUF", # Ruff-specific rules
|
|
180
|
+
"TRY", # tryceratops
|
|
149
181
|
]
|
|
150
182
|
ignore = [
|
|
151
183
|
"B028", # warn with stacklevel = 2
|
|
184
|
+
"C408", # Unnecessary `dict()` call (rewrite as a literal), it's too convenient for kwargs
|
|
152
185
|
"D105", # Missing docstring in magic method
|
|
153
186
|
"F722", # Syntax error in forward annotation. I ignore this because jaxtyping uses strings for shapes instead of for deferred annotations.
|
|
154
|
-
"
|
|
187
|
+
"PIE790", # Unnecessary ... or pass. Ignored because sometimes I use ... as sentinel to tell the rest of ruff and pyright that an implementation is a stub.
|
|
188
|
+
"PLR0913", # Too many arguments in function definition. Maybe I should do something about this?
|
|
189
|
+
"PLR2004", # Magic value used in comparison, consider replacing `*` with a constant variable
|
|
190
|
+
"RET505", # Unnecessary `{branch}` after `return` statement. I ignore this because I like to keep branches for readability.
|
|
191
|
+
"RET506", # Unnecessary `else` after `raise` statement. I ignore this because I like to keep branches for readability.
|
|
192
|
+
"S101", # Use of `assert` detected. Too annoying.
|
|
193
|
+
"S603", # `subprocess` call: check for execution of untrusted input. Too many false positives.
|
|
194
|
+
"SIM108", # SIM108 Use ternary operator `*` instead of `if`-`else`-block, I find blocks more readable
|
|
155
195
|
"UP037", # Remove quotes from type annotation. Ignore because jaxtyping.
|
|
156
196
|
]
|
|
157
197
|
|
|
158
198
|
[tool.ruff.lint.per-file-ignores]
|
|
159
|
-
"{config/*,
|
|
199
|
+
"{config/*,docs/*}" = [
|
|
160
200
|
"D100", # Missing docstring in public module
|
|
161
201
|
"D101", # Missing docstring in public class
|
|
162
202
|
"D102", # Missing docstring in public method
|
|
163
203
|
"D103", # Missing docstring in public function
|
|
164
204
|
"D104", # Missing docstring in public package
|
|
205
|
+
"INP001", # File * is part of an implicit namespace package. Add an `__init__.py`.
|
|
206
|
+
]
|
|
207
|
+
"src/bartz/_version.py" = [
|
|
208
|
+
"CPY001", # Missing copyright notice at top of file
|
|
209
|
+
]
|
|
210
|
+
"{config/*,docs/*,tests/*}" = [
|
|
211
|
+
"T201", # `print` found
|
|
212
|
+
]
|
|
213
|
+
"{tests/*,benchmarks/*}" = [
|
|
214
|
+
"SLF001", # Private member accessed: `*`
|
|
215
|
+
"TID253", # `{module}` is banned at the module level
|
|
216
|
+
]
|
|
217
|
+
"docs/conf.py" = [
|
|
218
|
+
"S607", # Starting a process with a partial executable path. Ignored because for a build script it makes more sense to use PATH.
|
|
165
219
|
]
|
|
166
220
|
|
|
167
221
|
[tool.ruff.lint.pydocstyle]
|
|
168
222
|
convention = "numpy"
|
|
169
|
-
|
|
223
|
+
|
|
224
|
+
[tool.ruff.lint.flake8-copyright]
|
|
225
|
+
min-file-size = 1
|
|
226
|
+
|
|
227
|
+
[tool.ruff.lint.flake8-tidy-imports]
|
|
228
|
+
banned-module-level-imports = ["bartz.debug"]
|
|
229
|
+
ban-relative-imports = "all"
|
|
170
230
|
|
|
171
231
|
[tool.pydoclint]
|
|
172
232
|
baseline = "config/pydoclint-baseline.txt"
|
|
173
|
-
auto-regenerate-baseline =
|
|
233
|
+
auto-regenerate-baseline = false
|
|
234
|
+
# auto-regenerate = false because in pre-commit pydoclint does not see the
|
|
235
|
+
# unmodified files, thinks those errors are gone, and removes them from the
|
|
236
|
+
# baseline.
|
|
174
237
|
arg-type-hints-in-signature = true
|
|
175
238
|
arg-type-hints-in-docstring = false
|
|
176
239
|
check-return-types = false
|
|
@@ -179,6 +242,8 @@ treat-property-methods-as-class-attributes = true
|
|
|
179
242
|
check-style-mismatch = true
|
|
180
243
|
show-filenames-in-every-violation-message = true
|
|
181
244
|
check-class-attributes = false
|
|
245
|
+
# do not check class attributes because in dataclasses I document them as
|
|
246
|
+
# init parameters because they are duplicated otherwise.
|
|
182
247
|
|
|
183
248
|
[tool.uv]
|
|
184
249
|
python-downloads = "never"
|