bartz 0.4.1__tar.gz → 0.6.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.4.1 → bartz-0.6.0}/PKG-INFO +14 -16
- {bartz-0.4.1 → bartz-0.6.0}/README.md +1 -0
- {bartz-0.4.1 → bartz-0.6.0}/pyproject.toml +98 -34
- bartz-0.6.0/src/bartz/.DS_Store +0 -0
- {bartz-0.4.1 → bartz-0.6.0}/src/bartz/BART.py +266 -113
- {bartz-0.4.1 → bartz-0.6.0}/src/bartz/__init__.py +4 -12
- bartz-0.6.0/src/bartz/_version.py +1 -0
- {bartz-0.4.1 → bartz-0.6.0}/src/bartz/debug.py +42 -16
- {bartz-0.4.1 → bartz-0.6.0}/src/bartz/grove.py +62 -12
- {bartz-0.4.1 → bartz-0.6.0}/src/bartz/jaxext.py +111 -37
- bartz-0.6.0/src/bartz/mcmcloop.py +511 -0
- bartz-0.6.0/src/bartz/mcmcstep.py +2335 -0
- {bartz-0.4.1 → bartz-0.6.0}/src/bartz/prepcovars.py +25 -10
- bartz-0.4.1/LICENSE +0 -21
- bartz-0.4.1/src/bartz/_version.py +0 -1
- bartz-0.4.1/src/bartz/mcmcloop.py +0 -197
- bartz-0.4.1/src/bartz/mcmcstep.py +0 -1567
|
@@ -1,22 +1,20 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: bartz
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.6.0
|
|
4
4
|
Summary: Super-fast BART (Bayesian Additive Regression Trees) in Python
|
|
5
|
-
License: MIT
|
|
6
5
|
Author: Giacomo Petrillo
|
|
7
|
-
Author-email: info@giacomopetrillo.com
|
|
6
|
+
Author-email: Giacomo Petrillo <info@giacomopetrillo.com>
|
|
7
|
+
License-Expression: MIT
|
|
8
|
+
Requires-Dist: equinox>=0.12.2
|
|
9
|
+
Requires-Dist: jax>=0.4.35
|
|
10
|
+
Requires-Dist: jaxlib>=0.4.35
|
|
11
|
+
Requires-Dist: jaxtyping>=0.3.2
|
|
12
|
+
Requires-Dist: numpy>=1.25.2
|
|
13
|
+
Requires-Dist: scipy>=1.11.4
|
|
8
14
|
Requires-Python: >=3.10
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
15
|
-
Requires-Dist: jax (>=0.4.35,<1)
|
|
16
|
-
Requires-Dist: jaxlib (>=0.4.35,<1)
|
|
17
|
-
Requires-Dist: numpy (>=1.25.2,<3)
|
|
18
|
-
Requires-Dist: scipy (>=1.11.4,<2)
|
|
19
|
-
Project-URL: Bug Tracker, https://github.com/Gattocrucco/bartz/issues
|
|
15
|
+
Project-URL: Documentation, https://gattocrucco.github.io/bartz/docs-dev
|
|
16
|
+
Project-URL: Homepage, https://github.com/Gattocrucco/bartz
|
|
17
|
+
Project-URL: Issues, https://github.com/Gattocrucco/bartz/issues
|
|
20
18
|
Description-Content-Type: text/markdown
|
|
21
19
|
|
|
22
20
|
[](https://pypi.org/project/bartz/)
|
|
@@ -42,6 +40,7 @@ On CPU, bartz runs at the speed of dbarts (the fastest implementation I know of)
|
|
|
42
40
|
- [Documentation (development version)](https://gattocrucco.github.io/bartz/docs-dev)
|
|
43
41
|
- [Repository](https://github.com/Gattocrucco/bartz)
|
|
44
42
|
- [Code coverage](https://gattocrucco.github.io/bartz/coverage)
|
|
43
|
+
- [Benchmarks](https://gattocrucco.github.io/bartz/benchmarks)
|
|
45
44
|
- [List of BART packages](https://gattocrucco.github.io/bartz/docs-dev/pkglist.html)
|
|
46
45
|
|
|
47
46
|
## Citing bartz
|
|
@@ -49,4 +48,3 @@ On CPU, bartz runs at the speed of dbarts (the fastest implementation I know of)
|
|
|
49
48
|
Article: Petrillo (2024), "Very fast Bayesian Additive Regression Trees on GPU", [arXiv:2410.23244](https://arxiv.org/abs/2410.23244).
|
|
50
49
|
|
|
51
50
|
To cite the software directly, including the specific version, use [zenodo](https://doi.org/10.5281/zenodo.13931477).
|
|
52
|
-
|
|
@@ -21,6 +21,7 @@ On CPU, bartz runs at the speed of dbarts (the fastest implementation I know of)
|
|
|
21
21
|
- [Documentation (development version)](https://gattocrucco.github.io/bartz/docs-dev)
|
|
22
22
|
- [Repository](https://github.com/Gattocrucco/bartz)
|
|
23
23
|
- [Code coverage](https://gattocrucco.github.io/bartz/coverage)
|
|
24
|
+
- [Benchmarks](https://gattocrucco.github.io/bartz/benchmarks)
|
|
24
25
|
- [List of BART packages](https://gattocrucco.github.io/bartz/docs-dev/pkglist.html)
|
|
25
26
|
|
|
26
27
|
## Citing bartz
|
|
@@ -23,12 +23,12 @@
|
|
|
23
23
|
# SOFTWARE.
|
|
24
24
|
|
|
25
25
|
[build-system]
|
|
26
|
-
requires = ["
|
|
27
|
-
build-backend = "
|
|
26
|
+
requires = ["uv_build>=0.7.3,<0.8.0"]
|
|
27
|
+
build-backend = "uv_build"
|
|
28
28
|
|
|
29
29
|
[project]
|
|
30
30
|
name = "bartz"
|
|
31
|
-
version = "0.
|
|
31
|
+
version = "0.6.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"},
|
|
@@ -36,42 +36,49 @@ authors = [
|
|
|
36
36
|
license = "MIT"
|
|
37
37
|
readme = "README.md"
|
|
38
38
|
requires-python = ">=3.10"
|
|
39
|
-
repository = "https://github.com/Gattocrucco/bartz"
|
|
40
|
-
packages = [
|
|
41
|
-
{ include = "bartz", from = "src" },
|
|
42
|
-
]
|
|
43
39
|
dependencies = [
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
40
|
+
"equinox>=0.12.2",
|
|
41
|
+
"jax>=0.4.35",
|
|
42
|
+
"jaxlib>=0.4.35",
|
|
43
|
+
"jaxtyping>=0.3.2",
|
|
44
|
+
"numpy>=1.25.2",
|
|
45
|
+
"scipy>=1.11.4",
|
|
48
46
|
]
|
|
49
47
|
|
|
50
|
-
[
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
[
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
myst-parser
|
|
48
|
+
[project.urls]
|
|
49
|
+
Homepage = "https://github.com/Gattocrucco/bartz"
|
|
50
|
+
Documentation = "https://gattocrucco.github.io/bartz/docs-dev"
|
|
51
|
+
Issues = "https://github.com/Gattocrucco/bartz/issues"
|
|
52
|
+
|
|
53
|
+
[dependency-groups]
|
|
54
|
+
only-local = [
|
|
55
|
+
"appnope>=0.1.4",
|
|
56
|
+
"ipython>=8.36.0",
|
|
57
|
+
"matplotlib>=3.10.3",
|
|
58
|
+
"matplotlib-label-lines>=0.8.1",
|
|
59
|
+
"pre-commit>=4.2.0",
|
|
60
|
+
"pydoclint>=0.6.6",
|
|
61
|
+
"ruff>=0.11.9",
|
|
62
|
+
"scikit-learn>=1.6.1",
|
|
63
|
+
"tomli>=2.2.1",
|
|
64
|
+
"virtualenv>=20.31.2",
|
|
65
|
+
"xgboost>=3.0.0",
|
|
66
|
+
]
|
|
67
|
+
ci = [
|
|
68
|
+
"asv>=0.6.4",
|
|
69
|
+
"coverage>=7.8.0",
|
|
70
|
+
"myst-parser>=4.0.1",
|
|
71
|
+
"numpydoc>=1.8.0",
|
|
72
|
+
"packaging>=25.0",
|
|
73
|
+
"polars[pandas,pyarrow]>=1.29.0",
|
|
74
|
+
"pytest>=8.3.5",
|
|
75
|
+
"pytest-timeout>=2.4.0",
|
|
76
|
+
"sphinx>=8.1.3",
|
|
77
|
+
"sphinx-autodoc-typehints>=3.0.1",
|
|
78
|
+
]
|
|
73
79
|
|
|
74
80
|
[tool.pytest.ini_options]
|
|
81
|
+
cache_dir = "config/pytest_cache"
|
|
75
82
|
testpaths = ["tests"]
|
|
76
83
|
filterwarnings = [
|
|
77
84
|
'error:scatter inputs have incompatible types.*',
|
|
@@ -80,7 +87,10 @@ addopts = [
|
|
|
80
87
|
"-r xXfE",
|
|
81
88
|
"--pdbcls=IPython.terminal.debugger:TerminalPdb",
|
|
82
89
|
"--durations=3",
|
|
90
|
+
"--verbose",
|
|
83
91
|
]
|
|
92
|
+
timeout = 64
|
|
93
|
+
timeout_method = "thread" # when jax hangs, signals do not work
|
|
84
94
|
|
|
85
95
|
# I wanted to use `--import-mode=importlib`, but it breaks importing submodules,
|
|
86
96
|
# in particular `from . import util`.
|
|
@@ -94,6 +104,7 @@ show_missing = true
|
|
|
94
104
|
|
|
95
105
|
[tool.coverage.html]
|
|
96
106
|
show_contexts = true
|
|
107
|
+
directory = "_site/coverage"
|
|
97
108
|
|
|
98
109
|
[tool.coverage.paths]
|
|
99
110
|
# the first path in each list must be the source directory in the machine that's
|
|
@@ -119,3 +130,56 @@ local = [
|
|
|
119
130
|
'/opt/hostedtoolcache/Python/*/*/lib/python*/site-packages/bartz/',
|
|
120
131
|
'C:\hostedtoolcache\windows\Python\*\*\Lib\site-packages\bartz\',
|
|
121
132
|
]
|
|
133
|
+
|
|
134
|
+
[tool.ruff]
|
|
135
|
+
exclude = [".asv", "*.ipynb"]
|
|
136
|
+
cache-dir = "config/ruff_cache"
|
|
137
|
+
|
|
138
|
+
[tool.ruff.format]
|
|
139
|
+
quote-style = "single"
|
|
140
|
+
|
|
141
|
+
[tool.ruff.lint]
|
|
142
|
+
select = [
|
|
143
|
+
"B", # bugbear: grab bag of additional stuff
|
|
144
|
+
"UP", # pyupgrade: fix some outdated idioms
|
|
145
|
+
"I", # isort: sort and reformat import statements
|
|
146
|
+
"F", # pyflakes
|
|
147
|
+
"D", # pydocstyle
|
|
148
|
+
"PT", # flake8-pytest-style
|
|
149
|
+
]
|
|
150
|
+
ignore = [
|
|
151
|
+
"B028", # warn with stacklevel = 2
|
|
152
|
+
"D105", # Missing docstring in magic method
|
|
153
|
+
"F722", # Syntax error in forward annotation. I ignore this because jaxtyping uses strings for shapes instead of for deferred annotations.
|
|
154
|
+
"F821", # Undefined name. I ignore this because strings in jaxtyping.
|
|
155
|
+
"UP037", # Remove quotes from type annotation. Ignore because jaxtyping.
|
|
156
|
+
]
|
|
157
|
+
|
|
158
|
+
[tool.ruff.lint.per-file-ignores]
|
|
159
|
+
"{config/*,benchmarks/*,docs/*,src/bartz/debug.py,tests/rbartpackages/*,tests/__init__.py}" = [
|
|
160
|
+
"D100", # Missing docstring in public module
|
|
161
|
+
"D101", # Missing docstring in public class
|
|
162
|
+
"D102", # Missing docstring in public method
|
|
163
|
+
"D103", # Missing docstring in public function
|
|
164
|
+
"D104", # Missing docstring in public package
|
|
165
|
+
]
|
|
166
|
+
|
|
167
|
+
[tool.ruff.lint.pydocstyle]
|
|
168
|
+
convention = "numpy"
|
|
169
|
+
ignore-decorators = ["functools.cached_property"]
|
|
170
|
+
|
|
171
|
+
[tool.pydoclint]
|
|
172
|
+
baseline = "config/pydoclint-baseline.txt"
|
|
173
|
+
auto-regenerate-baseline = true
|
|
174
|
+
arg-type-hints-in-signature = true
|
|
175
|
+
arg-type-hints-in-docstring = false
|
|
176
|
+
check-return-types = false
|
|
177
|
+
check-yield-types = false
|
|
178
|
+
treat-property-methods-as-class-attributes = true
|
|
179
|
+
check-style-mismatch = true
|
|
180
|
+
show-filenames-in-every-violation-message = true
|
|
181
|
+
check-class-attributes = false
|
|
182
|
+
|
|
183
|
+
[tool.uv]
|
|
184
|
+
python-downloads = "never"
|
|
185
|
+
python-preference = "only-system"
|
|
Binary file
|